Skip to content

Commit 5447a4e

Browse files
committed
add cargo-all-features to container
Some crates have a myriad of features, and it is very easy to accidentally mess up imports in a way that `cargo check --all-features` works, but only compiling with only a subset of features breaks. For this scenario, cargo check-all-features can help, as it will attempt to compile all feature permutations. We can even add this to the default CI, even for crates like vhost that have incompatible features, due to cargo-all-features allowing the elimination of incompatible features from the test matrix [1]. Some usecases where this could have been helpful is in vm-memory, where we have tens of feature permutations, and some of them invariably get broken regularly [2], or in crates that have no-std support that is offered via an opt-out 'std' feature [3] [1]: https://crates.io/crates/cargo-all-features#options [2]: rust-vmm/vm-memory#350 [3]: rust-vmm/vm-allocator#107 Signed-off-by: Patrick Roy <[email protected]>
1 parent f26de2f commit 5447a4e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

build_container.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ if [ "$ARCH" != "riscv64" ]; then
9898
popd
9999
fi
100100

101+
cargo install cargo-all-features
102+
101103
# Install some dependencies required by vhost-device crates but not available
102104
# in Ubuntu repos.
103105
# Some of these do not support riscv64, since vhost-device crates do not

0 commit comments

Comments
 (0)