See https://internals.rust-lang.org/t/help-us-test-the-breaking-bug-fix-to-cargo-features/7317 and rust-lang/cargo#5364. Also see the current .travis.yml where cargo test is run once for uom and once for feature_check.
Currently if you use cargo --test --all workspace crates are compiled with their default features (--features does not affect them) and link against the root package that is built with the specified features including dev-dependencies. If you use cargo test --manifest-path ... to manually run test for a workspace crate that references the root package then the root package is recompiled without dev-dependencies.
Ideally the uom CI build scripts should run both uom and feature_check tests and only compile uom once.
A possible short term fix is to have feature_check use the same feature set in the cargo build invocation so those build artifacts can be reused.
See https://internals.rust-lang.org/t/help-us-test-the-breaking-bug-fix-to-cargo-features/7317 and rust-lang/cargo#5364. Also see the current
.travis.ymlwherecargo testis run once foruomand once forfeature_check.Currently if you use
cargo --test --allworkspace crates are compiled with their default features (--featuresdoes not affect them) and link against the root package that is built with the specified features includingdev-dependencies. If you usecargo test --manifest-path ...to manually run test for a workspace crate that references the root package then the root package is recompiled withoutdev-dependencies.Ideally the
uomCI build scripts should run bothuomandfeature_checktests and only compileuomonce.A possible short term fix is to have
feature_checkuse the same feature set in thecargo buildinvocation so those build artifacts can be reused.