-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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
cargoHash
might be different on linux and darwin systems
#308089
Comments
cargoHash
is different on linux and darwin systemscargoHash
might be different on linux and darwin systems
That is an upstream feature of go and nothing nixpkgs implements. |
Note that unless cargo can resolve dependencies differently across OSs (some package managers can switch dependencies based on build os, i don't know of any that can do it based on target os, but I assume there might be, and cargo might be one of them), and the dependencies only contain source code and not outputs / intermediates, then the hashes should always be the same, and any discrepancies are likely to be due to file system case sensitivity issues, bugs in os specific code paths in cargo itself, stuff like that. Unfortunately I don't know enough about cargo and its ecosystem to say for sure, but wanted to raise it since similar issues pop up in the maintenance of darwin support of other packages in nixpkgs, like the bazel related ones. |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/cargo-lock-considered-harmful/49047/3 |
Two related upstream issues are added. |
Cargo's dependency resolution is platform-independent ( However, the tarballs are written out to the local file system by Cargo. If the tarball contains files There are many old packages with such error, because when Windows or macOS users had a file named |
Describe the bug
The
cargoHash
might be different on linux and darwin systems. I know that kanata, atuin and trunk-ng have this problem. There are more affected packages.This problem seems to be caused by the case sensitivity of file systems.
Enabling
useFetchCargoVendor
solves this.Additional context
buildGoModule
solves a similar problem usingproxyVendor
.cargo package
includes multiple README files when the case is not all upper-case rust-lang/cargo#14020useFetchCargoVendor
useFetchCargoVendor
useFetchCargoVendor
Notify maintainers
@NixOS/rust
Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: