feat(cmake): add cmake build/configure filter#2778
Closed
cc1a2b wants to merge 1 commit into
Closed
Conversation
Adds a `native` ecosystem with an `rtk cmake` filter. `cmake --build` prints one `[ NN%] Building ...` line per translation unit plus `make[N]` directory chatter, and configure runs emit a probe line per feature check — all of it noise once the build succeeds. The filter tallies objects/targets and drops the progress + probe spam while keeping warnings, errors and the configure verdict verbatim; on failure it drops progress and preserves the diagnostics in full. ~85% smaller on a real build. Wires cmake into the rewrite rules, the pipe/smart filter resolver, and the operational-command integrity whitelist. Closes #2236
Author
|
Withdrawing this one to tidy up my open contributions — feel free to pick up the diff if the cmake filter is ever wanted. |
|
@aeppling Could we bring this feature in please? Would be nice for C/C++ developers i think. |
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.
Summary
rtk cmakefilter (newnativeecosystem for C/C++ tooling).cmake --buildprints one[ NN%] Building ...line per translation unit plusmake[N]"Entering/Leaving directory" chatter; a configure run emits a probe line per feature check. Once the build is green, none of that carries signal.Behaviour
cmake --build(progress spam + 1 warning)cmake: built N targets, M objects+ the warningcmake: build failed (exit N)+ the compiler diagnosticscmake -S -Bconfigure-- Configuring done/Build files written, drops-- Detecting/Check/Performing TestspamOn the fixture in the tests this is ~85% smaller (well past the 60% bar).
Wiring (per
src/cmds/README.md#adding-a-new-command-filter)src/cmds/native/{mod.rs,cmake_cmd.rs,README.md}— new ecosystem + filter (pure&str -> String,run()viarun_filtered_with_exit+with_tee("cmake")for raw recovery).src/cmds/mod.rs— registernative.src/main.rs—Cmakesubcommand + routing; added tois_operational_commandso hook-rewrittencmakeis integrity-checked (fails-open otherwise).src/discover/rules.rs—^cmake\b→rtk cmakerewrite rule.src/cmds/system/pipe_cmd.rs—"cmake"in the filter resolver (sortk pipe/smartcan reach it).Tests
cargo test --bin rtk cmake_cmd— 3 pass (progress collapse + ≥60% savings, failure keeps diagnostics, configure drops probe spam).cargo fmt --checkandcargo clippy --all-targetsclean;test_every_subcommand_is_classifiedupdated (cmake added toPASSTHROUGH).Closes #2236