-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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.
Description
Implementation: #7820
Documentation: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#features
Summary
-Z features=itarget
causes the feature resolver to ignore features for target-specific dependencies for targets that don't match the current compile target. For example:
[dependency.common]
version = "1.0"
features = ["f1"]
[target.'cfg(windows)'.dependencies.common]
version = "1.0"
features = ["f2"]
When building this example for a non-Windows platform, the f2
feature will not be enabled.
Unresolved issues
- Update
cargo metadata
- Does this cause existing projects to fail?
- Projects can add missing features as a backwards-compatible workaround. However, if it causes problems for too many projects, we may need to find some way to opt-in.
jplatte, elichai, sagebind, tarcieri, DianaNites and 29 morelu-zero, tarcieri, DianaNites, Dispersia, k-nasa and 12 morezicklag, Dispersia, Matthias-Fauconneau, antonok-edm, azriel91 and 4 moreDispersia, azriel91, tyler274, cart and helloworldgnu
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
Projects
Status
Done