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
nix search
throws incorrect error about empty regex for many inputs
#3047
Comments
I did some digging and it looks like you're using C++11 regexes, and this exception is actually coming from libc++ on Darwin. Also, curiously, the use of Given the desire to use extended regexes, and the fact that libc++ seems to have bugs with this syntax, While we're at it, I'd also recommend adding in the "enhanced" flag, because we don't need portable regexes here (and if you want portable you can still just use the non-enhanced subset). |
Interestingly, |
I marked this as stale due to inactivity. → More info |
I closed this issue due to inactivity. → More info |
When I run
nix search
with anything beyond the absolute most basic args, it tends to throw an error saying "An empty regex is not allowed in the POSIX grammar". This is extremely bizarre as my input is not empty.Here are some failing examples:
nix search '\youtube'
nix search '(?:jazzy)'
nix search 'foo(?i)bar'
All of these are valid regular expressions and should be accepted.
The first example is rather curious because putting a
\y
anywhere else works, and the leading slash works if it's actually escaping a magic char (like\.foo
), it's only when there's a leading slash followed by a non-magic character that it gives this bogus error."x86_64-darwin"
Darwin 18.7.0, macOS 10.14.6
no
no
nix-env (Nix) 2.2.2
"nixpkgs-19.09pre186574.88d9f776091"
/Users/eridius/.nix-defexpr/channels/nixpkgs
The text was updated successfully, but these errors were encountered: