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

未关闭
#525 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript

调研方向

从 resolveEffectiveDerivedDataPath 开始,检查 #340 引入的按 workspace 隔离。检查 Xcode.app 的 DerivedData 文件夹如何在 info.plist 中暴露 WorkspacePath,然后定义匹配路径和 fallback 路径应如何工作。完成标准是每个 workspace 都能无冲突地复用其 GUI DerivedData,而没有现有文件夹的 workspace 仍保持确定性的隔离。

由索引模型根据 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. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

getsentry/MobileBuildMCP 的其他 Issue

查看 getsentry/MobileBuildMCP 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。