nixos/systemd-boot: init boot counting

Description of changes
New and reworked version of #273062. #273062 had the problem of being unable to work with past entries that it was trying to scan because they were missing an "sort-key" item. I have updated it to make fewer assumption on what is an entry present on disk (it now only expects linux and initrd which are mandatory items).
Tested on one of my machines.
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

@JulienMalka in #283547 I proposed to use the sort-key to allow to reliably sort non-NixOS entries after NixOS ones, to avoid situations where a headless server boots into memtest86 for instance. It seems that the default entry is not always correctly selected otherwise and the first entry ends up being selected.
Do you see a way to support that in combination with this PR?

@JulienMalka in #283547 I proposed to use the sort-key to allow to reliably sort non-NixOS entries after NixOS ones, to avoid situations where a headless server boots into memtest86 for instance. It seems that the default entry is not always correctly selected otherwise and the first entry ends up being selected.
Do you see a way to support that in combination with this PR?

I'd advise supporting sort key for memtest86 and netbootxyz maybe?

@JulienMalka in #283547 I proposed to use the sort-key to allow to reliably sort non-NixOS entries after NixOS ones, to avoid situations where a headless server boots into memtest86 for instance. It seems that the default entry is not always correctly selected otherwise and the first entry ends up being selected.
Do you see a way to support that in combination with this PR?

I'd advise supporting sort key for memtest86 and netbootxyz maybe?

Yeah that's what I did in that PR indeed. You mean that you wouldn't make the one for NixOS entries configurable?
I think that would be ok if the NixOS entries have a sort key somewhere in the middle of the alphabet so that people can easily sort other entries either before or after.

You mean that you wouldn't make the one for NixOS entries configurable?

Yes that is what I mean. I have to use the sort key to make the default generation be sorted first with the boot-counting feature enabled. I have documented why in https://github.com/NixOS/nixpkgs/pull/273062, but if you know of another solution I'm interested.

I think that would be ok if the NixOS entries have a sort key somewhere in the middle of the alphabet so that people can easily sort other entries either before or after.

After that PRs, nixos generations will have sort-key set to default or non-default but we can also prefix that with something like nixos-default and nixos-non-default, that way somebody can have other entries sorted before or after these ?

Yeah, we could even make the prefix configurable with nixos as the default value, to keep things flexible.
I didn't look in detail at this PR yet, but both options (configurable or not) sound good to me and will allow us to keep memtest at the bottom.

@ofborg test systemd-boot

@spiage if you have time would you please this PR?

@JulienMalka I have no issues with this commit. Are you asking about this?
$ sudo --preserve-env=NIXOS_INSTALL_BOOTLOADER -- nix-env -p /nix/var/nix/profiles/system --set /nix/store/2kpw7m28shk164p8k18lmyv58xwysc8m-nixos-system-nixos-24.05.20240127.9e9b136
$ sudo --preserve-env=NIXOS_INSTALL_BOOTLOADER -- systemd-run -E LOCALE_ARCHIVE -E NIXOS_INSTALL_BOOTLOADER --collect --no-ask-password --pty --quiet --same-dir --service-type=exec --unit=nixos-rebuild-switch-to-configuration --wait true
Using systemd-run to switch configuration.
$ sudo --preserve-env=NIXOS_INSTALL_BOOTLOADER -- systemd-run -E LOCALE_ARCHIVE -E NIXOS_INSTALL_BOOTLOADER --collect --no-ask-password --pty --quiet --same-dir --service-type=exec --unit=nixos-rebuild-switch-to-configuration --wait /nix/store/2kpw7m28shk164p8k18lmyv58xwysc8m-nixos-system-nixos-24.05.20240127.9e9b136/bin/switch-to-configuration switch
stopping the following units: accounts-daemon.service
activating the configuration...
setting up /etc...
reloading user units for spiage...
restarting sysinit-reactivation.target
reloading the following units: dbus.service
restarting the following units: polkit.service
starting the following units: accounts-daemon.service
the following new units were started: libvirtd.service

nixos-system-nixos: 24.05.20240127.c7a9d44 → 24.05.20240127.9e9b136

Yes, no issues, it was successful switch from master for my system
#inputs.nixpkgs.url = "github:nixos/nixpkgs/master";
inputs.nixpkgs.url = "github:nixos/nixpkgs/9e9b13658c4209f86f5ca5707babb17c7d1f8967";

I can reboot if you need )

Thanks, I did test with a machine with old generations, will also try to test with generations without bootspec and with strange boot entries.
I'd encourage people with strange setups to test this as well.

@JulienMalka I reworked a bit the PR mentioned above (#283547) so that it can also deal properly with specialisations having different sort keys than their parent generations. This would also allow to control the fallback behaviour when using boot counting, since the specialisations will not necessarily be sorted right behind their parents anymore, but can be sorted separately (first all the top-level generations, and then all the specialisations).
When not setting a custom sort key for a specialisation, it inherits the sort key from its parent generation and we keep the current sorting behaviour.
Would it make sense to merge that PR first to introduce configurable sort keys, and then rebase this one on top? For this PR, I think we should then simply add a fixed suffix to determine what's the default entry (we add either -default or -non-default to every sort key). Like that, we can both have configurable sorting of entries and keep the functionality of this PR.
What do you think?

I never got around to reviewing the original PR, so I guess here's my chance to review this one. I think the code looks good as is, but I question some of the design.
I rather don't like the way sort-key and default are handled here. IMO sort-key should be used to group profiles and specialisations, not default and non-default. I understand that the reason you've done it this way is because there's no way to specify the default in loader.conf such that a known-bad default won't be booted automatically. But I consider that a deficiency in systemd-boot (https://github.com/systemd/systemd/issues/31215) that should be fixed, rather than worked around.
On that note, I greatly dislike how specialisations of a known-bad generation are the first fallback tried. Using sort-key to group by specialisation would avoid this. i.e. The boot order would look like Gen 2; Gen 1; Gen 2 Spec A; Gen 1 Spec A.
So I sort of think we need:

@r-vdp's PR #283547 to group by specialisation,
A solution to https://github.com/systemd/systemd/issues/31215

Actually, I wonder if #283547 isn't even quite right. Rather than allowing the system derivation to choose its own sort-key, it seems to me like sort-key should just be equal to nixos-${profile_name}-${specialisation_name}

I understand that the reason you've done it this way is because there's no way to specify the default in loader.conf such that a known-bad default won't be booted automatically. But I consider that a deficiency in systemd-boot (https://github.com/systemd/systemd/issues/31215) that should be fixed, rather than worked around.

Thank you for opening the issue upstream, I think you are right calling this a deficiency on systemd-boot's side, will follow this carefully.

On that note, I greatly dislike how specialisations of a known-bad generation are the first fallback tried. Using sort-key to group by specialisation would avoid this. i.e. The boot order would look like Gen 2; Gen 1; Gen 2 Spec A; Gen 1 Spec A.

I have considered this option, and have several issues with it:

Firstly, you are making the assumption that specialisations and "mother" generation are close enough that if the mother generation is bad, the specialisations probably are too.  I don't think that it is true. I could do a NixOS configuration with specialisation just changing the kernel version for example, and in that case I'd happy that my different kernel versions are tried before going to another generation.

Secondly, we could sort the specialisation after the normal generations, but we cannot have it both ways: the order of tries is the same as the boot menu. I think specialisations users want them sorted after the mother generations in the boot menue to be able to select them easily.
These are the reasons that motivated my choice to leave the ordering of specialisations as is.

Hm, I think those are moreso arguments that it should be user's choice. Because it depends on what the user has those specialisations for. For instance, I use specialisations so that every generation comes with a "rescue mode" with rescue in the kernel params (which must be done with specialisations when using lanzaboote). I would not want those specialisations to be tried until all the mother generations have been exhausted.
And if it's user's choice, we're back to https://github.com/NixOS/nixpkgs/pull/283547

I think sort-keys should be user-definable, the sorting of specialisations is one instance where people might have different preferences for how they are sorted, depending on what the specialisations are used for, but also because people might have other, non-nixos bootloader entries that they want to sort relatively to the nixos ones. So I think it makes sense to offer people this flexibility.
Ideally, boot counting would be completely orthogonal to this and would not need to rely on sort-keys.

@ElvishJerricco I think fixing this in systemd will take time and a lot of users can still derive useful boot counting with the current state of things, do you see a reason to block this over the upstream fix?

@RaitoBezarius Even without an upstream fix, I'd still like to see sort-key utilized better here. I suppose we can push that responsibility into https://github.com/NixOS/nixpkgs/pull/283547 though...

@RaitoBezarius Even without an upstream fix, I'd still like to see sort-key utilized better here. I suppose we can push that responsibility into #283547 though...

That seems reasonable to me!

I have interfaced this PR with https://github.com/NixOS/nixpkgs/pull/283547. Now that sort-key is user defined, we have to dynamically compute a suitable sort-key to display the default generation first.

@ofborg test systemd-boot

@JulienMalka is there anything blocking or can we get this PR merged?

No really, especially now that branch-off has happened. I will rerun a test phase on real hardware and merge it next week if no further remarks.

@JulienMalka I rebased and tested your code in: https://github.com/NixOS/nixpkgs/pull/330017

Thank you @Mic92, closing


uboot: restrict rpi kernel size patch to rpi uboot builds

NixOS maintains a uboot patch for the raspberry pi which enables larger kernels to be loaded. (background: [1,2])
Prior to this commit, this patch was applied to all callers of buildUBoot, regardless of whether it was relevant for that specific board. buildUBoot already accepts an argument `extraPatches' for board-specific patches, so use this mechanism to patch the raspberry pi uboot builds instead.
Without this change, passing a different `src' argument to buildUBoot (ie: pointing at upstream uboot or at a board-specific fork) becomes highly brittle as the patch will not usually apply cleanly.

See also previous discussion:

#146634

Previous PR was more DRY, will modify this one to bind the pi-specific patchset list separately.


feat (ffmt): introduce ffmt to read format string from separate file

Hi, thanks a lot for the amazing plugin!
I would like to add a functionality to define the format string in a different file and use the content to expand a snippet.
I believe this would be useful to define a template file.
I have implemented a function file_format_nodes, aliased to ffmt that is kind of a wrapper around fmt node.
So the usage is very simple.
Old way: Using fmt node
snippets[#snippets + 1] = s(
  e("journal", "template for journal page"),
  fmt(
    [[
* {title}
  {{:{yesterday}:}}[Yesterday] - {{:{tomorrow}:}}[Tomorrow]

** Daily Review
   - {}

** Today's Checklist
   - ( ) Write my daily review

** Achievements
   -
    ]],
    {
      title = f(function(_, _)
        return parse_date(0, file_title())
      end),
      yesterday = f(function(_, _)
        return parse_date(-1, file_title())
      end),
      tomorrow = f(function(_, _)
        return parse_date(1, file_title())
      end),
      i(0),
    }
  )
)

Instead, using ffmt

~/norg-template/journal.norg

* {title}
  {{:{yesterday}:}}[Yesterday] - {{:{tomorrow}:}}[Tomorrow]

** Daily Review
   - {}

** Today's Checklist
   - ( ) Write my daily review

** Achievements
   -

snippets[#snippets + 1] = s(
  e("journal", "template for journal page"),
  ffmt("~/norg-template/journal.norg", {
    title = f(function(_, _)
      return parse_date(0, file_title())
    end),
    yesterday = f(function(_, _)
      return parse_date(-1, file_title())
    end),
    tomorrow = f(function(_, _)
      return parse_date(1, file_title())
    end),
    i(0),
  }
)

I see how this can be useful for you, but if we add this then it will make sense to do the same for the other formats (which is not very clean IMHO). Maybe a helper function for reading a file that you can use as fmt(read_file(path), ....) will be more flexible.

At least my code has nothing to do with formats and simply treats the content of the file as a string. And I don't think we need to care anything about what file types we are dealing and just let people put {key_name} inside the files so that the snippet engine can handle them.
The reason why I would like to avoid the helper function route is that since we define snippets for different file types, I would then have to copy that function to all files I want this which would make my code a bit harder to maintain.
I am not thinking to use this only for norg files but with other filetypes as well.

Making it easier to define filetype-templates with luasnip seems cool, but I'm not convinced ffmt is the right approach, since it requires that the placeholders in the fmt-file and the nodes provided in the call are in sync.
Have you considered parsing lsp-style snippets from a file? Parsed snippets are of course less capable than their lua counterparts, but some of that could be alleviated with custom variables

Thanks for your opinions.
Alright, I'll simply add code on my end.
Closing ;)


Removing the BTC faucet functionality because BlueWallet does not support the Bitcoin testnet

We need to remove the BTC testnet faucet because of the signer configuration. We provided BTC secrets to the evaluator for use in testing.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Application PR: https://github.com/w3f/Grants-Program/pull/868


#11 input-field: user notifications

Value Proposition
As a user I would expect to get a notification when I enter something wrong or not expected in an input field.
Description

Acceptance Criteria

[ ] show info messages with the corresponding info

Tasks

[ ] create feature feat/info-messages
[ ] add a new component: Info component
[ ] add several messages for edit/create page of a list-item & a category (if the current Issue is set):

[ ] #1 An entry cannot begin with a space
[ ] #2 A  category cannot begin with a space
[ ] #3 This Entry already exist
[ ] #4 This Category already exist

[ ] hide those messages after three seconds

Personally I think 3 seconds is a bit long for these messages.
Idea: Instead of viewing a message with cannot begin with a space you could just cut i out when saving the item?

@Mark-Krensel thanks for the suggestion. I'll look how many seconds i need for each info.
I'll add the Idea instead of the message. Thanks 🙏


Caddy unusable due to ACME directory error at startup (DNS I/O error)

1. What version of Caddy are you using (caddy -version)?
Caddy 0.10.11 (unofficial) - this is the latest caddy binary on CentOS 7.5.
I have also tried using the latest download from the caddy site: Caddy 0.11.0 (non-commercial use only).
2. What are you trying to do?
Start caddy after a system update & reboot.
3. What is your entire Caddyfile?
import conf.d/*.conf

There is one imported file:
name.of.my.host {
    proxy / https://<IP_ADDRESS>/ {
        insecure_skip_verify
        websocket
    }
}

4.
Normally started via systemd, but also attempted to start directly from a shell:
# sudo -u caddy caddy -conf /etc/caddy/caddy.conf

Both failed with the same error.
This is a CentOS 7.5 system, with SELinux enabled. Disabling SELinux (setenforce 0) did not help.
5. Please paste any relevant HTTP request(s) here.
Fetching the directory URL via curl worked fine:
# sudo -u caddy curl https://acme-v02.api.letsencrypt.org/directory
{
  "HzrgcpzUF3c": "https://community.letsencrypt.org/t/adding-random-entries-to-the-directory/33417",
  "keyChange": "https://acme-v02.api.letsencrypt.org/acme/key-change",
  "meta": {
    "caaIdentities": [
      "letsencrypt.org"
    ],
    "termsOfService": "https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf",
    "website": "https://letsencrypt.org"
  },
  "newAccount": "https://acme-v02.api.letsencrypt.org/acme/new-acct",
  "newNonce": "https://acme-v02.api.letsencrypt.org/acme/new-nonce",
  "newOrder": "https://acme-v02.api.letsencrypt.org/acme/new-order",
  "revokeCert": "https://acme-v02.api.letsencrypt.org/acme/revoke-cert"
}

6. What did you expect to see?
I expected Caddy to start. The certificate for this site is still valid, and doesn't expire until August 13th 2018 (so over two months left).
7. What did you see instead (give full error messages and/or log)?
Caddy refused to start at all, with the following error:
Activating privacy features... 2018/06/08 10:36:06 making ACME client to get ToS URL: get directory at 'https://acme-v02.api.letsencrypt.org/directory': failed to get json "https://acme-v02.api.letsencrypt.org/directory": Get https://acme-v02.api.letsencrypt.org/directory: dial tcp: lookup acme-v02.api.letsencrypt.org on <IP_ADDRESS>:53: read udp <IP_ADDRESS>:47366-><IP_ADDRESS>:53: i/o timeout

Attempting this resolution via dig using the same user works fine; this is a caddy-specific issue:
# sudo -u caddy dig +short A acme-v02.api.letsencrypt.org @<IP_ADDRESS>
api.letsencrypt.org-ng.edgekey.net.
e14990.dscx.akamaiedge.net.
<IP_ADDRESS>

8. How can someone who is starting from scratch reproduce the bug as minimally as possible?
Unsure; I don't know what the required conditions are for caddy to refuse starting. To reproduce on the problem host (essentially vanilla CentOS), merely starting caddy is enough to trigger the problem.

Have steps to reproduce on a brand new CentOS install:

Install CentOS
yum update & reboot
yum install epel-release
yum install caddy
Create basic config: www.example.com { root /path/to/test/root }
Start caddy

As before, other tools on the system have no issues with DNS, and work correctly.
Adding acme-v02.api.letsencrypt.org allows caddy to start, but still results in OCSP warnings in the log. Adding ocsp.int-x3.letsencrypt.org to /etc/hosts resolves that warning.

Further to my above comment, it seems that once it's been started successfully, the lines in /etc/hosts are no longer required in order for it to restart. I'm unsure what implications this might have further down the line next time it wants to contact LetsEncrypt - I would suspect failure again.
Why is inability to contact LE a fatal error, when a certificate has over two months remaining validity? This is a webserver - if something like this occurs, I want the site back up ASAP, regardless of what the underlying cause of the problem might be. Once it's serving again, then I can investigate further.
Would it be possible to add a CLI switch that allows the server to start, regardless of such errors (i.e. causes them to be treated as non-fatal warnings)? I understand that the fatal exit is a design decision in order to get the admin's attention, because it's assumed that they don't watch the logs - which is annoying, but understandable - however, once made aware of the problem, forcing continued downtime is not reasonable.

@mholt This issue isn't resolved - I'm not sure why you closed it...

It sounds like your system or infrastructure is set up weirdly so that you have to whitelist outbound connections to your resolver.

My system is not set up to require resolver whitelisting. It uses <IP_ADDRESS> and <IP_ADDRESS> directly, outbound connections are not firewalled at any point, and as per my original post, other programs on the same system are able to resolve just fine.

I noticed you're obtaining Caddy from an unofficial source; I can't make any guesses or guarantees as to that particular binary's integrity or correctness, sorry.

Again, as per my original post, I also tested this with an official binary from the caddy website.

That's definitely not a bug in Caddy.

I don't know whether this is a bug or not, but the fact that it's only caddy exhibiting this behavior, and that it can be easily reproduced on a brand new system, makes me suspicious. If it's not a bug in caddy, do you know where I could look to determine what is causing caddy to behave this way?

Caddy 0.10.12 and newer uses the ACMEv2 endpoint, which requires getting new certificates because v2 is incompatible with v1.

This is useful to know, but I'm not sure how it's relevant - the problem occurred on both 0.10.10 (v1) and 0.11.0 (v2) versions of caddy, and first showed up after a system update / reboot.

Would it be possible to add a CLI switch that allows the server to start, regardless of such errors (i.e. causes them to be treated as non-fatal warnings)? I understand that the fatal exit is a design decision in order to get the admin's attention, because it's assumed that they don't watch the logs - which is annoying, but understandable - however, once made aware of the problem, forcing continued downtime is not reasonable.

Any chance you could address the above?

I did. As per my original post, my test using v0.11.0 binary was an official one downloaded from the caddy website. The problem was still evident.

That's what I get for reading issues too late at night, sorry.
I really have no idea what is causing this but I'm 99.9% sure it's not a bug in Caddy itself: it's probably either in the standard library or somewhere else in your system/infrastructure.
Your issue seems similar to this one: https://github.com/kubernetes/kubernetes/issues/45479 - also running CentOS.

I really have no idea what is causing this but I'm 99.9% sure it's not a bug in Caddy itself.

OK. Do you know which piece of code in the caddy source handles the problematic DNS lookup? If I can figure out what it's doing / where it interfaces with the rest of the system, then I can see if I can come up with a way to reproduce it outside of caddy. At the moment, everything that isn't caddy can resolve DNS records just fine, so caddy is definitely doing something different.

...it's probably either in the standard library...

This seems unlikely - caddy is statically linked, so if there's a standard library issue, then it's an issue with whatever standard library you're shipping as part of the caddy binary. Are you able to expand on why you think this might be the case?

...somewhere else in your system/infrastructure.

More likely, but I am stumped as to where. Everything else on that box can resolve DNS records (which rules out the infrastructure), and using a brand new, fresh CentOS install still exhibits the problem, which rules out issues with my system config. My initial suspicion was that CentOS was shipping a buggy library, but ldd indicates that caddy is statically linked, which rules that out too.

Your issue seems similar to this one: kubernetes/kubernetes#45479 - also running CentOS.

I'm not using kubernetes / docker etc; this is a plain old CentOS system. However, this issue does seem to have the same error message, and is also using Go - so this makes me wonder if there's some kind of issue caused by an interaction between CentOS and one of the Go components bundled with caddy. Which Go API does caddy use to resolve DNS records?

Do you know which piece of code in the caddy source handles the problematic DNS lookup?

It's in lego: https://github.com/xenolf/lego/blob/master/acme/client.go - which uses the standard library.

caddy is statically linked, so if there's a standard library issue, then it's an issue with whatever standard library you're shipping as part of the caddy binary. Are you able to expand on why you think this might be the case?

 It has nothing to do with the fact that it's statically linked. DNS resolution is complicated and platform-dependent. If the Go standard library decides to use the system resolver, then so be it. Or it might decide to use its own resolver logic. Each has tradeoffs. I'm not sure which one it is using.

I'm not using kubernetes / docker etc

But they are written in Go, which is why it's worth learning from their experience. The two applications are quite similar to Caddy in many ways.

Which Go API does caddy use to resolve DNS records?

Caddy doesn't do this directly, like, it's way outside of Caddy's scope. I'm sorry, but I'm not sure I can help much here. Good luck!

That's really helpful - thanks :-). I'll do some digging into that call and see if I can track it down that way - will let you know what I find in case anyone else runs into this.

This seems has auto-resolved after another system update, before I could get to the bottom of it.


Add prepared queries to client js and golang SDKs

Since we have added prepared queries in v0.18.0, we should also allow it to access through client SDKs as it's a very important feature.
For the javascript SDK, we can have this API:
db.preparedQuery(name).args(argumentsObject).apply()

Added it to javascript SDK. @sharadregoti close this issue when you are done with golang SDK

Done


Update version on init.py to 0.7.0

There was a new release of the python client with version upped to 0.7.0 on pip and on the pyproject.toml, but it wasn't changed on the init.py so when one does:
import text_generation
print(text_generation.__version__)

It still outputs "0.6.0"
What does this PR do?

Fixes # (issue)
Before submitting

[x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
[ ] Did you read the contributor guideline,
Pull Request section?
[ ] Was this discussed/approved via a Github issue or the forum? Please add a link
to it if that's the case.
[ ] Did you make sure to update the documentation with your changes? Here are the
documentation guidelines, and
here are tips on formatting docstrings.
[ ] Did you write any new necessary tests?

Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

This client is deprecated in favor of https://huggingface.co/docs/huggingface_hub/guides/inference


Latest master not working

I get this when i access router with latest master
/usr/lib/lua/luci/controller/admin/uci.lua:8: attempt to index global 'disp' (a nil value)
stack traceback:
/usr/lib/lua/luci/controller/admin/uci.lua:8: in function 'v'
/usr/lib/lua/luci/dispatcher.lua:598: in function 'createtree'
/usr/lib/lua/luci/dispatcher.lua:256: in function 'dispatch'
/usr/lib/lua/luci/dispatcher.lua:121: in function </usr/lib/lua/luci/dispatcher.lua:120>

reverting
@@ -5,8 +5,7 @@
module("luci.controller.admin.uci", package.seeall)
function index()

local redir = luci.http.formvalue("redir", true) or

luci.dispatcher.build_url(unpack(luci.dispatcher.context.request))

local redir = luci.http.formvalue("redir", true) or table.concat(disp.context.request, "/")
entry({"admin", "uci"}, nil, _("Configuration"))
entry({"admin", "uci", "changes"}, call("action_changes"), _("Changes"), 40).query = {redir=redir}

fixes it

Confirmed, both the issue and the fix from @mcaptur
Run tested on an ASUS RT-AC58U (ipq40xx), OpenWRT^c089671, luci^bfc98be

Now when trying to wake a host from luci WOL addon i get the following
Form token mismatch
The submitted security token is invalid or already expired!
In order to prevent unauthorized access to the system, your request has been blocked. Click "Continue »" below to return to the previous page.
not sure if related

No, it is a different issue, fixed with dacf88216d93919d8e988a08902c9f87779874ee

@jow- What's the recommended way to bring back the "cbi-magic" after the switch to the form() action? E.g. in the wol app something like this no longer works ... same applies to field dependencies etc.
host = s:option(Value, "mac", translate("Host to wake up"),
        translate("Choose the host to wake up or enter a custom MAC address to use"))

sys.net.mac_hints(function(mac, name)
        host:value(mac, "%s (%s)" %{ mac, name })
end)


OLPRPS-5209: Added HERE logo (watermark) to the bottom left corner of map

OLPRPS-5209: Added HERE logo (watermark) to the bottom left corner of map canvas.
Signed-off-by: Oleksandr Popov<EMAIL_ADDRESS>

Codecov Report

Merging #951 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #951   +/-   ##
=======================================
  Coverage   47.88%   47.88%
=======================================
  Files         228      228
  Lines       21661    21661
  Branches     4944     4944
=======================================
  Hits        10372    10372
  Misses      11289    11289

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 601beea...73f7d32. Read the comment docs.

Just a question about license: If we add the HERE logo into this repository, does it mean people can use and modify  it and use it toe somebody else. @tsteenbe Can you give advice here please.

Just a question about license: If we add the HERE logo into this repository, does it mean people can use and modify it and use it toe somebody else. @tsteenbe Can you give advice here please.

Do not add HERE brand logo to the bottom of the map but implement a generic attribution mechanism in harp.gl that allows setting a attribution link in the bottom right corner of the map. Then any npm package that add a new map to harp.gl can define the needed attribution.

Do not add HERE brand logo to the bottom of the map but implement a generic attribution mechanism in harp.gl that allows setting a logo with link in the bottom right corner of the map. Then any npm package that add a new map to harp.gl can define the needed a logo.
This we have in a separate PR #911. This PR can just be abandoned.

After consulting with @ninok decided to abandon this PR.


Kestrel not working on shared socket?

I'm running Kestrel 1.0.1 configured to UseHttps. Now every once all browsers start reporting issues with reset connection or protocol errors. Google Chrome reports it as ERR_SSL_PROTOCOL_ERROR.
I finally figured out why this was happening sometimes: Skype.  Closing Skype and restarting the Kestrel app will solve the protocol errors.
Now there is a setting in Skype to disable using port 80 and 443 if they are available, it is under Options > Advanced > Connection. If you uncheck the problem will not occur.
If I try to repro the same behavior using IIS, I get an error when starting the Kestrel program: Error -4092 EACCES permission denied.
My guess is that the socket is somehow shared. Shouldn't Kestrel report the port is already in use in such a scenario?

Shouldn't Kestrel report the port is already in use in such a scenario?

That's not a thing. There is no port sharing with Kestrel. On windows, components that use http.sys (like IIS) can run on the same port and be separated by path, this isn't supported using raw kestrel (it's pure sockets). I don't know what skype uses (probably uses http.sys on windows).

I'm not following your reasoning: I can consistently reproduce the reported issue across multiple apps and on multiple machines.
I have little experience with Kestrel/Libuv and no experience with the Skype internals, but based on the repro I can only assume that Kestrel/Libuv opens a socket just fine, even though Skype has apparently already opened it.
I can image this could be expected behavior just as well as a bug in one of the involved systems. If it turns out to be expected behavior, we should document it somewhere. If it is a bug, we should address it or report it to team responsible for the system which caused it.
So I ran a few more tests:
The result of netstat with just running Skype:
netstat -ab
TCP  <IP_ADDRESS>:443    PHOBOS:0    LISTENING   [Skype.exe]

The result of neststat with running Skype first and then my Kestrel app:
netstat -ab
TCP  <IP_ADDRESS>:443    PHOBOS:0    LISTENING   [FontoXMLStandardDitaEditor.exe]
TCP  <IP_ADDRESS>:443    PHOBOS:0    LISTENING   [Skype.exe]

The result of neststat with running my Kestrel app first and then Skype:
netstat -ab
TCP  <IP_ADDRESS>:443   PHOBOS:0     LISTENING   [FontoXMLStandardDitaEditor.exe]

This proves that both of them are listening on the same port in the 2nd run right? Will in the 3rd run Skype seems to somehow know that an app is already running.
Or am I completely missing something?

I ran some more tests:
When Skype is already started and it has an open connection, the call to uv_tcp_bind results in the status code 0. While doing the same with IIS running on the port, the call to uv_tcp_bind results in the status code -4092.
Also the issue cannot be reproduced when binding to localhost, one needs to bind to machine name.
So my current assumption is that Skype and Libuv somehow can share the port. Any suggestions on how to debug this further?

More tests when binding to <IP_ADDRESS> the address is being reported as in use with status code Error -4091 EADDRINUSE address already in use.
It looks like it may have something to do with https://github.com/libuv/libuv/blob/v1.9.0/src/win/tcp.c#L286, https://github.com/joyent/libuv/pull/1360 and https://msdn.microsoft.com/en-us/library/windows/desktop/ms740621(v=vs.85).aspx.
Does anyone here have experience with this API?

To share 80/443 you have to go via http.sys; it parses all headers and decides where to dispatch request so essentially its more or less like going via IIS (which also goes via http.sys). If you want to port share this way directly without IIS then use WebListener rather than Kestrel as that's how it works (via http.sys).
If you reuse us the port on windows with SO_REUSEADDR then you end up with unreliable connections (except for multicast UDP)

If the server application forcibly binds using the SO_REUSEADDR socket option to the same port, then the behavior for all sockets bound to that port is indeterminate.

On linux you get round robin dispatch; which works but only if its all the same application; else you end up with unreliable behaviour also.

You could do an if debug UseWebListener else UseKestrel; as I'd guess you won't be running Skype on your server?

I've tested this with a small node app and I can reproduce the same behavior, which means it is not Kestrel specific.
There are plenty of workarounds available, including the ones suggested in the previous comment.
The question is still: do we consider it a bug that Kestrel starts without complaining in this specific scenario, if so we should do a proper root cause analysis, perhaps with the Libuv community and some Winsock experts. If not, this issue can be closed, and consider adding this behavior to the known issue list/faq/documentation somewhere.

No it's not a bug, it's by design. What behavior do you want to document exactly? If you use kestrel on a port that's already in use that it fails? Or do we just need better error messages and logging?

This is by design.


Fix variables in selectors when calling toString()

Also replacing nbd/util/extend with Object.assign while I'm at it :)

👍

👍


Usage with Laravel Nova possible?

I see that you have a laravel-ban-nova package so maybe you have an idea how I can use Laravel Love with Laravel Nova?
Basically I have a reaction type called "like" and I want to show the users that a user has liked inside Laravel Nova
And I am unsure how to go about achieving this.
I would like to use Nova's HasMany field but I don't know how to defined the liked relationship on my User model
Could you offer some assistance please?

Hrm.. so it seems like I stumbled upon something that works.. although it seems wrong somehow but it does work
In my User nova resource I added this field:
HasMany::make('LikedUsers'),

Then I created a new resource like this:
<?php

namespace App\Nova\Resources;

class LikedUser extends User
{
}

And finally in my User mode I added this relation
    public function likedUsers()
    {
        return $this->whereReactedBy($this, 'Like');
    }

And now I can get a list of users that any user has "liked"... cool
Thoughts?
Now I would like to be able to get the inverse relation but I don't know how
Meaning, if I click on a User that has been liked by another user, I would like to be able to display a list of "Users liked by"
Do you know how could I achieve this?
Thanks!

Never thought about creating Nova package for this one. If you'll create a public Nova wrapper package - I'll be happy to promote it in this repo.
You could try to get this information from the user reactions and iterate through it, something like:
$user->viaLoveReacter()->getReactions();

But it would be not optimal way if there is a lot of data.

whereReactedBy uses joins to optimize queries. You could try to make similar method, for example whereReactedTo and find all reacterable users which reacted to this reactable user.

whereReactedBy uses joins to optimize queries. You could try to make similar method, for example whereReactedTo and find all reacterable users which reacted to this reactable user.

Yes that's what I was thinking.. the terminology is making my head spin though. Shouldn't it be scopeWhereReacteredBy? Or you think it should be scopeWhereReactedTo?
I feel like this would be a nice addition to your package.. having the ability to return the models that have reacted to you.. so as you put it.. whereReactedTo
Any chance you could take a stab at writing this query since you're so familiar with the inner workings? I'd be happy to test it out to confirm that it works

Pretty busy this days, launching new service: https://yhype.halp.im/ :smile:
I'll try to look on it in a spare time.

Thanks @antonkomarev and good luck with your launch!
I wrote this and it seems to work! It was quite simple just had to many two small modifications to the scopeWhereReactedBy
What do you think? Did I miss something?
    public function scopeWhereReactedTo(
        Builder $query,
        ReacterableInterface $reacterable,
        ?string $reactionTypeName = null
    ): Builder {
        return $query->whereHas('loveReacter.reactions', function (Builder $reactionsQuery) use ($reacterable, $reactionTypeName) {
            $reactionsQuery->where('reacter_id', '<>', $reacterable->getLoveReacter()->getId());
            if ($reactionTypeName !== null) {
                $reactionsQuery->where('reaction_type_id', ReactionType::fromName($reactionTypeName)->getId());
            }
        });
    }

If you like it and it seems to work then maybe you could add it? Or do you want me to submit a PR?

Very close to the correct one:
    public function scopeWhereReactedTo(
        Builder $query,
        ReactableInterface $reactable,
        ?string $reactionTypeName = null
    ): Builder {
        return $query->whereHas('loveReacter.reactions', function (Builder $reactionsQuery) use ($reactable, $reactionTypeName) {
            $reactionsQuery->where('reactant_id', $reactable->getLoveReactant()->getId());
            if ($reactionTypeName !== null) {
                $reactionsQuery->where('reaction_type_id', ReactionType::fromName($reactionTypeName)->getId());
            }
        });
    }

    public function scopeWhereNotReactedTo(
        Builder $query,
        ReactableInterface $reactable,
        ?string $reactionTypeName = null
    ): Builder {
        return $query->whereDoesntHave('loveReacter.reactions', function (Builder $reactionsQuery) use ($reactable, $reactionTypeName) {
            $reactionsQuery->where('reactant_id', $reactable->getLoveReactant()->getId());
            if ($reactionTypeName !== null) {
                $reactionsQuery->where('reaction_type_id', ReactionType::fromName($reactionTypeName)->getId());
            }
        });
    }

Instead of Reacterable (who reacts) you should bypass Reactable (on whom react) model.

You could create a PR. If it will have tests similar as whereReactedBy has - it will be merged and released faster.

Thanks for the tips @antonkomarev
Do you know if it's also possible to easily retrieve the reaction date when using scopeWhereReactedTo or scopeWhereReactedBy ?
Right now it returns the users that have reacted to/by the specfied reaction type.. but I'm not seeing an easy way to also retrieve more details about that reaction, namely the datetime it occurred at

Since it returns Eloquent Builder you could get collection and filter it, but it wouldn't be an optimal way. Another approach is to create additional scope methods with datetime range parameters, but I think it will become too complicated. Maybe some kind of services may solve that.

You may add extra scope:
public function scopeWhereWasReactedBetweenDates(
    Builder $query,
    DateTimeImmutable $fromDateTime,
    DateTimeImmutable $toDateTime
): Builder {
    return $query->whereHas('loveReactant.reactions', function (Builder $reactionsQuery) use ($fromDateTime, $toDateTime) {
        $reactionsQuery->whereBetween('created_at', [$fromDateTime, $toDateTime]);
    });
}

And then use both scopes:
$toDate = new DateTimeImmutable();
$fromDate = $toDate->modify('-1 DAY');

$articlesReactedByUser = Article::query()
            ->whereReactedBy($user)
            ->whereWasReactedBetweenDates($fromDate, $toDate)
            ->get();

I haven't tested it, but in theory this should work.

I misunderstood you. You don't need to find reactable models within dates, but want to know when exactly user reacted it. Interesting question, I don't have answer on it yet.

Yes that's right.. although those extra scopes could come in handy as well so thanks for sharing : )
I was just hoping that the date of the reaction could be easily retrieved when fetching models that have been reacted to

@antonkomarev I know this won't be super useful and would lend itself to a n+1 problem.. but this is the workaround I came up with to retrieve the raw reaction from the db table in order to expose the datetime of the reaction itself which is useful in my case
It would be nice if a future version could more easily expose/include the date of each reaction, possibly as a pivot value?
Also I hope the new query scopes you have a draft of can be added to the next release too : )
$rawReaction = (new Love)->getRawReaction($user, User::find(request('viaResourceId')), 'LIKE');

<?php

namespace App\Helpers;

use App\Models\LoveReaction;

class Love
{
    public function getRawReaction($reactant, $reacter, $reactionType)
    {
        $rawReaction = LoveReaction::where('reactant_id', $reactant->love_reactant_id)
        ->where('reacter_id', $reacter->love_reacter_id)
        ->where('reaction_type_id', config('love.reaction-types')[$reactionType])
        ->first();

        return $rawReaction;
    }
}

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class LoveReaction extends Model
{
    protected $table = 'love_reactions';
}

@antonkomarev I know this won't be super useful and would lend itself to a n+1 problem.. but this is the workaround I came up with to retrieve the raw reaction from the db table in order to expose the datetime of the reaction itself which is useful in my case
It would be nice if a future version could more easily expose/include the date of each reaction, possibly as a pivot value?
Also I hope the new query scopes you have a draft of can be added to the next release too : )
$rawReaction = (new Love)->getRawReaction($user, User::find(request('viaResourceId')), 'LIKE');

<?php

namespace App\Helpers;

use App\Models\LoveReaction;

class Love
{
    public function getRawReaction($reactant, $reacter, $reactionType)
    {
        $rawReaction = LoveReaction::where('reactant_id', $reactant->love_reactant_id)
        ->where('reacter_id', $reacter->love_reacter_id)
        ->where('reaction_type_id', config('love.reaction-types')[$reactionType])
        ->first();

        return $rawReaction;
    }
}

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class LoveReaction extends Model
{
    protected $table = 'love_reactions';
}

Thanks for sharing it @vesper8! I've just fixed terminology in 2nd code block to follow same naming convention with the package.

Thanks for sharing it @vesper8! I've just fixed terminology in 2nd code block to follow same naming convention with the package.

Thanks for the edit! I've edited the code in my project to reflect your changes too. I always struggle a bit whenever I try to wrap my mind around the terms reacterable and reactable.
Regarding Nova.. here's a code snippet that showcases how I'm showing the date on my user resource. It's not that clean but it works. As you can see I've adopted Laravel Love fully.. actually there are a few other reaction types not shown here that I'm using. I found the scopes so useful that I'm using it heavily as a replacement for setting up pivot tables
            Text::make('Date', function ($user) {
                $rawReaction = null;

                switch (request('viaRelationship')) {
                    case 'LikedUsers':
                        $rawReaction = (new Love)->getRawReaction($user, User::find(request('viaResourceId')), 'LIKE');
                    break;

                    case 'LikedByUsers':
                        $rawReaction = (new Love)->getRawReaction(User::find(request('viaResourceId')), $user, 'LIKE');
                    break;

                    case 'DislikedUsers':
                        $rawReaction = (new Love)->getRawReaction($user, User::find(request('viaResourceId')), 'DISLIKE');
                    break;

                    case 'DislikedByUsers':
                        $rawReaction = (new Love)->getRawReaction(User::find(request('viaResourceId')), $user, 'DISLIKE');
                    break;

                    case 'FavoritedUsers':
                        $rawReaction = (new Love)->getRawReaction($user, User::find(request('viaResourceId')), 'FAVORITE');
                    break;

                    case 'FavoritedByUsers':
                        $rawReaction = (new Love)->getRawReaction(User::find(request('viaResourceId')), $user, 'FAVORITE');
                    break;

                    case 'BlockedUsers':
                        $rawReaction = (new Love)->getRawReaction($user, User::find(request('viaResourceId')), 'BLOCK');
                    break;

                    case 'BlockedByUsers':
                        $rawReaction = (new Love)->getRawReaction(User::find(request('viaResourceId')), $user, 'BLOCK');
                    break;

                    default:
                        dd(sprintf('Unhandled viaRelationship %s', request('viaRelationship')));
                }

                if ($rawReaction) {
                    return (new Timezone)->convertToLocal($rawReaction->created_at);
                }

                // dd(request()->all(), $this->toArray());
                return 'n/a';
            }),

I'll open another issue for the date exposure

Thanks for the edit! I've edited the code in my project to reflect your changes too. I always struggle a bit whenever I try to wrap my mind around the terms reacterable and reactable.
Regarding Nova.. here's a code snippet that showcases how I'm showing the date on my user resource. It's not that clean but it works. As you can see I've adopted Laravel Love fully.. actually there are a few other reaction types not shown here that I'm using. I found the scopes so useful that I'm using it heavily as a replacement for setting up pivot tables
            Text::make('Date', function ($user) {
                $rawReaction = null;

                switch (request('viaRelationship')) {
                    case 'LikedUsers':
                        $rawReaction = (new Love)->getRawReaction($user, User::find(request('viaResourceId')), 'LIKE');
                    break;

                    case 'LikedByUsers':
                        $rawReaction = (new Love)->getRawReaction(User::find(request('viaResourceId')), $user, 'LIKE');
                    break;

                    case 'DislikedUsers':
                        $rawReaction = (new Love)->getRawReaction($user, User::find(request('viaResourceId')), 'DISLIKE');
                    break;

                    case 'DislikedByUsers':
                        $rawReaction = (new Love)->getRawReaction(User::find(request('viaResourceId')), $user, 'DISLIKE');
                    break;

                    case 'FavoritedUsers':
                        $rawReaction = (new Love)->getRawReaction($user, User::find(request('viaResourceId')), 'FAVORITE');
                    break;

                    case 'FavoritedByUsers':
                        $rawReaction = (new Love)->getRawReaction(User::find(request('viaResourceId')), $user, 'FAVORITE');
                    break;

                    case 'BlockedUsers':
                        $rawReaction = (new Love)->getRawReaction($user, User::find(request('viaResourceId')), 'BLOCK');
                    break;

                    case 'BlockedByUsers':
                        $rawReaction = (new Love)->getRawReaction(User::find(request('viaResourceId')), $user, 'BLOCK');
                    break;

                    default:
                        dd(sprintf('Unhandled viaRelationship %s', request('viaRelationship')));
                }

                if ($rawReaction) {
                    return (new Timezone)->convertToLocal($rawReaction->created_at);
                }

                // dd(request()->all(), $this->toArray());
                return 'n/a';
            }),

I'll open another issue for the date exposure


feat: Make it easier to specify target architecture

Create aliases build-arm run-arm build-riscv and run-riscv in
.cargo/config.toml. With these defined you can now use the alias which
will be converted to the full target name:

  cargo build-arm   -> cargo build --target thumbv8m.main-none-eabihf
  cargo run-arm     -> cargo run --target thumbv8m.main-none-eabihf
  cargo build-riscv -> cargo build --target riscv32imac-unknown-none-elf
  cargo run-risv    -> cargo run --target riscv32imac-unknown-none-elf

Append --release parameter to do release builds and runs. For example:

  cargo run-riscv --release ->
         cargo run --target riscv32imac-unknown-none-elf --release

feat: Make it easier to specify target architecture
Create aliases build-arm run-arm build-riscv and run-riscv in .cargo/config.toml. With these defined you can now use the alias which will be converted to the full target name:
cargo build-arm --bin blinky ->
cargo build --bin blinky --target=thumbv8m.main-none-eabihf
cargo run-arm --bin blinky ->
cargo run --bin blinky --target=thumbv8m.main-none-eabihf
cargo build-riscv --bin blinky ->
cargo build --bin blinky --target=riscv32imac-unknown-none-elf
cargo run-risv --bin blinky ->
cargo run --bin blinky --target=riscv32imac-unknown-none-elf
Append --release parameter to do release builds and runs. For example:
cargo run-risv --bin blinky --release ->
cargo run --bin blinky --target=thumbv8m.main-none-eabihf --release

Nice idea. Can you put these in the README too?

I'm not sure the extra aliases help with clarity. I was OK with the previous list of four:
build-arm = "build --target=thumbv8m.main-none-eabihf"
run-arm = "run --target=thumbv8m.main-none-eabihf"
build-riscv = "build --target=riscv32imac-unknown-none-elf"
run-riscv = "run --target=riscv32imac-unknown-none-elf"

Mainly because this saves you from typing the target name out in full.
Users are welcome to configure their personal projects however they wish. However, this is example code and a lengthy explaination of the short-form custom aliases (like rda) added here appears to me to detract from the purpose of helping them understand how to write and build code for RP2040 and RP2350.

I'm not sure the extra aliases help with clarity. I was OK with the previous list of four:
build-arm = "build --target=thumbv8m.main-none-eabihf"
run-arm = "run --target=thumbv8m.main-none-eabihf"
build-riscv = "build --target=riscv32imac-unknown-none-elf"
run-riscv = "run --target=riscv32imac-unknown-none-elf"

Mainly because this saves you from typing the target name out in full.
Users are welcome to configure their personal projects however they wish. However, this is example code and a lengthy explaination of the short-form custom aliases (like rda) added here appears to me to detract from the purpose of helping them understand how to write and build code for RP2040 and RP2350.

Makes sense, but how about adding rra and rrb? I think those are the most useful and provide a hint at customization a user could do.
Do you like the build-xxx or bld-xxx?

I prefer build-xxx.
I think cargo run-arm --release is fine and doesn't need a short-hand.

I prefer build-xxx.

SG

I think cargo run-arm --release is fine and doesn't need a short-hand.

Do you want me to keep rrr or delete that too?

Delete that one - cargo run-riscv --release is fine.

Bravo, txs @9names and @thejpster for all the help and guidance!


problem with webpack

Since the minified version contains Promise polyfill, it doesn't fit well with webpack (and I would tell browserify neither) :
import Push from "push.js"
The Push object contains Promise instead of Push constructor.
This can be fixed in the package.json : the main file should be push.js and not push.min.js which is the "standalone" version.

Should be a relatively quick and easy fix. I was actually considering removing the polyfill in a future version, as promises are decently supported and if users want to maintain support for older browsers they can use the polyfill separately. When I added the polyfill, I thought it would be a useful addition to the library, but seeing now how it is really only IE that lacks support for promises, it seems foolish to add all that extra weight. Anyway, like I said, this should be a quick fix and I'll open a PR for it as soon as I can :)

This problem should be resolved with cae24c6bde4928fe2d880f77c4c101d208ac29db. I removed the polyfill dependency and updated the main file in package.json.

please update npm package :)

Done :) Closing this issue for now


deepspeed support

🚀 Feature
DeepSpeed is a deep learning optimization library that makes distributed training and inference easy, efficient, and effective.
Links: https://github.com/microsoft/DeepSpeed
Motivation
No response
Pitch
No response
Alternatives
No response
Additional context
No response
Checklist

[X] I have checked that there is no similar issues in the repo
[X] I have read the documentation

added in #282


From cse to dse

This PR extends the symbolic engine in Devito. Besides a cleaner interface, the most important addition is the factorizer, a rewrite operator which gets applied right after CSE.
These are the flop reductions I got.
Problem: acoustic; each line is a different space order ([2->16, step=2]).
Rewriter: 28 --> 23 flops (Gain: 1.22 X)
Rewriter: 40 --> 30 flops (Gain: 1.33 X)
Rewriter: 52 --> 37 flops (Gain: 1.41 X)
Rewriter: 64 --> 44 flops (Gain: 1.45 X)
Rewriter: 76 --> 51 flops (Gain: 1.49 X)
Rewriter: 88 --> 58 flops (Gain: 1.52 X)
Rewriter: 100 --> 65 flops (Gain: 1.54 X)
Rewriter: 112 --> 72 flops (Gain: 1.56 X)

Problem: TTI; each line is a different space order ([2->6, step=2]).
Rewriter: 389 --> 327 flops (Gain: 1.19 X)
Rewriter: 935 --> 839 flops (Gain: 1.11 X)
Rewriter: 1783 --> 1667 flops (Gain: 1.07 X)

The gain dropping with TTI is due to CSE, which "hides" some factorisation opportunities. A way to work around this would consist of searching "across" different expressions and somehow rearranging the temporaries. This requires further thinking and some legwork, so it's not gonna be shipped with this PR.
Some new tests are introduced.
** EDIT ** :

run experiments to collect runtimes and understand how the roofline plots change : DONE (see comments below)
drop the "DROP BEFORE MERGE" commits : DONE

** EDIT ** : instead of having two PRs #152 and #154, we now only have #154 which is based on the old #152. Further, I'm introducing a commit ensuring that the generated code actually reflects what produced by the DSE (Sympy was unpicking the DSE's factorisations right before code generation following a simple xreplace...)

@mlange05 I've updated this PR (see main message above)
performance results still WIP, but now I think I have the right infrastructure to start collecting them.

Some flake8 fixes introduced. These hopefully will make the tests pass.

Performance results on a dual socket broadwell
acoustic_dim(1024,1024,1024)_so[2,4,6,8,10,12,14,16]_to[2].pdf
Also rebased on master. I'm now quite happy with this PR.
Any more thoughts @mlange05 @navjotk @mloubout ?

Pushed a tiny enhancement to benchmark.py
@mlange05 travis is now unhappy probably because some of your changes, as it fails to import opescibench

Yes, sorry, that was my fault. Fixed and rebased now.

Looks great, merging...


Make view.columns() functionality optional when creating a view

Environment
Knex version: 0.95.14
Database + version: PostgreSQL 13.4
OS: Windows10
Feature discussion / request
As a PostgreSQL user, I would like to be able to create such queries for views:
create view "users_view" as select "users".*, "user_roles"."role_code" from "users" inner join "user_roles" on "users"."user_id" = "user_roles"."user_id"
I could achieve it this with this code:
knex.schema.createView('users_view', (view) => {
    view.as(knex('users').join('user_roles', 'users.user_id', 'user_roles.user_id').select('users.*', 'user_roles.role_code'))
  })

But currently this doesn't work because I didn't use view.columns() functionality, so knex throws columns is not iterable error.
I edited the knex\lib\schema\viewcompiler.js file, changed part of createQuery code like this and everything worked as I wanted:
    const formatColumnsArr = [];
    for (const c of columns || []) {
      formatColumnsArr.push(
        columnize_(c, this.viewBuilder, this.client, this.bindingsHolder)
      );
    }
    const formatColumns = formatColumnsArr.length ? ' (' + formatColumnsArr.join(', ') + ')' : ''
    let sql = createStatement + this.viewName() + formatColumns;

I would be happy to provide a PR if this is something you would like.

I would be happy to provide a PR if this is something you would like.

Please do, views without columns are standard (it will be optional in the code).

@OlivierCavadenti when is this going to be released?

@thefoxie Would RC release work for you?

@kibertoad yeah sure :)

I'll publish 1.0.0-next1 tonight then.

Released in 1.0.1.


Avoid ZeroDivisionError in bytes_per_sec

I ran into a divide-by-zero error here in this CI job: https://github.com/jax-ml/jax_ml_stack/actions/runs/10495114319/job/29072878114?pr=7

Replaced by #1089


linux support

Project is open to contributors. I couldn't find official logitech g led sdk for linux.


[EROFS]: cleanup and introduce prefetch feature

What this PR does / why we need it:

Remove the global variables _target and _source, and introduce struct liberofs_file to wrap the source and target files.
Introduce prefetch feature.

The corresponding accelerated-container-image PR:
https://github.com/containerd/accelerated-container-image/pull/299
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
Please check the following list:

[ ]  Does the affected code have corresponding tests, e.g. unit test, E2E test?
[ ]  Does this change require a documentation update?
[ ]  Does this introduce breaking changes that would require an announcement or bumping the major version?
[ ]  Do all new files have an appropriate license header?

thanks


1555 add support for xml bodies in requestsresponses

Added documentation on how to integrate with scalaxb tool for XML serialization/deserialization.

Great description, thank you! I'm already using it in our project.


[Bug]: Slash command is not functional on JS editor

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
When the user uses a slash command inside JS editor the slash command suggestion is not displayed to user

Steps To Reproduce

Navigate to Js editor
Add slash command
and observe

Environment
Release
Version
Cloud

Not valid slash commands are not expected in the JS Editor


Please create a new release

please create a new release / tag including the latest commit 9473cd12e023b8a06a40f99a3f6b866701f71e78
Otherwise your package won't work any longer with Python 3.13.x
(module 'chunk' has gone there)

Sorry for delay. took a whlie to get head back into the code. Just been doing an upgrade to elementpath lib to make it worth it . should make us compatible with xpath3. was a bit iffy due to an iterator bug in the Text class. Should have a release together soon.

Hi @coldcoff  Sorry that was such a mission. API keys required now on pypi too :)
https://github.com/byteface/domonic/releases/tag/0.9.13
I have bagged and tagged an updated version. Please let me know how you get on. I haven't actually upgraded python myself yet and relying on the git worflow test runner.
Kind regards,


ueberzug previews overlap and hide keymap menu

What system are you running Yazi on?
Linux X11
What terminal are you running Yazi in?
st
Yazi version
yazi 0.2.3 (Arch Linux 2024-02-16)
Did you try the latest main branch to see if the problem got fixed?
Not tried, and I'll explain why below
Describe the bug
yazi has a really helpful menu for showing keymaps, similar to which-key in nvim. If I use ueberzug previews, then the image is display on top of the menu, hiding the keymaps.
Expected Behavior
Keymap menu is shown on top of the image.
To Reproduce

Open a directory with images and let yazi preview a portrail image.
Try slowly pressing keys to trigger the keymap menu.

The menu will be hidden by the image.
Configuration
No response
Anything else?
No response

Could you please record a GIF and let me see what happens?

Here's a screenshot.

This is how ueberzug works; it creates a new window that overlays the terminal window, so the terminal's content is covered because they are two separate windows.
It seems there's nothing Yazi can do here. If you want to avoid images covering content, use a terminal that natively supports any image protocol, such as kitty, sixel, or iTerm2.


issue about amp and rigid transform

thanks for this amazing work.
however, in the file 'openfold/utils/rigid_utils.py', I found some matrix multiplication is implemented in a strange way. For example,
return torch.stack(
    [
        r[..., 0, 0] * x + r[..., 0, 1] * y + r[..., 0, 2] * z,
        r[..., 1, 0] * x + r[..., 1, 1] * y + r[..., 1, 2] * z,
        r[..., 2, 0] * x + r[..., 2, 1] * y + r[..., 2, 2] * z,
    ],
    dim=-1,
)

why don't using the operator 'A@B'? if u want to disable amp, why not use 'with torch.cuda.amp.autocast(enabled=False):'? thanks.

Hi, I don't have a good answer. I borrowed the code from openfold which has it implemented like this. PhD life has led me to believe if it ain't broke then don't touch it. That said if there is an optimization or A@B is better then I see no reason why not.


Simple select Rendering fail after filter

After adding a filter in a grid DataProvider the SimpleSelectRender do not render the correct value.

That sounds pretty strange. There should not be any specific impact with filtering. That happens in data model level, and renderers are and should be generally unaware of any rendering. Also I found this. It is about the different renderer, but it is about last column, and yes filtering. So there is probably something common here.
https://github.com/vaadin/framework/issues/10359

I notced somethink else. Consider this senario,

I add a new dto to my DataProvider. The Dto has a field "year" with an empty string as  initial value .
A SimpleSelectRender with values 2017,2018,2019.

On initial display we will have the render showing 2017 and the dto underneath  it with value of an empty string. And this is a case were the render is inconsistent to the model.

That is a case which is not supported, i.e. that value set in data source and value set in selection being different. They must be the same. So in order to work in the case you mentioned, you would need to have empty value also added in set you put into SimpleSelectRenderer.

I already did.

And did it work after that?

Version 2.2.2 can be found in library. Thanks for noticing this issue.

thanx for responding so fast!


Fix regressions introduced in #1644 and #1657

//Cc @Maks3w

Good for me.
Just one more thing. @staabm Please add this deprecations to release notes

@Arkni can we get a unit test into this PR?

Sure!
I'll add them as soon as possible.

@staabm
Added the tests!

merged, thx!

@staabm
we forgot this:

Just one more thing. @staabm Please add this deprecations to release notes

Can you add it please ?


Unit Testing for Data Scientists - Hanna Torrence

Timestamps for the Youtube video with above title

0:00 - Introduction
1:08 - What is Unit Testing
2:06 - Benefits of Unit Testing


Potential fix for how pip installs headers used for custom ops.

Potential fix for how pip installs headers used for custom ops.

These headers were recently moved from site-packages/external into
site-packages/tensorflow/include/external. Need to update setup.py
to reflect that.

No idea what Im doing really. The eigen headers seemed to get moved around a ton. They get copied into like tensorflow/include/external/eigen_archive/Eigen... by some build pip script. Then setup.py moves them again directly into tensorflow/include/Eigen?

Anyways,  built the pip package locally and it looks good as far as I can tell.

Looks like CMake build is completely broken, and need this for 1.9. So going ahead and merging.


Fix session + Password recovery

Coverage increased (+0.005%) to 97.922% when pulling 6810bd89447c5e08e64bd8295ab50ac5bdd9b235 on develop into fd605118311b7ddd84d381baac9be186ded6238e on master.


RTL support, configurable fedmine

New features:

Theme can be installed as a redmine plugin and have configuration page which accepts custom logo
Fedmine now supports RTL direction and renders persian via Vazir font

Thanks for the contribution. I am merging the pull request


[Hoyolab]: Globalization support

Hello,
Hope to support hoyolab login in regions other than mainland China.
Thank you.

Tracks

[ ] #141

We are also constantly looking for developers to take this feature into the software. There isn't any international server player in the current dev team, which obstructs push in this plan.

要幫忙嗎？

Just open PR @solacens

Just open PR @solacens

容我先品一品，MSIX還真沒弄過

@solacens Hi, are you available recently?
We are going to tanslate our UI/UX onto several languages including zh-Hant
If you are interested in translating, you can click here to help us out.

Sure @Lightczx

For in-game notice:

Url

https://sg-hk4e-api.hoyoverse.com/common/hk4e_global/announcement/api/getAnnList

Query

game=hk4e&game_biz=hk4e_global&lang=zh-cn&announcement_version=1.21&auth_appid=announcement&bundle_id=hk4e_global&channel_id=1&level=55&platform=pc&region=os_usa&uid=100000000

Tested parameter in the query:

lang

zh-cn
zh-tw
en-us

region

os_usa
os_asia

Any api like getAnnContent ?

It's where we store the api spec.
ApiEndpoints
If there is someone interested in globalization, you can start from here.

@Lightczx 找下列一些hoyolab API,多是用python編寫,對做bot 好像有用,不知有沒有參考價值
原神 API : https://github.com/thesadru/genshin.py
hoyolab API: https://github.com/vermaysha/hoyolab-api
https://vermaysha.github.io/hoyolab-api/
Genshin-DB API : https://github.com/theBowja/genshin-db
國外有點名氣的Enka Network網站https://enka.network/
Enka Network API也有能調用hoyolab api項目: https://github.com/EnkaNetwork/API-docs
https://api.enka.network/#/api_chs

What we really need is the details of calling the international server API and also the response data structs.

I know some network packet capturing and APP decompilation，if you still need this, maybe I can help

What we really need is the details of calling the international server API and also the response data structs.

I know some network packet capturing and APP decompilation，if you still need this, maybe I can help

Just open PR

These are gained from the packets which are captured from Hoyolab website. I don't know how to request them correctly and always get a 403 response.

What fields do these requests have in Cookie header?

These are gained from the packets which are captured from Hoyolab website. I don't know how to request them correctly and always get a 403 response.

What fields do these requests have in Cookie header?

mi18nLang=zh-cn;
_MHYUUID=;
DEVICEFP_SEED_ID=;
DEVICEFP_SEED_TIME=;
_ga_HR3ZEH2708=;
ltoken=;
ltuid=;
_ga_1CHR121QPG=;
DEVICEFP=;
_gid=;
_ga_JRFG0HQ22J=;
_gat=1;
_ga_JTLS2F53NR=;
_ga=;
_gat_gtag_UA_206868027_11=

What fields do these requests have in Cookie header?

mi18nLang=zh-cn;
_MHYUUID=;
DEVICEFP_SEED_ID=;
DEVICEFP_SEED_TIME=;
_ga_HR3ZEH2708=;
ltoken=;
ltuid=;
_ga_1CHR121QPG=;
DEVICEFP=;
_gid=;
_ga_JRFG0HQ22J=;
_gat=1;
_ga_JTLS2F53NR=;
_ga=;
_gat_gtag_UA_206868027_11=

The items you need is ltoken and ltuid. In addition, you also need to pay attention to the request header information.

There is a field called DS presents in request header for getting abyss and characters data. Maybe improper DS value leads to a 403 forbbiden error. But how to caluculate DS?
GET /game_record/genshin/api/spiralAbyss?server=os_asia&role_id=100000000&schedule_type=1 HTTP/1.1
Host: bbs-api-os.hoyolab.com
Connection: keep-alive
sec-ch-ua: "Chromium";v="110", "Not A(Brand";v="24", "Microsoft Edge";v="110"
DS:<PHONE_NUMBER>,CFpnKz,0fa1b38f759f5e42c9e587035e421535
x-rpc-language: zh-cn
x-rpc-app_version: 1.5.0
sec-ch-ua-mobile: ?0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36 Edg/110.0.1587.63
Accept: application/json, text/plain, */*
x-rpc-client_type: 5
sec-ch-ua-platform: "Windows"
Origin: https://act.hoyolab.com
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://act.hoyolab.com/
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-US;q=0.7
Cookie:

Some apis don't require DS, I tried another api with only ltuid and ltoken in cookie and it works well.

GET https://api-os-takumi.hoyoverse.com/binding/api/getUserGameRolesByCookie
Query game_biz=hk4e_global

It returns game roles' uid in such format:
{
    "retcode": 0,
    "message": "OK",
    "data": {
        "list": [
            {
                "game_biz": "hk4e_global",
                "region": "os_usa",
                "game_uid": "100000000",
                "nickname": "",
                "level": 1,
                "is_chosen": false,
                "region_name": "America Server",
                "is_official": true
            },
        ]
    }
}

If you want to calculate DS for Web, you can find algorithm code in JavaScript. For android app, I'm trying to get key parameter，but there is still no progress

DS is not a problem, we known how to calc it.

Well, I successfully access those two API mentioned in https://github.com/DGP-Studio/Snap.Hutao/issues/144#issuecomment-1463846504
Here are the headers. It seems cookie fields ltuid, ltoken, cookie_token are enough, which can be obtained from www.hoyolab.com.
'Cookie': 'ltoken=; ltuid=; cookie_token=',
'x-rpc-app_version': '1.5.0',
'x-rpc-client_type': '4',
'x-rpc-language': 'en-us',
'DS': '1678518262,qweqaZ,fe6535dab71ae3478ce5b2871fc31fa0',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36'

#638


Improves handling of window resizes on vulkan (avoids crashes)

Sorry for taking so long to reply.
The vulkan spec dictates that on windows and linux/x11 the VkSurfaceCapabilitiesKHR::currentExtent (framebuffer), VkSurfaceCapabilitiesKHR::minImageExtent and VkSurfaceCapabilitiesKHR::maxImageExtent are always equal to the current size of the window. (On wayland, for example, minImageExtent and maxImageExtent are the true hardware capabilities and not the current window size)
I'm going to try to give a specific example to explain this change. Whenever a new frame arrives at bgfx::RenderContextVK::submit(), updateResolution() tries to see if the resolution of the previous rendered frame is the same as the new one. If it is, it doesn't recreate the swapchain, and vkAcquireNextImage() is called. If between the call to vkAcquireNextImage() and vkQueuePresentKHR() the window changes size, the vkQueuePresentKHR() will fail with VK_ERROR_OUT_OF_DATE and the acquired swapchain image will not be returned.
Once the next frame arrives, updateResolution() will once more check if the resolution of the previous frame matches the current frame. Now two things can happen:
1) if the resolution is different, the swapchain gets recreated and all is fine.
2) if the resolution is the same (since the WM_SIZE/CONFIGURE_NOTIFY message could still not have reached the API Thread (game thread)), no recreation of the swapchain is made and a new vkAcquireNextImage() will be performed, which will fail with a validation error because the previous image wasn't returned.
The code in this pull request just avoids making an invalid acquire.
Basically, if the m_resolution of the arriving bgfx::Frame doesn't cause the swapchain to be recreated, which will only happen when it matches the window size (currentExtent), no new frame can be rendered.
Would you prefer this piece of code to be inside updateResolution() which would return a bool and then return from submit() like in the renderer_d3d12.cpp (https://github.com/bkaradzic/bgfx/blob/74aae908cee40618f381668739f1f68bec996ee9/src/renderer_d3d12.cpp#L5801)?

Yes, change it to match D3D12.


 I can't make an application free just because I use its API.
Please kindly go away and stop wasting my time

Also SeroXen has been discontinued for months I couldn't have ratted this mod with it if I wanted to :skull:


Top Bar Dropdown Arrow Misaligned?

Using the dropdown menu in the .top-bar-right results in the dropdown arrows appearing to the left.
https://codepen.io/KnightYoshi/pen/gRNNbw

Here is the bug fix for the same acc to me
https://codepen.io/IamManchanda/pen/yoBqQE
@Knight-Yoshi Would you like to do a PR for the same ??

While padding is a little nicer, I don't think positioning to the left is ideal. The reason being is that it's inconsistent with how the left navigation behaves. The user could mistake it as a dropdown for the item before the actual dropdown menu item.

Hmmnnn... https://codepen.io/IamManchanda/pen/ayoMbK

That looks more appropriate! :)

