-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
the empty string is only a valid regex when built with libstdc++ and not with libc++ #7208
Labels
Comments
13 tasks
I also encountered this issue (when struggling with https://github.com/nix-community/home-manager/blob/master/modules/services/gpg-agent.nix#L51). Consisteny between platforms should be important for Nix. Since libc++ and libstdc++ are not consistent, maybe we can
|
SharzyL
added a commit
to SharzyL/home-manager
that referenced
this issue
May 14, 2024
`splitString "" "some string"` would throw exception `error: invalid regular expression` on Darwin (or accurately, on Nix built against libc++). Refer to NixOS/nix#7208 for details. Before Nix handles that issue correctly, we should refrain from using `splitString ""`, and luckliy `lib.stringAsChars` can do the same thing.
6 tasks
SharzyL
added a commit
to SharzyL/home-manager
that referenced
this issue
May 28, 2024
`splitString "" "some string"` would throw exception `error: invalid regular expression` on Darwin (or accurately, on Nix built against libc++). Refer to NixOS/nix#7208 for details. Before Nix handles that issue correctly, we should refrain from using `splitString ""`, and luckliy `lib.stringAsChars` can do the same thing.
rycee
pushed a commit
to nix-community/home-manager
that referenced
this issue
May 28, 2024
`splitString "" "some string"` would throw exception `error: invalid regular expression` on Darwin (or accurately, on Nix built against libc++). Refer to NixOS/nix#7208 for details. Before Nix handles that issue correctly, we should refrain from using `splitString ""`, and luckliy `lib.stringAsChars` can do the same thing.
pasqui23
pushed a commit
to pasqui23/home-manager
that referenced
this issue
Jun 3, 2024
`splitString "" "some string"` would throw exception `error: invalid regular expression` on Darwin (or accurately, on Nix built against libc++). Refer to NixOS/nix#7208 for details. Before Nix handles that issue correctly, we should refrain from using `splitString ""`, and luckliy `lib.stringAsChars` can do the same thing.
Mikilio
pushed a commit
to Mikilio/home-manager
that referenced
this issue
Oct 10, 2024
`splitString "" "some string"` would throw exception `error: invalid regular expression` on Darwin (or accurately, on Nix built against libc++). Refer to NixOS/nix#7208 for details. Before Nix handles that issue correctly, we should refrain from using `splitString ""`, and luckliy `lib.stringAsChars` can do the same thing.
Noodlez1232
pushed a commit
to Noodlez1232/home-manager
that referenced
this issue
Nov 21, 2024
`splitString "" "some string"` would throw exception `error: invalid regular expression` on Darwin (or accurately, on Nix built against libc++). Refer to NixOS/nix#7208 for details. Before Nix handles that issue correctly, we should refrain from using `splitString ""`, and luckliy `lib.stringAsChars` can do the same thing.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
builtins.match "" ""
evaluates only on linux and on darwin. This seems silly but leads to problems, see NixOS/nixpkgs#177273 (comment)Steps To Reproduce
nix repl
builtins.match "" ""
[]
on linux anderror: invalid regular expression ''
on darwinExpected behavior
Same behavior. An error is probably a better idea but I wonder for backward compatibility. The issue I link suggests such an abuse in nixpkgs would have been noticed, so the worry about backward compat is only for other code bases.
nix-env --version
outputnix-env (Nix) 2.8.1
Additional context
NixOS/nixpkgs#197374
The text was updated successfully, but these errors were encountered: