Skip to content

fix: include "Finished" line in cargo build/check success output#763

Merged
FlorianBruniaux merged 1 commit intortk-ai:developfrom
mvanhorn:osc/759-include-finished-line-in-cargo-output
Mar 28, 2026
Merged

fix: include "Finished" line in cargo build/check success output#763
FlorianBruniaux merged 1 commit intortk-ai:developfrom
mvanhorn:osc/759-include-finished-line-in-cargo-output

Conversation

@mvanhorn
Copy link
Copy Markdown
Contributor

Summary

Preserves the cargo Finished ... line in the filtered success output for rtk cargo build and rtk cargo check. Previously, success output only showed cargo build (0 crates compiled) which was ambiguous - LLMs couldn't tell if the build succeeded or if there were errors.

Why this matters

Per #759, Claude interpreted cargo build (0 crates compiled) as potentially erroneous and tried workarounds (rtk proxy cargo check, RUSTFLAGS="-D warnings" rtk proxy cargo check), consuming extra tokens. Claude expected to see the Finished dev profile ... message as a clear success signal.

Changes

  • src/cargo_cmd.rs: In filter_cargo_build(), capture the Finished line instead of skipping it, and append it to the success summary. The output now looks like:
    cargo build (5 crates compiled)
    Finished dev [unoptimized + debuginfo] target(s) in 2.53s
    

Testing

All 38 cargo_cmd tests pass (cargo test cargo_cmd). The change only affects the success path - error/warning output is unchanged.

Fixes #759

This contribution was developed with AI assistance (Claude Code).

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 21, 2026

CLA assistant check
All committers have signed the CLA.

@aeppling
Copy link
Copy Markdown
Contributor

Hello, thanks for contributing with this fix,

Please target develop branch and read CONTRIBUTING.md so you can pass all checks,

@aeppling aeppling self-assigned this Mar 21, 2026
@mvanhorn mvanhorn force-pushed the osc/759-include-finished-line-in-cargo-output branch from 3d8e6e5 to 4a06317 Compare March 22, 2026 02:16
@mvanhorn mvanhorn changed the base branch from master to develop March 22, 2026 02:16
@mvanhorn
Copy link
Copy Markdown
Contributor Author

Rebased onto develop and retargeted the PR base. Thanks for the heads up on CONTRIBUTING.md.

@aeppling
Copy link
Copy Markdown
Contributor

Hey

We are cleaning up the codebase and improving the project structure for better onboarding. As part of this effort, PR #826 reorganizes src/ from a flat layout into subfolders.

No logic changes — only file moves and import path updates.

What you need to do

Rebase your branch on develop when receiving this comment:

git fetch origin && git rebase origin/develop

Git detects renames automatically. If you get import conflicts, update the paths:

use crate::git;        // now: use crate::cmds::git::git;
use crate::tracking;   // now: use crate::core::tracking;
use crate::config;     // now: use crate::core::config;
use crate::init;       // now: use crate::hooks::init;
use crate::gain;       // now: use crate::analytics::gain;

Need help rebasing? Tag @aeppling

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mvanhorn mvanhorn force-pushed the osc/759-include-finished-line-in-cargo-output branch from 4a06317 to 72b1e59 Compare March 26, 2026 18:58
@mvanhorn
Copy link
Copy Markdown
Contributor Author

Rebased onto develop in 72b1e59.

@FlorianBruniaux FlorianBruniaux merged commit 5a0144d into rtk-ai:develop Mar 28, 2026
9 checks passed
@mvanhorn
Copy link
Copy Markdown
Contributor Author

mvanhorn commented Apr 4, 2026

Thanks for the quick review!

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.

cargo output on success is too terse, making it ambiguous

4 participants