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

Add caveat for covering features #10605

Merged
merged 2 commits into from
May 5, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/doc/src/reference/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -513,3 +513,9 @@ source and inspect it.

[`cargo vendor`]: ../commands/cargo-vendor.md
[cargo-clone-crate]: https://crates.io/crates/cargo-clone-crate

### Caveats
yoav-lavi marked this conversation as resolved.
Show resolved Hide resolved

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.
yoav-lavi marked this conversation as resolved.
Show resolved Hide resolved

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.
Copy link
Contributor

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.

Copy link
Contributor Author

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?