-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
treewide: switch to cargoHash #327127
treewide: switch to cargoHash #327127
Conversation
I think we could quite tractably automate this treewide: hook into |
Looking at the history of some of them shows that they had git dependency's at some point but did not switch away from vendoring Cargo.lock files after those where no longer included. |
I don't mind either way for my package, but shouldn't we wait for consensus on #327063 before? |
I believe we've never made consensus on "regular rust packages should also use Cargo.lock" (no git dependencies, no cargo lock hacks), it is always considered as an anti-pattern |
Was it always? For a while I thought |
https://nixos.org/manual/nixpkgs/unstable/#rust As the documentation shows, using |
Yes. Otherwise we would have replaced all cargo hashes already. The size of the lock files was always a concern. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As maintainer for nickel
, I'm good with the change. Similar to the other cases, it was only introduced due to git dependencies upstream which aren't required anymore:
https://github.com/NixOS/nixpkgs/pull/255266/files#r1327205689
Welp, I might have given to much importance to some random messages on the Nixpkgs issue tracker, then. But if that's the case, I do think it's worth updating the documentation. I do see |
Be my guest. |
Description of changes
No need (observed) for these packages to have a vendor Cargo.lock. If they for some reason have to use a different Cargo.lock than upstream, they should copy that to the build directory as well, otherwise the build will fail. They don't, so I infer there's no reason to use Cargo.lock.
Related #327063
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.