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

support multiple appearances of --features #7076

Closed
ExpHP opened this issue Jun 27, 2019 · 0 comments · Fixed by #7084
Closed

support multiple appearances of --features #7076

ExpHP opened this issue Jun 27, 2019 · 0 comments · Fixed by #7084
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@ExpHP
Copy link
Contributor

ExpHP commented Jun 27, 2019

> cargo check --features a --features b
error: The argument '--features <FEATURES>' was provided more than once, but cannot be used multiple times

USAGE:
    cargo test --all --features <FEATURES> --message-format <FMT>

Well, that's just silly! It makes it harder to add a feature to an existing command line, it causes trouble if you put feature flags in environment variables...

The expected behavior of multiple --features flags should be dead obvious, but I'll state it anyways: Multiple --features lists are to be concatenated, because cargo features are fundamentally additive in nature.

@ExpHP ExpHP added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Jun 27, 2019
bors added a commit that referenced this issue Jul 19, 2019
Add support for multiple --features options

Closes #7076

Pretty straightforward, but I added an extra test to make sure that space-separated features work in conjunction with multiple --features options.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant