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
WIP: build-rust-crate: fix for binary crate building. #64385
Conversation
@miltador would you like to chime in on this pull request? |
See #64313. build-rust-crate used to always build a crate that had a source file with the same name as the crate as a library crate. This would break in the cases of the crate being a binary crate containing a source file with the same name, e.g. in xargo. Cargo used to erroneously allow a crate with the following contents in it's cargo toml: ```toml [lib] name = "foo" ``` having its main source file named `src/foo.rs`. This is behaviour that cargo warns about. This pull request is marked as WIP because the version of way-cooler that is in nixpkgs depends on an old version of the crate `c_vec` that assumed the erroneous behaviour of cargo. Unfortunately this pull request will make the build of way-cooler fail until the dependency is updated to a new version.
Thank you for your contributions.
|
@dnaq Is this still required? |
I don’t think the issue has been fixed, it’s not a blocker for me personally, but some binary crates will still fail to build using buildRustCrate. |
I marked this as stale due to inactivity. → More info |
See #64313.
build-rust-crate used to always build a crate that had a source file
with the same name as the crate as a library crate. This would break in
the cases of the crate being a binary crate containing a source file
with the same name, e.g. in xargo.
Cargo used to erroneously allow a crate with the following contents in it's cargo
toml:
having its main source file named
src/foo.rs
. This is behaviour thatcargo warns about.
This pull request is marked as WIP because the version of way-cooler
that is in nixpkgs depends on an old version of the crate
c_vec
thatassumed the erroneous behaviour of cargo. Unfortunately this pull
request will make the build of way-cooler fail until the dependency is
updated to a new version.
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)