-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Tracking issue for -Z features=host_dep #7915
Copy link
Copy link
Closed
Labels
A-features2Area: issues specifically related to the v2 feature resolverArea: issues specifically related to the v2 feature resolverC-tracking-issueCategory: A tracking issue for something unstable.Category: A tracking issue for something unstable.
Metadata
Metadata
Assignees
Labels
A-features2Area: issues specifically related to the v2 feature resolverArea: issues specifically related to the v2 feature resolverC-tracking-issueCategory: A tracking issue for something unstable.Category: A tracking issue for something unstable.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
StatusShow more project fields
Done
Implementation: #7820
Documentation: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#features
Summary
-Z features=host_depcauses the feature resolver to prevent features enabled on build dependencies or proc-macros from being enabled for normal dependencies. For example:When building the build script, the
logcrate will be built with thestdfeature. When building the library of your package, it will not enable the feature.Unresolved issues
cargo metadata--targetis not used). Projects can add features to re-unify if they want, but it may not be clear or obvious what to add and when. We may need something that identifies these duplicate dependencies, and give suggestions on how to unify them. Or, we may need to make this opt-in somehow so the user needs to make this an explicit decision.