Allow reusing Xcode.app's per-workspace DerivedData (avoid duplicate builds); static XCODEBUILDMCP_DERIVED_DATA_PATH can't map per workspace

オープン
#525 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript

調査の方向性

resolveEffectiveDerivedDataPath から始め、#340 で導入されたワークスペース単位の分離を確認します。Xcode.app の DerivedData フォルダーが info.plist で WorkspacePath をどのように公開しているかを調査し、マッチングパスとフォールバックパスをどのように機能させるべきかを定義します。各ワークスペースが GUI の DerivedData を衝突なく再利用でき、既存のフォルダーがないワークスペースでは決定論的な分離が維持されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Version: 2.7.0

Problem

For derived data the MCP currently offers two modes, neither of which lets agent builds share Xcode.app's DerivedData per workspace:

  1. Default: per-workspace isolation (#340), but under the MCP's own tree (~/Library/Developer/XcodeBuildMCP/workspaces/<workspace>/DerivedData). This is separate from Xcode.app's ~/Library/Developer/Xcode/DerivedData/<Workspace>-<hash>, so a project built both in the GUI and via the MCP is built and stored twice — double the disk and no incremental reuse across the two.
  2. XCODEBUILDMCP_DERIVED_DATA_PATH: a single static path applied to every call (resolveEffectiveDerivedDataPath returns it verbatim). With multiple workspaces/worktrees, they all collide in one folder → build-product clobbering and full rebuilds.

Request

A mode to resolve derived data to the existing Xcode.app DerivedData folder for each workspace (e.g. matching WorkspacePath in each folder's info.plist), and/or per-workspace configurability instead of a single static override.

This would let a repo built in both Xcode and the MCP share one DerivedData per workspace — no duplication, true incremental reuse between interactive and agent builds.

Workaround

I currently achieve this with a client-side PreToolUse hook that rewrites each build/test call's derivedDataPath to the matching GUI folder (looked up via WorkspacePath in each folder's info.plist), falling back to a deterministic per-workspace path when no GUI folder exists yet. Happy to share it if useful.

Related

  • #340 (per-workspace DerivedData isolation) — implemented isolation, but into the MCP's own tree rather than Xcode.app's.
  • #283 (tilde expansion in config'd derived data path).
主要言語
TypeScript
スター
6.6k
フォーク
329
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

getsentry/MobileBuildMCP のほかの issue

getsentry/MobileBuildMCP の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。