Skip to content
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

flakes: incorrectly rejects valid Git branch/tag names #3612

Closed
emilazy opened this issue May 23, 2020 · 2 comments · Fixed by #3642
Closed

flakes: incorrectly rejects valid Git branch/tag names #3612

emilazy opened this issue May 23, 2020 · 2 comments · Fixed by #3642

Comments

@emilazy
Copy link
Member

emilazy commented May 23, 2020

Describe the bug

Nix on the flakes branch incorrectly rejects Git ref names with / in them.

Steps to reproduce

emily@renko ~> nix build --no-link 'github:NixOS/nixpkgs?ref=pull/88692/head'#pkgsMusl.libusb1
error: GitHub URL 'github:NixOS/nixpkgs?ref=pull/88692/head#pkgsMusl.libusb1' contains an invalid branch/tag name

Expected behaviour

Nix should accept everything the GitHub API/git fetch does; https://api.github.com/repos/NixOS/nixpkgs/commits/pull/88692/head works, so this should too.

@bqv
Copy link
Contributor

bqv commented Jun 1, 2020

It's fairly obvious why this bug came to be, is the intention to fix it or leave it as a known limitation? As I see it, solving it may end up overcomplicating some grammars but it is slightly unacceptable.

@jbaum98
Copy link
Contributor

jbaum98 commented Aug 6, 2020

I think there's been a regression here:

$ ./result/bin/nix build --no-link 'github:NixOS/nixpkgs?ref=pull/88692/head'#pkgsMusl.libusb1
error: --- BadURL ------------------------------------------------ nix
URL 'github:NixOS/nixpkgs?ref=pull/88692/head#pkgsMusl.libusb1' contains an invalid branch/tag name

$ ./result/bin/nix --version
nix (Nix) 3.0pre20200806_6146447

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants