Skip to content
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

It seems to work on optional dependencies, not on features - is this intended? #2

Closed
Byron opened this issue May 26, 2020 · 3 comments

Comments

@Byron
Copy link
Contributor

Byron commented May 26, 2020

How to reproduce (on MacOS, Rustc version 1.43.1, cargo-all-features version 1.2.0)

git clone https://github.com/crates-io/prodash
cd prodash
cargo build-all-features

Screenshot 2020-05-26 at 17 16 46

What's expected is that it only activates features, along with their dependencies:

Screenshot 2020-05-26 at 17 17 16

It seems to activate optional dependencies instead, along with all their permutations.

@frewsxcv
Copy link
Owner

It should be running permutations of all optional dependencies and features: https://github.com/frewsxcv/cargo-all-features/blob/master/src/features_finder.rs

I just ran your "How to reproduce" steps and it seems to be picking up the features. Are you interested in having it not test optional dependencies?

@Byron Byron changed the title It seems to work on optional dependencies, not on features - is this intended It seems to work on optional dependencies, not on features - is this intended? May 26, 2020
@Byron
Copy link
Contributor Author

Byron commented May 26, 2020

Interesting! I never waited long enough to see it pick up features.
Indeed it was surprising to me given the name of the program, and I didn't know that valid features are also optional dependencies.

From my own experience, I think it would have been enough to only test features, and not optional dependencies. The latter would be nice at least to opt-out of.

@frewsxcv
Copy link
Owner

i included optional dependencies because i've seen cases in the rust ecosystem use optional dependencies like features. and conceptually, they're essentially feature flags you need to invoke with --features <optional depedency>. in any case: #3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants