Skip to content

fix(cargo): preserve test compile diagnostics#738

Merged
aeppling merged 1 commit intortk-ai:developfrom
youbamj:fix/cargo-test-compile-diagnostics
Mar 20, 2026
Merged

fix(cargo): preserve test compile diagnostics#738
aeppling merged 1 commit intortk-ai:developfrom
youbamj:fix/cargo-test-compile-diagnostics

Conversation

@youbamj
Copy link
Copy Markdown
Contributor

@youbamj youbamj commented Mar 19, 2026

Summary

  • preserve rustc compile diagnostics when cargo test fails before any test suites run
  • reuse the existing build diagnostic formatter for compile-error-only cargo test output and relabel it from cargo build: to cargo test:
  • add a regression test and update CHANGELOG.md for the cargo test compile-diagnostics fix

Test plan

  • cargo fmt --all && cargo clippy --all-targets && cargo test
  • Unit test added in src/cargo_cmd.rs for compile-failing cargo test output
  • Manual testing: created a temporary compile-failing test and ran ./target/debug/rtk cargo test --test repro_compile_fail
  • Manual testing: verified filtered output preserved error[E0425] and tests/repro_compile_fail.rs:3:13
  • Manual testing: removed the temporary repro file after verification

Closes #740

Signed-off-by: YoubAmj <11021965+youbamj@users.noreply.github.com>
@aeppling aeppling self-assigned this Mar 20, 2026
@aeppling
Copy link
Copy Markdown
Contributor

Hello,

Thanks for this clean contribution !

For me this is explicit and straight-forward, we can merge this

@aeppling aeppling merged commit 97b6878 into rtk-ai:develop Mar 20, 2026
11 checks passed
@youbamj youbamj deleted the fix/cargo-test-compile-diagnostics branch March 20, 2026 23:05
maxkulish added a commit to maxkulish/rtk that referenced this pull request Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants