Repository navigation
feat(rust): keep required-feature targets' packages whole instead of blocking the repository - #248
Merged
adityankale190895 merged 1 commit intoNov 18, 2026
Conversation
…blocking the repository Part of DiffCI#131. A Cargo target with required-features no longer makes every change fall back. The adapter records the target's required features, and the planner keeps that package whole (cargo test -p name, never --test name), so Cargo runs or skips the target exactly as the full cargo test does. The existing feature check gives the package the full run's features, so the gate evaluates the same way. Signed-off-by: FredApps <[email protected]>
FredApps
marked this pull request as ready for review
November 17, 2026 17:33
This was referenced Nov 17, 2026
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 / workspace scope).
One Cargo target with
required-featuresanywhere in the workspace used to block the whole repository ("Cargo targets requiring features…"). That alone kept many real workspaces FULL. This PR drops that repo-wide blocker and handles these targets where they matter:requiredFeatureson each test target (rustTestTargets).--test namemakes Cargo fail when the feature is off. Its package always runs whole, as-p pkg, so Cargo skips or runs the target exactly as the fullcargo testdoes. The usual feature-coverage check still applies to that command.requiredFeaturesvalue (empty, not an array, not strings) is refused, so a bad cache fails closed.Tests: the updated adapter test, a real-Cargo workspace test with a gated crate and an enabler crate, and a planner test. The docs reason table is updated.
Local checks on this head:
npm ci,npm run typecheck,npm testwithDIFFCI_REQUIRE_CARGO=1(1169 pass),npm run build,npm run 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.