So go for it :wink:

So, I think found the root cause. It's in _dropdown-menu.scss
This mixin:
@mixin zf-dropdown-left-right-arrows {
  > a::after {
    #{$global-right}: 14px;
  }

  &.opens-left > a::after {
    right: auto;
    left: 5px;
    @include css-triangle($dropdownmenu-arrow-size, $dropdownmenu-arrow-color, left);
  }

  &.opens-right > a::after {
    @include css-triangle($dropdownmenu-arrow-size, $dropdownmenu-arrow-color, right);
  }
}

I'm not too skilled with Sass (I know the basics), but I think this should be conditional. This can be the default behavior, but if the user changes the setting it should keep the arrows to the right.

The problem is the following:

DropdownMenu add .opens-left on all its li if they have align-right or are inside any parent with.top-bar-right ( 😞  ). See js/foundation.dropdownMenu.js:L53.
Dropdown links inside a menu (.dropdown.menu.vertical > li > a 😷 ) have a padding on the right to leave place to their carret.
These carrets (pseudo-element positioned as absolute 🤢 ) can be on the left or the right following the .opens-left and  .opens-right classes, but the link padding does not change.

So you have two solutions:
1. Bug fix: You make the link padding conditional to .opens-left / .opens-right.
2. Minor design change: You remove the "Dropdown always open on the left inside .top-bar-right" feature. This still require 1. This is a breaking change.
3. Major design change: You remove the "Dropdown carret on the left" feature. This is a breaking change.
You all already know the opinion I have of these "automatic" (read uncontrollable) features. I think 1 should be applied anywhere. I leave you to decide what you want about 2 and 3.

