nix-community / crate2nix

rebuild only changed crates in CI with crate2nix and nix
https://nix-community.github.io/crate2nix/
Apache License 2.0
364 stars 86 forks source link

Sort package names returned from cargo metadata #260

Closed Fuuzetsu closed 8 months ago

Fuuzetsu commented 2 years ago

We've seen sometimes in our CI that crate2nix can generate Cargo.nix with dependencies in arbitrary order. It doesn't shuffle anything itself but it appears that under some circumstances, cargo metadata can produce dependency list in different order. I was unable to come up with a test to show this.

We've been running https://github.com/Fuuzetsu/crate2nix/commit/7ef0f0ebf0d7469a0d9be53ac2830655e1005f84 for a long time and it fixed the issue. I forgot to make a ticket on this repo...

pacak commented 8 months ago

https://github.com/oli-obk/cargo_metadata/pull/228 - this resolves the problem on cargo_metadata side I think.

pacak commented 8 months ago

And crate2nix uses version that includes this fix.

Fuuzetsu commented 8 months ago

OK. I'll close this issue and try to update our fork.