On a CLT-only host (no Xcode.app), Scripts/doctor.sh --quiet passes but swift build -c release --product RepoPrompt cannot succeed. Three distinct failures observed on macOS 26.5, CLT 26.5 (swift-driver 1.148.6, Swift 6.3.2), repo @ 6f8fcbb:
1. PackageDescription module mismatch (environment-specific; fixed by CLT reinstall — noted for completeness). swift package dump-package failed on any tools-version-6.x manifest: the CLT .swiftinterface advertises the swiftLanguageModes: init under @available(_PackageDescription 6), but libPackageDescription.dylib only exports the legacy swiftLanguageVersions: symbol — compile error when the manifest uses the new label, link error when it doesn't. A clean CLT reinstall resolved it (likely a mismatched mid-cycle update). Relevant here because doctor.sh passed throughout: it checks tool presence, not whether the toolchain can actually compile a manifest.
2. PreviewsMacros plugin missing from CLT. KeyboardShortcuts 2.3.0 (Recorder.swift:172,177,182) has three #Preview blocks. CLT ships only libObservationMacros.dylib and libSwiftMacros.dylib under /Library/Developer/CommandLineTools/usr/lib/swift/host/plugins/; PreviewsMacros ships with Xcode.app only. Repro on a CLT-only host:
swift build -c release --product RepoPrompt
# error: external macro implementation type 'PreviewsMacros.SwiftUIView' could not be found
# for macro 'Preview(_:body:)'; plugin for module 'PreviewsMacros' not found
KeyboardShortcuts main still carries these blocks, so a dependency bump would not fix this.
3. SwiftUIMacros plugin missing from CLT. With (2) worked around, the build fails again on CE's own source: @Entry is used at 8 sites across 4 files (App/FontPreset.swift, Features/AgentMode/Views/AgentMessageBubble.swift, Features/AgentMode/Views/ToolCards/ToolCardContainer.swift, Infrastructure/UI/Markdown/MarkdownFileLinkInteraction.swift):
grep -rn '@Entry' Sources/RepoPrompt | wc -l # 8
# error: external macro implementation type 'SwiftUIMacros.EntryMacro' could not be found
# for macro 'Entry()'; plugin for module 'SwiftUIMacros' not found
The pattern: CLT alone is structurally insufficient for this codebase, and doctor.sh currently can't tell a contributor that.
CI doesn't surface any of this because GitHub's macos-26 runners ship Xcode.app, so the CLT path is never exercised.
Two suggestions, either of which would close the trap:
doctor.sh gains a macro-compile probe (and ideally a tiny dump-package probe for (1)) — compile a snippet using #Preview/@Entry and hard-fail with "install Xcode.app" guidance when the plugins are absent;
- or the docs state plainly that Xcode.app is required to build.
I have a working fix for blocker (2) following the existing Scripts/patches mechanism (same 045cf17 pin, idempotency marker, mirrored release-tooling harness coverage) — happy to PR it if a CLT path is in scope. It deliberately does not claim to restore CLT builds on its own, since (3) remains.
On a CLT-only host (no Xcode.app),
Scripts/doctor.sh --quietpasses butswift build -c release --product RepoPromptcannot succeed. Three distinct failures observed on macOS 26.5, CLT 26.5 (swift-driver 1.148.6, Swift 6.3.2), repo @ 6f8fcbb:1. PackageDescription module mismatch (environment-specific; fixed by CLT reinstall — noted for completeness).
swift package dump-packagefailed on any tools-version-6.x manifest: the CLT.swiftinterfaceadvertises theswiftLanguageModes:init under@available(_PackageDescription 6), butlibPackageDescription.dylibonly exports the legacyswiftLanguageVersions:symbol — compile error when the manifest uses the new label, link error when it doesn't. A clean CLT reinstall resolved it (likely a mismatched mid-cycle update). Relevant here becausedoctor.shpassed throughout: it checks tool presence, not whether the toolchain can actually compile a manifest.2.
PreviewsMacrosplugin missing from CLT. KeyboardShortcuts 2.3.0 (Recorder.swift:172,177,182) has three#Previewblocks. CLT ships onlylibObservationMacros.dylibandlibSwiftMacros.dylibunder/Library/Developer/CommandLineTools/usr/lib/swift/host/plugins/;PreviewsMacrosships with Xcode.app only. Repro on a CLT-only host:KeyboardShortcuts
mainstill carries these blocks, so a dependency bump would not fix this.3.
SwiftUIMacrosplugin missing from CLT. With (2) worked around, the build fails again on CE's own source:@Entryis used at 8 sites across 4 files (App/FontPreset.swift,Features/AgentMode/Views/AgentMessageBubble.swift,Features/AgentMode/Views/ToolCards/ToolCardContainer.swift,Infrastructure/UI/Markdown/MarkdownFileLinkInteraction.swift):The pattern: CLT alone is structurally insufficient for this codebase, and
doctor.shcurrently can't tell a contributor that.CI doesn't surface any of this because GitHub's macos-26 runners ship Xcode.app, so the CLT path is never exercised.
Two suggestions, either of which would close the trap:
doctor.shgains a macro-compile probe (and ideally a tinydump-packageprobe for (1)) — compile a snippet using#Preview/@Entryand hard-fail with "install Xcode.app" guidance when the plugins are absent;I have a working fix for blocker (2) following the existing
Scripts/patchesmechanism (same 045cf17 pin, idempotency marker, mirrored release-tooling harness coverage) — happy to PR it if a CLT path is in scope. It deliberately does not claim to restore CLT builds on its own, since (3) remains.