taiki-e / cargo-hack

Cargo subcommand to provide various options useful for testing and continuous integration.
Apache License 2.0
628 stars 28 forks source link

Exclude features using implicit features that are mutually exclusive #244

Closed audunhalland closed 7 months ago

audunhalland commented 7 months ago
[features]
a = []
b = ["a"]
c = []

cargo hack --feature-powerset --mutually-exclusive-features a,c test

Should this test b and c in combination? I'm not sure, but initial feeling is that it could be a bug, since b implies a. My cargo hack tests generates too many useless combinations because of this.

Also this example is probably over-simplified compared to my actual setup, but I wanted to get clarity on the intended behaviour first.

Feel free to close this if it's a feature rather than a bug.

taiki-e commented 7 months ago

Thanks for the report. I agree that any feature that enables a should be treated as being mutually exclusive with c when a,c is passed.

taiki-e commented 7 months ago

Fixed in 0.6.25.

audunhalland commented 7 months ago

Amazingly quick fix :) Thank you. It seems to work very well. My configuration count went down from 68 to 18.