Skip to content

feat(cpp): add CMake, CTest, Make, Ninja, and MSBuild handlers - #3455

Open
isink17 wants to merge 1 commit into
rtk-ai:developfrom
isink17:feat/cpp-build-handlers-v2
Open

feat(cpp): add CMake, CTest, Make, Ninja, and MSBuild handlers#3455
isink17 wants to merge 1 commit into
rtk-ai:developfrom
isink17:feat/cpp-build-handlers-v2

Conversation

@isink17

@isink17 isink17 commented Aug 6, 2026

Copy link
Copy Markdown

Summary

Adds focused, token-efficient output handlers and safe automatic rewrites for common C++ build and test workflows:

  • CMake configure and build
  • CTest
  • Make
  • Ninja
  • MSBuild

The handlers preserve the original executable arguments, targets, configuration, platform, environment, working directory, and native exit code while reducing progress and build noise.

Correctness and failure handling

  • Non-zero exits cannot produce a success summary.
  • Unknown or empty failures emit an explicit <tool>: failed (exit N) result.
  • Raw failure fallback is bounded to 40 total lines and 4096 characters.
  • The runner behavior is opt-in through RunOptions::preserve_filtered_failure_output; existing callers and default never_worse behavior remain unchanged.
  • MSBuild /t:Link remains /t:Link; no build target is changed.

Supported diagnostics

  • GCC and Clang compiler/linker diagnostics
  • MSVC compiler diagnostics
  • LINK/LNK and RC diagnostics
  • multiline CMake errors
  • Ninja FAILED: blocks and failure sentinels
  • ordinary CTest failures, timeouts, crashes, exceptions, and sanitizer output
  • MSBuild compiler, linker, RC, MSB, PRJ, and CVT diagnostics

Rewrite safety

Automatic rewriting is limited to normal build and test invocations.

Native output is preserved for informational, query, structured-output, dry-run, debug, and tool modes, including:

  • CMake help/version/script/tool/install/workflow modes
  • CTest listing and structured show-only modes
  • Make dry-run, question, database, debug, trace, help, and version modes
  • Ninja tool, dry-run, debug, verbose, help, and version modes
  • MSBuild help, version, query, preprocess, and target-listing modes

Make lifecycle targets such as clean, install, and distclean remain native. Make option parsing handles clustered flags, options occurring after targets or assignments, option operands, and the -- boundary.

Command arguments and ordering are preserved.

Validation

  • Runner tests: 7 passed
  • C++ handler tests: 49 passed
  • Registry tests: 375 passed
  • cargo check --all-targets: passed
  • cargo fmt --all -- --check: passed
  • cargo clippy --all-targets: passed

The full branch suite completed with:

  • 2612 unit tests passed
  • 10 integration tests passed
  • 8 tests ignored
  • 1 existing upstream integration failure

Existing upstream failure:

grep_no_match_emits_empty_not_a_message

The same Some(2) versus Some(1) failure was reproduced on a detached clean upstream/develop worktree.

Scope

This PR intentionally excludes PowerShell rewriting, grep/JSON additions, codegraph handling, patch/encoding changes, Git normalization, and other unrelated features. Those will be handled separately.

Add token-efficient output handlers and safe command rewrites for common C++ build and test workflows.

Preserve command arguments and execution semantics while reducing CMake, CTest, Make, Ninja, and MSBuild output noise.
@isink17
isink17 force-pushed the feat/cpp-build-handlers-v2 branch from 829cc0e to 7202519 Compare August 6, 2026 12:22
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.

1 participant