treewide: migrate to fetchCargoVendor, batch 1#376038
Conversation
19af02a to
7615235
Compare
|
This is obviously very prone to merge conflicts. When merge conflicts appear, I'll just drop them from this patch and we can revisit them in a future one. |
Cargo 1.84.0 seems to have changed the output format of cargo vendor again, once again invalidating fetchCargoTarball FOD hashes. It's time to fix this once and for all, switching across the board to fetchCargoVendor, which is not dependent on cargo vendor's output format. It should be possible to reproduce this diff. To do so, get the list of files changed by this commit, e.g. with git diff --name-only, then run the following two commands, each with that list of files as their standard input: xargs sed -i 's/^\(. *\)\(cargoHash\)\b/\1useFetchCargoVendor = true;\n\1cargoHash/' cut -d / -f 4 | xargs -n 1 nix-update --version=skip This will take a long time. It might be possible to parallelize it using xargs' -P option. I haven't tested it.
7615235 to
63bff8c
Compare
|
The script is eminently reasonable and trivial to review; thank you. Planning a reproduction attempt on
(and actually I don’t have time to dedicate to babysitting the process right now but I wanted to record my steps for when I do tomorrow or something; it has at least successfully bumped a few hashes that match the commit) |
|
Huh, didn't expect cargo to "break" its own implementation this quick after btw, is there / will there be a tracking issue for discoverability for out-of-tree consumers of nixpkgs? |
|
There will be a deprecation of fetchCargoTarball. |
Cargo 1.84.0 seems to have changed the output format of cargo vendor again, once again invalidating fetchCargoTarball FOD hashes. It's time to fix this once and for all, switching across the board to fetchCargoVendor, which is not dependent on cargo vendor's output format.
It should be possible to reproduce this diff. To do so, get the list of files changed by this commit, e.g. with git diff --name-only, then run the following two commands, each with that list of files as their standard input:
This will take a long time. It might be possible to parallelize it using xargs' -P option. I haven't tested it.
When reviewing the diff by eye, I think the biggest thing to watch out for is additions of
useFetchCargoVendorthat don't correspond to a singlecargoHashchange. I think I filtered all the packages where that would happen out via manual review, but given there are more than a thousand in this batch it's possible I didn't have a 100% accuracy rate.Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-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.