-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
tree-wide: convert rust with git deps to importCargoLock #221716
Conversation
0319eccab39512bf55afa1536515c21134a1dbd0 should explain why, at least in the commit message, as it does technically work. I assume you just want to discourage its use? |
Well, with cargo 1.68 and above we can not rely on it being reproducible with git dependencies, as there is extended logic involved now which might change in future versions, so we would have to regenerate the FOD hashes on every update. The assumption is that |
Please re-read my comment -- that's exactly what I'm trying to say; it technically works, but we don't want anyone to actually use it. This should be made more clear, at least in the commit message, IMO. |
There are several lockfiles committed without a corresponding nix package change? e.g: squeekboard/Cargo.lock |
Nixpkgs size increase of this PR is ~5% before compression, ~6% after compression.
|
good find, these should be fixed now |
I have run nix-review to ensure that everything still builds. These packages are already broken on master: fedigroups, habitat |
Should I move the jumpy changes to #221921? Didn't see it when I was updating jumpy, sorry |
oh cool that will work too |
@@ -76,6 +76,17 @@ in stdenv.mkDerivation ({ | |||
# Override the `http.cainfo` option usually specified in `.cargo/config`. | |||
export CARGO_HTTP_CAINFO=${cacert}/etc/ssl/certs/ca-bundle.crt | |||
|
|||
if grep --pcre2 '^source = "(?!registry)' Cargo.lock; then |
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.
grep: unrecognized option '--pcre2'
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.
perhaps we can just do ^source = "git\+
since we don't really know how to deal with non-git deps anyway?
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.
That was my alias grep=rg
in my environment 😅
The reason is that we can not expect the extended logic run on git dependencies starting from Cargo 1.68 to be reproducible in future versions, and thus the output hash would not be sufficiently stable. rust-lang/cargo#11414
Noticed a spike averaging ~6.5 seconds in eval times at nixpkgs. On bisecting found: Preceding commit to this PR:
At this PR:
Command used for testing:
|
Also around 10GB of RAM on x86_64-linux. Haven't compared what we had before. |
OfBorg also found a much bigger evaluation performance difference than we were expecting from Winter's research: https://github.com/NixOS/nixpkgs/runs/12279178729 |
@yu-re-ka apologies if this has been answered somewhere, but is there a reason for not using Cargo.lock from |
I think I've found answer,
|
Description of changes
Less invasive alternative to #217084
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)