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
buildRustCrate does not support features with spaces #90605
Comments
I marked this as stale due to inactivity. → More info |
I still care about this. |
I marked this as stale due to inactivity. → More info |
Still relevant. |
As of today/yesterday (Rust 1.60), this is a bigger problem because many features now look like
Some issue as with a space really, need some sanitisation of feature names before they are exported as env vars. |
In cargo code there's an Is a feature with a space in it a valid name to start with, according to cargo? |
No.
In practice it's even more restricted:
|
Hello @danieldk 👋 If I read the comment thread here correctly then features with spaces aren't valid. Does this mean that this issue is "resolved"? If so, would you be able to close this issue? (I'm going through issues marked as stale to see what can be resolved. If this is still an issue then don't mind me). |
Describe the bug
If a crate provides a feature with a space and it is enabled, the feature is incorrectly passed to the
rustc
command. MoreoverCARGO_FEATURE_*
is not set correctly.To Reproduce
Steps to reproduce the behavior:
nixpkgs/pkgs/build-support/rust/build-rust-crate/test/default.nix
Line 349 in cdc56bc
nix-build -A buildRustCrateTests
Expected behavior
A successful build with the right features enabled.
Additional context
Background: #90193
Maintainer information:
The text was updated successfully, but these errors were encountered: