.sync/Makefile.toml: Check and test without default features#94
.sync/Makefile.toml: Check and test without default features#94makubacki wants to merge 1 commit intoOpenDevicePartnership:mainfrom
Conversation
Without `--no-default-features` testing, feature-gate regressions go
undetected. Code that accidentally uses a gated module or dependency
outside its `cfg` fence compiles fine under default features but
breaks for consumers that disable defaults.
Adds a higher level `check-no-default-features` task with two parallel
subtasks:
- `check-no-default-features-code`:
- `cargo check --no-default-features`
- `check-no-default-features-tests`:
- `cargo test --no-run --no-default-features`
Runs the task in `cargo make all`.
Makefile-patina-readiness-tool.toml is not updated since it doesn't
have a current `check` task and won't benefit much from this change.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
|
The change in the patina repo will be merged in OpenDevicePartnership/patina#1404. The patina Makefile.toml changes in this PR exactly match that change. |
Javagedes
left a comment
There was a problem hiding this comment.
We probably want an additional step in CI to run the one that compiles with no features
To make sure I understand correctly, are you suggesting that |
I spoke to Joey offline. I assumed that we run |
Without
--no-default-featurestesting, feature-gate regressions go undetected. Code that accidentally uses a gated module or dependency outside itscfgfence compiles fine under default features but breaks for consumers that disable defaults.Adds a higher level
check-no-default-featurestask with two parallel subtasks:check-no-default-features-code:cargo check --no-default-featurescheck-no-default-features-tests:cargo test --no-run --no-default-featuresRuns the task in
cargo make all.Makefile-patina-readiness-tool.toml is not updated since it doesn't have a current
checktask and won't benefit much from this change.