Skip to content

mcp setup: configure a worktree on the source tree's cmake generator, bound the build - #3903

Merged
borisbat merged 1 commit into
masterfrom
bbatkin/setup-match-generator
Aug 30, 2026
Merged

mcp setup: configure a worktree on the source tree's cmake generator, bound the build#3903
borisbat merged 1 commit into
masterfrom
bbatkin/setup-match-generator

Conversation

@borisbat

Copy link
Copy Markdown
Collaborator

Behavior change: a worktree bootstrapped by utils/mcp/setup.das now configures on the same cmake generator as the tree running the setup, and its daslang build runs at hardware threads.

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. Makefile trees were the exposed population for the unbounded---parallel overload 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() reads CMAKE_GENERATOR from the running tree's build/CMakeCache.txt; when that tree has no configured build the platform default stands. The cmake --build --target daslang step now passes --parallel <hardware threads> instead of the generator default (serial on Makefiles).

Where to look: utils/mcp/setup.das, source_tree_generator and build_worktree. One line in skills/mcp_tools.md documents the generator behavior.

Validation, claims, ledger

Validation

  • MCP compile_check, lint, format clean; a probe of source_tree_generator() on the main tree returns Ninja.
  • Not run end-to-end: a real bootstrap builds a full daslang (15–25 min) and the box was shared; the configure line is the only changed command shape.

Claims - stated, not tested

  • A bootstrap from a tree with no build/CMakeCache.txt falls back to today's behavior: follows from the empty-string guard around -G.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FkBKGJisiiHXEgSsGjpqLm

… 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
Copilot AI lite review requested due to automatic review settings August 29, 2026 23:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 read CMAKE_GENERATOR from the source tree’s build/CMakeCache.txt and pass -G during initial worktree configure when available.
  • Build daslang with cmake --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.

Comment thread utils/mcp/setup.das
@borisbat
borisbat merged commit a0ada08 into master Aug 30, 2026
33 checks passed
@borisbat
borisbat deleted the bbatkin/setup-match-generator branch August 30, 2026 00:36
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