Repository navigation
feat(rust): add covering crates instead of refusing when features would differ - #254
Merged
adityankale190895 merged 1 commit intoNov 18, 2026
Merged
Conversation
…ld differ Part of DiffCI#131 (dependency features / default-features = false). A workspace crate that asks for a sibling with default-features = false (servo/rust-url's url asks for percent-encoding, idna and form_urlencoded that way) made every selected command that left out the other crates refuse, so real workspaces stayed advisory. The package command now adds the tested crates of the smallest unit Cargo resolved with the full run's features, repeating until every selected crate is covered. Feature resolution is monotonic in the selected crates, so the larger command builds those packages exactly as the full run does. Without a covering unit, the plan is refused as before; integration-only and bench/example commands are checked as before. Signed-off-by: FredApps <[email protected]>
FredApps
marked this pull request as ready for review
November 17, 2026 17:34
This was referenced Nov 17, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #131 (external dependency inputs).
When testing only the selected crates would build a shared dependency with fewer features than the full run, the planner used to refuse the command ("Selected Cargo crates would build X with different features…"). On real workspaces that turned most SELECTIVE plans into "no runnable command".
Now the planner widens the
cargo:test:packagesgroup instead: it adds the crates of the smallest Cargo feature unit that builds that dependency the full run's way, and repeats until every selected crate is covered. Features only grow with the crates selected and never exceed the full run's, so the wider command builds each dependency exactly as the full run does. It runs more tests than were selected but fewer than the full run. The label says why, e.g. "Cargo package tests (with cli for the full run's features)".It stays fail-closed: if no unit covers a dependency, or an integration-only
--testcommand can't be covered, the plan is refused as before. The final check over every command is unchanged.Tests: the existing feature-resolution test is updated, and a new test covers repeated expansion across several units. One docs sentence is added.
Local checks on this head: typecheck,
npm testwithDIFFCI_REQUIRE_CARGO=1(1168 pass), build,audit:boundary. Hosted CI passed on this head.Merge order (#131 series: #232, #234, #248, #250, #252, #254, #256, #277, #258). These all edit the one-line Rust paragraph in
docs/using-diffci.md, and some also touchrust.ts/types.ts, so they conflict textually with each other. #258 already includes #232, #248, #250 and #254 with those conflicts resolved. The simplest path: merge #258 (GitHub marks those four as merged), then #234, #252, #256 and #277. After each one lands I mergemaininto the next and resolve the docs line. Merging them one at a time in number order works too, with the samemainmerge after each.