Repository navigation
fix(check): nextest --workspace covers member crates - #223
Merged
Merged
Conversation
Contributor
Author
|
ArchDev is watching this pull request. State: settled (cycle 2 of 2 for head 89ac725).
Paused by the |
calvin-archastro
force-pushed
the
fix/nextest-workspace-covers-members
branch
from
October 30, 2026 00:14
f3c44b0 to
a6337a4
Compare
…tes under either runner Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
calvin-archastro
force-pushed
the
fix/nextest-workspace-covers-members
branch
from
October 30, 2026 00:48
a6337a4 to
89ac725
Compare
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.
Problem and author intent
orphan-test-target(since #217) lets a reachedcargo test --workspacecover member-cratecargo testtargets. In firstlanding,//services/rust/archdev:testiswith-rust-toolchain cargo nextest run --locked --workspace --all-targets .... Member crate projects have a detectedcargo testorcargo nextest run ...target. They are still reported as orphans, because the workspace rule only matchedcargo test.Intent: a reached
--workspace/--allrun under either runner covers members running either runner.What changed
TestTarget::is_cargo_testmatchescargo testandcargo nextest run.TestTarget::selects_cargo_testsflags-p/--package/--exclude/--test/--lib/--bin(s)/--example/--bench/--doc/-E/--filterset/--.src/check.rs: the workspace root is a reached cargo target (either runner) with--workspace/--alland no selection. Members are non-selective cargo targets (either runner) under it that do not pick packages or tests. Same directory-containment rule as before.orphan-test-targetrow updated.Scope
Backend-only (
aster check).Risk
Low. Fewer
orphan-test-targetfindings. A member with-p other,--test, a filter or--stays reported. Side effect: a reachedcargo test --workspaceno longer covers a membercargo test -p xthrough the old textual match for the workspace rule. It can still be covered by the plain whole-suite comparison.User impact
Fewer spurious orphan warnings for Cargo workspaces tested with nextest.
Testing
tests/check.rs::a_workspace_wide_cargo_test_covers_the_member_crates. It drives the real binary on a scratch workspace with a root crate, a member crate withcargo nextest runandcargo nextest run -p othertargets, and entriescargo test --workspace,cargo test --all --lockedandcargo nextest run --locked --workspace --all-targets. It asserts only the-p othermember is reported, and that a plaincargo testentry covers neither member target.cargo test --locked --test check(14 pass),--lib affected_files, clippy-D warnings,cargo fmt. CI runstests/check.rsviacargo test --all-targets.with-rust-toolchainwrapper path (the wrapper is stripped before the program is read, as in fix(check): resolve package scripts in orphan-test-target #217's{files}/script cases) and the real firstlanding tree.Follow-ups
[workspace] memberslist.🤖 Generated with Claude Code