Unbreak the release build under Xcode 27 - #1301
Conversation
The release path failed to build under the newly pinned Xcode 27, before
compiling any KeyPath code:
error: unable to open dependencies file
(.../swift-argument-parser.build/Release/.../ArgumentParserToolInfo-primary.d)
build-and-sign.sh passed `-Xswiftc -no-whole-module-optimization`. Xcode 27
makes SwiftPM's newer build system the default, and that build system fails
to emit the per-file dependencies output the flag implies. Reproduced
deterministically with the script's exact command outside the script.
The flag was added in August 2025 as a workaround, with the comment
"disable whole-module optimization to avoid hang". That hang no longer
reproduces: a full whole-module release build completes cleanly. The only
way to keep the flag is to force `--build-system native`, which Xcode 27
reports as deprecated and slated for removal. So the stale workaround is
removed, with a comment recording the history and that fallback pair in
case the hang ever returns.
CI only builds Debug and tests, so nothing caught this; it surfaced on the
first real release-candidate build after the pin moved. Verified by that
build: it signs, deploys to /Applications, and passes
verify-installed-app.sh (notarization skipped) with Kanata registered,
running, and TCP-ready.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Reviewed this diff. No actionable correctness/reliability/security/performance/test-coverage findings — the change removes One thing worth keeping in mind (not blocking): restoring WMO for release builds can noticeably increase build time/peak memory during |
The release path fails to build under the newly pinned Xcode 27, before compiling any KeyPath code:
Cause
build-and-sign.shpasses-Xswiftc -no-whole-module-optimization. Xcode 27 makes SwiftPM's newer build system the default, and that build system fails to emit the per-file dependencies output the flag implies. Reproduced deterministically with the script's exact command outside the script.Why removing the flag is the right fix
It was added in August 2025 as a workaround, commented "disable whole-module optimization to avoid hang". That hang no longer reproduces: a full whole-module release build completes cleanly.
The only way to keep the flag is to also force
--build-system native, which Xcode 27 reports as deprecated and slated for removal. So this removes the stale workaround and leaves a comment recording the history, plus that fallback pair if the hang ever returns.Why nothing caught it
CI builds only Debug and tests. This surfaced on the first real release-candidate build after the Xcode pin moved in #1300.
Verification
That release-candidate build, with notarization skipped, now signs, deploys to
/Applications, and passesverify-installed-app.shwith Kanata registered, running, and TCP-ready.🤖 Generated with Claude Code