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

Exact features set to be used for testing #9725

Closed
vporton opened this issue Jul 25, 2021 · 1 comment
Closed

Exact features set to be used for testing #9725

vporton opened this issue Jul 25, 2021 · 1 comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@vporton
Copy link

vporton commented Jul 25, 2021

Describe the problem you are trying to solve
The software needs to be recompiled several times to test with every set of features to be tested with.

Moreover, there is no automated way to make cargo to test a package with several different sets of features.

Describe the solution you'd like
Please add to target section of Cargo.toml new key exact-features that will cause this target to be compiled with this exact set of features, independently of what features are specified in the command line:

exact-features = ["use_assembler", "no_api_v2"]

This would allow to use such a target together with test = true to test it fully automatically.

Notes
Also, the suggested feature is useful for software requiring especially good reliability to complicate user to change features (but the reason I suggest it is for testing).

@vporton vporton added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Jul 25, 2021
@ehuss
Copy link
Contributor

ehuss commented Aug 4, 2021

Thanks for the suggestion! I'm not sure I fully understand what is being requested here, but I believe this is suggesting that cargo targets could have certain features enabled by default. If so, I believe this is covered by RFC 3020. Regardless, a major change like this should probably go through the RFC process.

@ehuss ehuss closed this as completed Aug 4, 2021
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

No branches or pull requests

2 participants