-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
duplicate feature runs when default feature defined #155
Comments
No. If |
As discussed in #81, cargo-hack deduplicates any fully equivalent feature combinations based on how the cargo features work. If you can guarantee that default and std features are exactly the same, the currently recommended approach is to use the |
Ah. I had erroneously believed that default was a special feature and that it didn't actually materialize as a feature in cfgs. Thank you for the detailed explanation. |
Agreed. This would likely be a capability fraught with endless edge cases. I think cargo-hack is balancing the complexity to benefit spectrum well as it is. |
When I use
cargo hack --feature-power
with a crate that has adefault
feature defined, cargo-hack runs the default feature set, as well as the features defined in the default feature set, and the same feature set is run twice.For example, with the following features defined:
A
cargo hack --feature-powerset
will run the following combinations:The
std
anddefault
feature set are the same, and yet it runs them both. This problem has a larger impact when more feature sets are defined where many jobs are repeated.It would be ideal if the feature powerset feature identified when the default and another featureset overlap, and then only run one of them. For example, it would be ideal if the above command resulted in the following output:
The text was updated successfully, but these errors were encountered: