You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rtk cargo test loses compile diagnostics when tests fail before execution #740
When cargo test fails during compilation before any test suites run, RTK can lose the main rustc diagnostic context and fall back to a weak tail-output summary.
Reproduction
Introduce a compile error in a test target or crate used by cargo test.
On the unfixed path, RTK falls back to truncated tail output and loses the main diagnostic header and source location context:
3 | let _ = missing_symbol;
| ^^^^^^^^^^^^^^ not found in this scope
For more information about this error, try `rustc --explain E0425`.
error: could not compile `rtk` (test "repro_compile_fail") due to 1 previous error
warning: build failed, waiting for other jobs to finish...
Expected behavior
When cargo test fails before test execution begins, RTK should preserve the primary compile diagnostics in a compact cargo test: summary format:
cargo test: 1 errors, 1 warnings (1 crates)
═══════════════════════════════════════
error[E0425]: cannot find value `missing_symbol` in this scope
--> tests/repro_compile_fail.rs:3:13
|
3 | let _ = missing_symbol;
| ^^^^^^^^^^^^^^ not found in this scope
warning: build failed, waiting for other jobs to finish...
Impact
This makes compile-failing test runs harder to debug, especially when no test result: summary is produced and the useful rustc error is the most important part of the output.
Proposed fix
Detect compile-error-only cargo test output, reuse the existing build diagnostic formatter, and relabel the summary from cargo build: to cargo test:.
RTK's cargo test filter loses primary rustc compile diagnostics when compilation fails before test execution; should reuse build diagnostic formatter with relabeled summary.
💡 This looks like a simple fix that could be auto-resolved. Use /wshm fix to attempt it.
Triaged automatically by wshm · This is an automated analysis, not a human review.
Activity
pszymkowiak commentedon Mar 20, 2026
🔍 Automated Triage
bugmediumSummary
RTK's cargo test filter loses primary rustc compile diagnostics when compilation fails before test execution; should reuse build diagnostic formatter with relabeled summary.
Triaged automatically by wshm · This is an automated analysis, not a human review.
aeppling commentedon Mar 21, 2026
resolved by #738