-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add caveat for covering features #10605
Conversation
This section explains the caveats and possible solutions for features, detailing the tooling needed to 100% cover such a project. The need for this PR is based on a conversation with @Eh2406. Moved this PR here based on @Eh2406's comment: rust-lang/reference#1195 (comment)
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ehuss (or someone else) soon. Please see the contribution instructions for more information. |
r? @Eh2406 |
src/doc/src/reference/features.md
Outdated
|
||
Features, which are a form of conditional compilation, require an exponential number of configurations and test cases to be 100% covered. By default, testing, linting, Miri, docs and others will only run on the default set of features. | ||
|
||
There are certain tools like [cargo-hack](https://github.com/taiki-e/cargo-hack) and [cargo-all-features](https://github.com/frewsxcv/cargo-all-features) that allow you to test all combinations of features which can help reduce the amount of configuraton needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we can make suggestions of third party tools to use here.
Instead, perhaps it can just encourage the reader to consider their strategy for how they are going to test the different configurations. They may want to consider testing no default features, with default features, all features, or any combination of features. They'll need to consider their resource and time budget for how to approach it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the wording, does this work?
r? @ehuss |
Thanks! @bors r+ |
📌 Commit 3ac6795 has been approved by |
☀️ Test successful - checks-actions |
Update cargo 20 commits in a44758ac805600edbb6ba51e7e6fb81a6077c0cd..3f052d8eed98c6a24f8b332fb2e6e6249d12d8c1 2022-05-04 02:29:34 +0000 to 2022-05-12 15:19:04 +0000 - pre-stabilization documentation for workspace inheritance (rust-lang/cargo#10659) - test: Make curr_dir work in/out of workspace (rust-lang/cargo#10658) - Fix no_cross_doctests race condition. (rust-lang/cargo#10660) - Fix typo (rust-lang/cargo#10657) - feat(install): Support `foo@version` like cargo-add (rust-lang/cargo#10650) - fix typos found by the `typos-cli` crate (rust-lang/cargo#10649) - feat(yank): Support foo@version like cargo-add (rust-lang/cargo#10597) - add `cargo-features` to unstable docs for workspace inheritance (rust-lang/cargo#10648) - Use the traits added to the Rust 2021 Edition prelude (rust-lang/cargo#10646) - Pass `--target` to `rustdoc` for `cargo test` if specified with host target. (rust-lang/cargo#10594) - Fix use of .. in dep-info-basedir (rust-lang/cargo#10281) - fix some typos (rust-lang/cargo#10639) - Move snapshot tests into testsuite (rust-lang/cargo#10638) - Improve support of condition compilation checking (rust-lang/cargo#10566) - When documenting private items in a binary, ignore warnings about links to private items (rust-lang/cargo#10142) - Extend pkgid syntax with ``@`` support (rust-lang/cargo#10582) - move one `snapshot/add` test into `testsuite/cargo_add/` (rust-lang/cargo#10631) - Add caveat for covering features (rust-lang/cargo#10605) - Improve CARGO_ENCODED_RUSTFLAGS and CARGO_ENCODED_RUSTDOCFLAGS variables docs (rust-lang/cargo#10633) - reorganize `snapshot` tests to better work in contexts that sort by extension (rust-lang/cargo#10629)
This section explains the caveats and possible solutions for features, detailing the tooling needed to 100% cover such a project.
The need for this PR is based on a conversation with @Eh2406.
Moved this PR here based on @Eh2406's comment: rust-lang/reference#1195 (comment)