@ncoden how should we decide here?


importlib_metadata.version("torch") does not work

Hi!
I am able to run the backend of dml (beside the already mentioned aten implementation gap)
But when I try to use the huggingface transformers it fails since the importlib_metadata.version("torch") does not work and the huggingface backend check fails. Can you confirm this behavior?

Hi @Pet222, thanks for reporting this behavior. Can you provide a minimal repro python script for us to test?

Hi @Pet222, this is expected, because we renamed the package to pytorch-directml, so you'll need to change that to importlib_metadata.version("pytorch-directml")

The package is called pytorch-directml, but still provides the module "torch".  If import torch works, shouldn't importlib_metadata.version("torch") also?
Huggingface uses importlib.metadata to determine the version of torch after correctly finding that torch is importable with pytorch-dml installed.  Came here thinking this would be the place to fix this, (pytorch-directml package providing additional metadata for "torch" version on sys.path or sth like that), rather than having huggingface (and probably many other projects) check for any of several different package names providing the torch module.

Hi @Pet222 and @compwiztobe, torch-directml has moved to a plugin model. The plugin model resolved many of the dependency issues that could cause issues like you saw above. Check out the latest release here: torch-directml.
Please take a look and reactivate if you still face any issues using torch.nn with DirectML.
Thanks!

sounds great. Honestly I stopped using torch-directML since a lot of implementation was missing back than (eg ATEN) and now I have nvidia GPU so I can directly use it with pytorch....Therefore I will not set up the environment again to confirm this so closing this ticket is fine on my end (assuming a test is now implemented in torch-directML CI for this "importlib_metadata.version("torch")" and it passes.


term request: starch granule initiation

term:starch granule initiation
definition:The sequence of events that initiates (or primes) the synthesis of semi-crystalline starch granules within photosynthetic chloroplasts or non-photosynthetic amyloplasts.
suggested parentage: is a GO:0019252 starch biosynthetic process
Reference(s):Seung et al. 2017; doi: 10.1105/tpc.17.00222
Term suggested by a user trying to annotate MFP1 (At3g16000) and MRC (At4g32190),  PTST2 (At1g27070) and PTST3 (At5g03420)

PMID:28684429


Fix race condition

(See the guidelines for contributing, linked above)

Could we make use of NIO2 once we move to java8?

Does NIO2 have this functionality?
NIO does in jdk7, but it doesn't work on Mac. In Play we use NIO on Windows and Linux and jnotify/polling on Mac. See https://github.com/playframework/play-file-watch/blob/master/src/main/scala/play/dev/filewatch/FileWatchService.scala#L67

Does monix's nio address this?
https://github.com/monix/monix-nio
@radusw ping?

@hepin1989 It will pretty soon. Currently we have this PR: https://github.com/monix/monix-nio/pull/16 by @hmemcpy ( an example: https://twitter.com/hmemcpy/status/844521638431526918 )

I'm temporarily closing this pending further investigation. I think there might be a better fix


Flat buffer seems to be unable to handle truncated correctly

Hi,  thanks for this excellent work.
If I understand correctly, the current implementation in gym_dqn_example seems to overlook the handling of truncated.
For instance, if the environment reaches the max number of steps and does not terminate, that is terminated=False and trunracted=True.
At this truncated timestep, next_observation shoule be retained for calculating the target_q in that the environment has not terminated, next_observation is meaningful.
But in the flat buffer, this truncated timestamp is immediately followed by the first timestep since auto_reset.
This means that when the truncated timestep is sampled from the buffer as batch.experience.first,  the first timestep serves as batch.experience.second.
This will cause incorrect calculation of
target_q = reward + discount * gamma * batch.experience.second.observation

Hello, great catch! Yeah so this is definitely an issue. When I was writing the gym dqn example, I was very much only considering the non-truncated case. The example is more of a simple implementation to demonstrate how one might use the buffer. To handle truncation, one would most likely have to change the auto-reset wrapper or perhaps change how they format the timestep object. I will try think of a simple fix and implement the changes when I have time. Thanks for the help!

Greatly thanks for the reply and example. Looking forward to the popularity of this project.


[CSL-721] Write some clarifying comments about 'AsBinary'

Well, I was more lucky, builds in my PR passed and in yours they timed out :)


Christoc90/https://svn.github.com/octocat/Hello-World/Jwilson.0323.test

#7183
#7181
#7178
#7023
#7023
@Christoc90

2nd spam attempt - might be worth someone in square blocking if it continues.

Blocked for 30 days.


Not working in iOS 13.3.2

Not working on iOS 13.3.2 or higher but works on 13.3.1.

Dear @oveappnap,
I've been publishing the version 4.0.1. Could you test test it and give me a more detailed feed back in case of failure?

I've been publishing the version 4.0.2. Could you test test it and give me a more detailed feed back in case of failure?


can this demo do the job auto connect to a certain known wifi spot.

Maybe you need this: https://m.weibo.cn/3321824014/4220285768470276.


Fix over synchronization of epoll

Fixes #3944.
The clock used by epoll is now per event generated, rather than by the epoll's ready_list.
The same epoll tests that existed before are unchanged and still pass. Also the tokio test case we had worked on last week still passes with this change.
This change does beg the question of how the epoll event states should change. Perhaps rather than expose public crate bool fields, so setters should be provided that include a clock parameter or an optional clock parameter. Also should all the epoll event possibilities have their clock sync tested the way these commit lay out testing. In this first go around, only the pipe's EPOLLIN is tested. The EPOLLOUT might deserve testing too, as would the eventfd. Any future source of epoll events would also fit into that category.

This left as a draft for at least two reasons. There is an open question why the fix doesn't work for the test case as it was outlined in the issue. That open question is explained in the test cases.
Then there are some field names that can be simplified, to conform to existing names, but while working on this file, I prefer having field names that are unique so it is easy to move around the file based on where those fields are used.
I guess a third reason. Before final review, the open test question will have been resolved and the tests will likely be reduced.

I wonder if the problem I’m seeing is cause by my assumption that the source thread should have its clock incremented just once. The one time is to be part of the happens-before relationship between this thread and any thread receiving the event. But to create a happens after clock, the clock could simply be incremented one more time as part of the cleanup to creating one or more epoll events. Then my tests would pass as expected and the question I had is solved.

I have found a way to fix the problem I was seeing. It involves incrementing the clock twice when the pipe's buffer is being written to. Once to prepare the clock for the happens-before relationship. And once again to represent a happens-after relationship for writes by the same thread that happen after this write. If the write to the global static also updated the clock on its own, this probably wouldn't be necessary.
This begs new questions.
Should the pipe's read side also be epoll-able? Right now there is no such event created.
And does the eventfd, which also supports epoll, suffer from this problem of syncing clocks through epoll but then not advancing the clock, thereby keeping UB with static global writes afterwards from being detected?

Should the pipe's read side also be epoll-able? Right now there is no such event created.

Both ends are already epoll-able, I think.

Let's fix https://github.com/rust-lang/miri/issues/3947 (in a different PR) before attempting this.

:umbrella: The latest upstream changes (presumably #3951) made this pull request unmergeable. Please resolve the merge conflicts.

The clock field could also be an Option. Maybe less work when clocks aren't enabled.

Default clocks are trivial, so no that shouldn't be necessary, and I don't think it helps the code either.

Not sure what the status here is, so
@rustbot author

Not sure what the status here is, so
@rustbot author

I'm not familiar with this step. Am I the author being asked for the status or is this for a maintainer?
It's marked ready for review. It has a test for before and a test for after showing the improvement. Is there something else for me to do?

Sorry, I should have explained - If it is ready for review, you are expected to do
@rustbot ready

@rustbot author

@rustbot ready

Looks great, thanks!
@bors r+

:pushpin: Commit 4e4af8d8ef43f6b1e164f4d77ddb3f3a9d530f80 has been approved by RalfJung
It is now in the queue for this repository.

:hourglass: Testing commit 4e4af8d8ef43f6b1e164f4d77ddb3f3a9d530f80 with merge e0bd116b70bfab4146edca8ce46fb7cf40f656ec...

:sunny: Test successful - checks-actions
Approved by: RalfJung
Pushing e0bd116b70bfab4146edca8ce46fb7cf40f656ec to master...


Wrong package name in README for scoped packages

Unfortunately running this on a scoped package uses a wrong package name in the README, e.g. package name @foo/bla-blubb would be converted to foo.

pr?


Provide spec in non-proprietary format

The page https://oasis-open.github.io/cti-documentation/ says:

Read the Latest Specification! (2.0 CSD 1)

Unfortunately, the link goes to a Google Doc, which is not readable without the user executing (and trusting) proprietary JavaScript. This makes the specification inaccessible to users who are, due to security requirements or resource constraints, etc, unwilling or unable to do that.
As the rest of the site seems to be being collaboratively edited here on GitHub, the use of Google Docs seems anomalous and unnecessary, especially given that the spec is the most important document on the site. Please can the spec instead be stored using a lightweight markup language, such as one of the ones supported by GitHub, and published as HTML?
(N.B. All of those lightweight markup languages can be exported to PDF or ODT, etc, if necessary for print publication or suchlike, using Pandoc or other tools.)

The CTI technical committee (which developers the specification) has, for now, chosen to use Google Docs to do our specification development and editing because it provides the collaborative editing features that let us all get on a call and edit the document live.
We do recognize that people might not want to go to Google Docs to review the specification or, certainly, to read it once it's finished. Once the specification is published (it's currently under ballot) it will be published in raw HTML, PDF, and .docx on oasis-open.org and that link will be updated. In the meantime, you can also access a .docx instance here: https://www.oasis-open.org/committees/download.php/61074/stix-v2.0-wd03.zip.
I'll leave this issue open until we're able to link to the HTML.

@johnwunder wrote:

We do recognize that people might not want to go to Google Docs to review the specification or, certainly, to read it once it's finished. Once the specification is published (it's currently under ballot) it will be published in raw HTML, PDF, and .docx on oasis-open.org and that link will be updated. In the meantime, you can also access a .docx instance here: https://www.oasis-open.org/committees/download.php/61074/stix-v2.0-wd03.zip.

For people who want to review the spec before it is finalised, a better option would be if you could:

use Google Docs's "publish" feature to provide an automatically-updated HTML rendering of the document, and;
provide a link to that rendering's URL (e.g. with link text "View as HTML") alongside the link mentioned in my opening comment above.

I'll leave this issue open until we're able to link to the HTML.

:thumbsup:

@sampablokuper Very cool! I didn't know about that feature in Google Docs. It's good to see that changes made in the document are automatically updated in the published version (unless you explicitly turn off the updating).
There is some minimal JavaScript on the resulting page, but disabling it does not appear to affect the rendered content.

@gtback thanks. Glad it is working for you.
Any chance you could edit your index.md to add links to the Google Docs-generated HTML versions of both the STIX and TAXI specs, so that others are also able to benefit?

Yeah that's a great idea. @gtback @ATweedMITRE here are the links, can you get them posted? We may need some kind of landing page or new call-out box on the homepage to point to all 5? Not sure of the best way of doing that.
Part 5: https://docs.google.com/document/d/1nK1RXcE2aMvQoG1Kgr3aTBtHZ1IyehzOk7vU0n5FUGY/pub
Part 4: https://docs.google.com/document/d/167aIyr5BIAJJORzjT11U25cGSBJ0cBNSdkheNJFz6l8/pub
Part 3: https://docs.google.com/document/d/1ti4Ei_ii_Uc4izHNZlYmBP9NgD5-iVWC--y-3HmGZyg/pub
Part 2: https://docs.google.com/document/d/1IvkLxg_tCnICsatu2lyxKmWmh1gY2h8HUNssKIE-UIA/pub
Part 1: https://docs.google.com/document/d/1dIrh1Lp3KAjEMm8o2VzAmuV0Peu-jt9aAh1IHrjAroM/pub

This was addressed in 7852ada.

@clenk wrote:

This was addressed in 7852ada.

Thanks! Any chance you could do something similar for the TAXII spec as well? (I.e. in the other column on this page.)

@johnwunder can you "publish" the TAXII spec? I don't have permissions on that document

This is the TAXII spec: https://docs.google.com/document/d/1Jv9ICjUNZrOnwUXtenB1QcnBLO35RnjQcJLsa1mGSkI/pub

This was addressed for the TAXII spec in 73c0fa5.

@sampablokuper , I think this is done, but let us know if we missed anything. Thanks!


2fa invalid when reauthenticating

I get an error saying my 2fa is invalid when trying to reauthenticate my account.

Same for me, unable to relogin....

Dupe #1617


#574: fixed getParentPath method

Closes #574

Pull Request Test Coverage Report for Build<PHONE_NUMBER>7
Details

0 of 0   changed or added relevant lines in 0 files are covered.
89 unchanged lines in 1 file lost coverage.
Overall coverage increased (+0.01%) to 65.636%

Files with Coverage Reduction
New Missed Lines
%

com/devonfw/tools/ide/context/AbstractIdeContext.java
89
60.48%

Totals

Change from base Build<PHONE_NUMBER>1:
0.01%

Covered Lines:
5936

Relevant Lines:
8718

💛  - Coveralls


Adding publish workflow file to allow publishing via actions

Summary
Disables publishing from @release-it-plugin/workspaces, instead allowing us to publish via a workflow. This enables us to publish via the secrets.NPM_TOKEN, ensuring we don't have to manage secrets locally.

ready to test?

ready to test?

Yes, but it's a two part publish. We use release-it to generate the changelog, tag, bump deps etc. And we use this workflow to do the NPM publish step, simply so that we can avoid worrying about tokens etc.


How to create highcharts-maps with angular?

I want to create a China map by angular and highchart. Though I tried to any way, the map still doesn't work, Then I tired to run the demo in "highcharts-ng-master\example\maps", it reported  "Uncaught TypeError: Cannot set property 'custom/world' of undefined".
The js I imported are as follows:
src="standalone-framework.js">[From url "http://code.highcharts.com/adapters/standalone-framework.js"]
src="highcharts.js"  [From url "http://code.highcharts.com/highcharts.js"]
src="map.js"[From url "http://code.highcharts.com/maps/modules/map.js"]
src="world.js" [From url "http://code.highcharts.com/mapdata/custom/world.js"]
src="angular.js"[From url "https://ajax.googleapis.com/ajax/libs/angularjs/1.2.28/angular.min.js"]
src="highcharts-ng.js" [From zip file I downloaded]
src="app.js"  [From zip file I downloaded]
The other codes are all the same in highcharts-ng-master
Can someone help me? It's urgency issue  =-=

I found the reason, it was caused by the conflict with file "hgihcharts.js" and "highmaps.js", how can I fix it?

Did you figured the problem out? I have the same problem.

Hello,
Sorry, I still face this problem and not fix it. After investigating, it may be caused by the codes 'Highcharts.maps["custom/world"] ={...}' in js "world.js", but I'm not sure.
I think I need do some more investigating. =-=, do you have some suggestions?

The demo seems to work ok for me: http://rawgit.com/pablojim/highcharts-ng/master/example/maps/example.html

The demo seems to work ok for me: http://rawgit.com/pablojim/highcharts-ng/master/example/maps/example.html

For the next people landing here:
AFAIK, highmaps.js is the standalone version of the map charts. To display a map, you have then 2 possibilities:

Include highmaps.js and world.js (or any map data)
Include highcharts.js, maps.js (module) and world.js

@cyril-blanco Thanks. Can you please share any sample code in JSFiddle since example code does not work.

Check the previous version, it works: http://rawgit.com/pablojim/highcharts-ng/0.0.13/example/maps/example.html
@pablojim It looks like the exemples are broken in the latest tag/master
I'm sorry I don't have this code anymore, couldn't keep it. But I don't remember having issues with the loading of ng-highcharts/maps: my map wasn't displaying because I was using flexbox and one of the div wasn't properly styled (I think I commented on another issue about this)


SBT doesn't recompile code when referenced case class signature changes

steps

Define case class which has parameters with default values

a.scala
case class A(
  name: String,
  property1: String = ""
)

Create instance of the class (separate file)

main.scala
object main {
	def main(args: Array[String]) {
		println(A("Using defaults"))
        }
}

Run the application (sbt run). Sbt will compile both classes and everything will work fine.

Now change class A to look like this:

case class A(
  name: String,
  property1: String = "",
  property2: String = ""
)

Run the application (sbt run)

SBT output:
[info] Compiling 1 Scala source to /tmp/test/target/scala-2.12/classes ...

info] Running main
[error] (run-main-0) java.lang.NoSuchMethodError: A.<init>(Ljava/lang/String;Ljava/lang/String;)V
[error] java.lang.NoSuchMethodError: A.<init>(Ljava/lang/String;Ljava/lang/String;)V
[error] 	at main$.main(main.scala:3)
[error] 	at main.main(main.scala)
[error] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] 	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
[error] Nonzero exit code: 1
[error] (Compile / run) Nonzero exit code: 1
[error] Total time: 2 s, completed Aug 10, 2018, 4:54:12 PM

problem
Program crashes in runtime with NoSuchMethodError exception.
expectation
SBT should recompile both sources (a.scala and main.scala) since case class signature changed (since default params are syntactic sugar only)
notes
The problem seems to be that sbt recompiled just the "a.scala", while it also should recompile main.scala (since default params are just syntactic sugar - and signature  of the apply method changes)
sbt version: 1.2.1 (but I reproduced it with 1.1.4 as well)
I created a script to reproduce the bug in the repo (reproduce.sh)
https://github.com/mszygenda/sbt-case-class-recompilation-issue

I'm aware of this error. It's solely due to the default arguments and I had a reproduction somewhere in my disk. I'll try to fix it in Zinc over the weekend.

@mszygenda Thanks for the detailed bug report with repro project!
I also feel like this has come up in a discussion before. If I remember correctly @smarter mentioned that Dotty includes the hash of default value into the API info.

@jvican Should this issue be moved to the sbt/zinc repo ?

I guess this should actually be closed since https://github.com/sbt/zinc/pull/572 was merged, though it seems this hasn't made it to any released version of sbt yet.