-
-
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
fetchGit can't handle annotated tags #3701
Comments
It looks like you can fix this error by using |
Separate arguments would be a pain considering how developers use this. For example in our repo we have a JSON file that specifies the version of a library for our application that is bundled into it at build time. Developers usually use branches or sometimes specific commits, while stable builds use tags. If there were separate arguments we'd need automation to detect which is which. Pretty sure we're not the only ones that do this. |
Using separate arguments could also be a royal pain for something like yarn2nix which we use. |
I assume this isn't backported to Nix 2.3? IIRC
Well, one could change the logic of the Lines 353 to 356 in 839f0fe
However I think that theremarks @jakubgs brought up are quite reasonable. If we add those arguments those should be "translated" to "refs/{heads,tags}/foo" in the [1] nix/src/libexpr/primops/fetchTree.cc Lines 234 to 237 in 839f0fe
|
I marked this as stale due to inactivity. → More info |
As far as I know this is still an issue. |
I marked this as stale due to inactivity. → More info |
Nope. |
I marked this as stale due to inactivity. → More info |
Still a regression. |
See #6766 |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/git-tags-in-flakes-inputs/25511/2 |
This is a painful paper-cut, especially combined with the proclivity of Nix to ignore any problems with inputs. It will silently fail to do the weird "shallow-semi-automated-update" and just move on with the old lock file content. |
Description
Currently
builtins.fetchGit
does not seem to handle annotated tags and fails with:Reproduction
You can see me reproduce this in status-im/status-mobile#10825.
Docs
This was reported once in #2385 and a fix for docs was applied in ae244af by adding:
To documentation of
builtins.fetchGit
, but that change does not seem to be there in current docs:https://nixos.org/nix/manual/#ssec-builtins
And there doesn't appear to be any fix in sight.
Solutions
If the fix is difficult to implement for
builtins.fetchGit
could we at least update the documentation with this information and makefetchGit
return an error that actually makes sense instead of thistrying to write non-commit object
nonsense?The text was updated successfully, but these errors were encountered: