iOS runner build ignores `-derivedDataPath` when Xcode uses a custom build location
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 76/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- ios, typescript
- 领域
- build-system, mobile
调研方向
从 packages/platform-apple/src/runner/runner-cache-metadata.ts 开始,检查 RUNNER_SANDBOX_BUILD_ARGS,然后追踪这些参数如何传递到 runner 构建中。使用提供的 Xcode 自定义构建位置设置和 agent-device prepare ios-runner --platform ios 重现问题;当 runner 构建在预期的派生数据路径下找到其 .xctestrun 时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Version: agent-device 0.21.19, Xcode 27 beta, macOS
What happens
When Xcode's global preference sets a custom build location, prepare ios-runner (and the first open on iOS) fails:
Failed to locate .xctestrun after build
Xcode writes the runner products relative to the runner project (dist/apple/runner/AgentDeviceRunner/Build/...) instead of the derived data path that agent-device passes. Parallel attempts can also fail with database is locked.
How to reproduce
defaults write com.apple.dt.Xcode IDEBuildLocationStyle Custom
defaults write com.apple.dt.Xcode IDECustomBuildLocationType RelativeToWorkspace
defaults write com.apple.dt.Xcode IDECustomBuildProductsPath Build/Products
agent-device prepare ios-runner --platform ios
Cause
IDEBuildLocationStyle=Custom takes precedence over -derivedDataPath for build products. Teams use this setting so that Xcode and command-line tools share one products folder.
Suggested fix
Add -IDEBuildLocationStyle=Unique to the runner build arguments, for example in RUNNER_SANDBOX_BUILD_ARGS (packages/platform-apple/src/runner/runner-cache-metadata.ts). With this argument the runner builds into the agent-device derived data path again. We verified the change locally by patching dist/src/runner-cache-metadata.js: prepare ios-runner then succeeds.
An alternative is an environment variable for extra xcodebuild arguments.
- 主要语言
- TypeScript
- 星标
- 4.9k
- 派生
- 328
- 平均合并
- 12 小时 13 分钟
- 30 天内合并 PR
- 541
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
callstack/agent-device 的其他 Issue
-
settings clear-app-state fails with ENOENT … scandir '(null)' for iOS system apps such as Settings可能已有人在做 @thymikee 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 80/100
callstack/agent-device#3305 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
callstack/agent-device#1869 ·
维护者通常 1 天内回复
-
install and reinstall from another session in the same daemon replace the app on a claimed device未关闭
难度 4/5 3-5 天 新手友好度 55/100
callstack/agent-device#3345 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
callstack/agent-device#3344 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
callstack/agent-device#3342 · 7 条评论 ·
维护者通常 1 天内回复
查看 callstack/agent-device 的全部 Issue
相似的 Issue
-
Flaky: mongodb-memory-server 'Port already in use' when another process starts a mongod concurrently未关闭area:testing bug effort:S priority:P2
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
lens:agent lens:process process
难度 2/5 1-3 小时 新手友好度 82/100
thebristolsound/birdbrain#1772 ·
维护者通常 1 天内回复
-
bug priority:low ready-for-dev
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
Automattic/data-liberation-agent#685 ·
维护者通常 1 天内回复
-
Business
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复