Catch missing msgfmt and harden the Metal Toolchain probe in doctor - #738
Merged
sbertix merged 1 commit intoJul 29, 2026
Merged
Conversation
make doctor reported all checks green while make build-app then failed on prerequisites doctor did not verify. Add a msgfmt (GNU gettext) check: Ghostty shells out to msgfmt to compile its .po catalogs and macOS does not ship it. The check runs msgfmt and confirms it is GNU gettext, so a broken version-manager shim or an unrelated command named msgfmt cannot read as installed. Retry the Metal Toolchain probe after killing xcrun's cache, so a stale negative lookup no longer reports a freshly downloaded toolchain as missing.
sbertix
enabled auto-merge (squash)
July 29, 2026 21:24
sbertix
deleted the
sbertix/gh-729-make-doctor-passes-but-build-fails-missi
branch
July 29, 2026 21:31
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.
Closes #729
Summary
make doctorreported all checks green whilemake build-appthen failed onprerequisites the doctor never verified. Two gaps, both in
scripts/doctor.sh:msgfmttocompile its
.potranslation catalogs (ThirdParty/ghostty/src/build/GhosttyI18n.zig:33),and macOS does not ship it, so a build without it fails with
failed to spawn ... msgfmt: FileNotFound(once per locale). Doctor nowchecks for it, running
msgfmt --versionand confirming the output is GNUgettext so a broken version-manager shim or an unrelated command named
msgfmtcannot pass as installed. The fix hint covers both Homebrew(
brew install gettext && brew link --force gettext) and a brew-free path(
nix profile install nixpkgs#gettext).xcruncache. After
xcodebuild -downloadComponent MetalToolchain(a cryptexmount, not
/Library/Developer/Toolchains/),xcrun metal --versionstillreported the toolchain missing because
xcruncached the earlier negativelookup. Doctor now retries the probe after
xcrun --kill-cachewhen thefirst attempt fails, so a stale cache no longer masquerades as a missing
toolchain while still correctly reporting a genuinely missing one.
Type of change
ready)How was this tested?
Shell-only tooling change (no Swift/app surface), so verification was against
scripts/doctor.shdirectly:bash -n scripts/doctor.shclean;./scripts/doctor.shexits 0 on acorrectly provisioned machine (all checks green).
msgfmt check exercised with PATH shims: real GNU
msgfmt-> pass; a shimexiting non-zero, a non-GNU command named
msgfmt, and an absent binaryeach -> doctor turns red with the actionable fix.
make checkpasses (format + lint)make testpassesI built and ran the app to confirm the change works
Checklist
Closes #above.ready.