mcp setup: configure a worktree on the source tree's cmake generator, bound the build - #3903
Merged
Merged
Conversation
… bound the build setup.das passed no -G, so every bootstrapped worktree landed on the platform default - Unix Makefiles on macOS/Linux - while the tree it was cloned from runs Ninja. source_tree_generator() reads CMAKE_GENERATOR from the running tree's build/CMakeCache.txt and passes it through; platform default when that tree has no configured build. The daslang build now runs --parallel at hardware threads instead of the generator default (serial on Makefiles). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FkBKGJisiiHXEgSsGjpqLm
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request updates the MCP worktree bootstrap (utils/mcp/setup.das) so newly bootstrapped worktrees configure CMake using the same generator as the source tree (when discoverable) and builds daslang with an explicit --parallel <hardware threads> cap, aligning behavior with the main tree and avoiding unbounded Makefile builds. It also updates MCP documentation to describe the new generator-selection behavior.
Changes:
- Add
source_tree_generator()to readCMAKE_GENERATORfrom the source tree’sbuild/CMakeCache.txtand pass-Gduring initial worktree configure when available. - Build
daslangwithcmake --build ... --parallel {get_total_hw_threads()}instead of relying on generator defaults. - Document the generator behavior in
skills/mcp_tools.md.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| utils/mcp/setup.das | Detects the source tree’s CMake generator and bounds the cmake --build parallelism for bootstrapped worktrees. |
| skills/mcp_tools.md | Documents the updated setup behavior (generator selection + fallback). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Behavior change: a worktree bootstrapped by
utils/mcp/setup.dasnow configures on the same cmake generator as the tree running the setup, and its daslang build runs at hardware threads.setup.daspassed no-G, so every bootstrapped worktree landed on the platform default — Unix Makefiles on macOS/Linux — while the tree it was cloned from runs Ninja. Makefile trees were the exposed population for the unbounded---paralleloverload fixed in #3898; matching the source tree removes that exposure for new worktrees and makes them behave like the tree they came from.source_tree_generator()readsCMAKE_GENERATORfrom the running tree'sbuild/CMakeCache.txt; when that tree has no configured build the platform default stands. Thecmake --build --target daslangstep now passes--parallel <hardware threads>instead of the generator default (serial on Makefiles).Where to look:
utils/mcp/setup.das,source_tree_generatorandbuild_worktree. One line inskills/mcp_tools.mddocuments the generator behavior.Validation, claims, ledger
Validation
source_tree_generator()on the main tree returnsNinja.Claims - stated, not tested
build/CMakeCache.txtfalls back to today's behavior: follows from the empty-string guard around-G.🤖 Generated with Claude Code
https://claude.ai/code/session_01FkBKGJisiiHXEgSsGjpqLm