Resolve feature and optional dependencies for workspace as a whole #5210
Labels
A-features
Area: features — conditional compilation
A-workspaces
Area: workspaces
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
S-needs-design
Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Currently, a dependency's feature set is determined by what package is getting built, without considering other packages in the workspace. This will likely cause a crate to be compiled more than once with different feature sets.
Instead, we should consider the full workspace when resolving features. We have a few choices:
This will minimize the possibility we will be building a crate twice, but this can be unwanted behavior sometimes.
This will be less surprising though it doesn't cover all the feature combinations that are possible.
Note that specifying features in workspace doesn't work anyway ¯\_(ツ)_/¯: #5015
Related: #4463
The text was updated successfully, but these errors were encountered: