docs(build): note the macOS Metal Toolchain requirement - #7
Open
bojieli wants to merge 1 commit into
Open
Conversation
Xcode 26 no longer bundles the Metal compiler. `xcrun -f metal` still resolves, so the toolchain looks installed, but the binary is a stub that exits with "cannot execute tool 'metal' due to missing Metal Toolchain". That breaks `bun run build` and `bun run macos`: both run the same `cargo build --release` in scripts/macos.ts, and gpui's build script compiles src/platform/mac/shaders.metal. The failure surfaces only after the System UI and all 11 applications build, buried under cargo's rerun-if-changed output, so it reads as a JavaScript dependency problem. Record the one-time `xcodebuild -downloadComponent MetalToolchain` step next to the existing Xcode requirement. CI is unaffected; the macos-latest runner image already provides the toolchain. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NeaMy5HWENMujKrgnyCPa7
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
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.
Problem
On Xcode 26 and newer,
bun run buildandbun run macosboth fail on a clean checkout:Xcode 26 no longer bundles the Metal compiler.
xcrun -f metalstill resolves to a path underXcodeDefault.xctoolchain, so the toolchain looks present, but the binary is a stub that refuses to run until the component is downloaded.Both scripts hit it because they are the same script —
scripts/macos.ts, differing only by--build-only— and gpui's build script compilessrc/platform/mac/shaders.metal.The failure is easy to misdiagnose. The System UI and all 11 applications build successfully first, so the error lands roughly 740 lines into the log, buried under cargo's
rerun-if-changedoutput. It reads as a JavaScript or submodule dependency problem when it is neither.Change
One paragraph in the README's Build requirements, next to the existing Xcode note:
No code, configuration, or lockfile changes.
Verification
After
xcodebuild -downloadComponent MetalToolchain(704.6 MB, Metal Toolchain 17C7003j) on Xcode 26.2:bun run build→ exit 0,Pocket Desktop: built System UI + 11 applications + release hostbun run macos→ host booted:pocket-desktop-host: booted pocket-desktop-system-ui (394073 bytes js, 687456 bytes pak)CI
Unaffected. The
macos-latestrunner image already provides the toolchain — the macOS job has been green on recent runs — so this is a local-environment prerequisite only, and no workflow change is needed.Follow-up not included here
scripts/macos.tscould preflightmetaland fail fast with this instruction rather than surfacing it deep in cargo output. Left out to keep this change minimal; happy to add it here or separately.🤖 Generated with Claude Code
https://claude.ai/code/session_01NeaMy5HWENMujKrgnyCPa7