fix(build): pin XcodeGen for CI and local builds, stabilize test failure reporting#88
Open
gly11 wants to merge 5 commits into
Open
fix(build): pin XcodeGen for CI and local builds, stabilize test failure reporting#88gly11 wants to merge 5 commits into
gly11 wants to merge 5 commits into
Conversation
This was referenced Jul 26, 2026
gly11
marked this pull request as ready for review
July 26, 2026 14:31
The pin added earlier in this branch only bound CI. build.sh still ran whatever xcodegen was on PATH, and it regenerates ASFW.xcodeproj on every non-test-only build. Homebrew currently ships 2.46.0 while the pin was 2.45.4, and their output is not byte-identical -- 2.46.0 reorders the pbxproj `targets` array. So a single ./build.sh on a brew-current machine produces a project the drift check rejects, and that check's error message tells you to regenerate, which reproduces the same diff. Move the version and its SHA-256 into .xcodegen-version and have both the workflow and build.sh read it, so the two can no longer disagree. build.sh now stops with an actionable error when the installed version differs, rather than warning and skipping regeneration: a build silently missing a newly added source file is much harder to diagnose than a version mismatch. --no-xcodegen builds the committed project as-is for machines that can't install the pin. Bump the pin to 2.46.0 to match what Homebrew ships today, and regenerate ASFW.xcodeproj with it. The only change is the `targets` array ordering, which has no semantic effect. Document how to install the pinned release in README -- the same download, pin, and checksum CI uses -- since "install the pinned version" isn't actionable without it.
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.
Summary
build.shthrough.xcodegen-versionso CI and localbuilds cannot disagree
undefined, instead of silently falling back to an unpinned
xcodegenxcodebuildexit status in quiet Swift-test runsWhy
The open SBP-2 pull requests each carried copies of the same CI stabilization
commits. Keeping the fixes in one prerequisite PR makes the feature diffs
reviewable. The quiet Swift-test pipeline separately appended
|| truebeforereading
PIPESTATUS, which could report success afterxcodebuildfailed.Pinning only the workflow left the two halves free to drift.
build.shranwhatever
xcodegenwas onPATHand regeneratesASFW.xcodeprojon everynon-test-only build. Homebrew ships 2.46.0 while the workflow pinned 2.45.4,
and their output is not byte-identical — 2.46.0 reorders the pbxproj
targetsarray. A single
./build.shon a brew-current machine would commit a projectthe drift check rejects, and that check tells you to regenerate, reproducing
the same diff. The version and its SHA-256 now live in
.xcodegen-version,read by both sides; the pin moves to 2.46.0 and the project is regenerated with
it (only the
targetsordering changes, no semantic effect).Three decisions worth flagging for review:
build.shfails on a version mismatch rather than warning and skippingregeneration — a build silently missing a newly added source file is harder
to diagnose than a version mismatch.
--no-xcodegenis the escape hatch..xcodegen-versionis also fatal. Guarding thecheck behind the file's existence would mean deleting one file silently
restores the behaviour the guard exists to prevent.
PATHand runshash -r. Without itHomebrew's
xcodegenkeeps winning the lookup and the guard goes on firingeven after a correct install.
Impact
Infrastructure only — no driver, app, protocol, or wire behavior changes.
Contributors with a mismatched or malformed pin now get an explicit error from
build.shinstead of a silently rejected pbxproj; contributors with noxcodegeninstalled are unaffected, since the whole guard sits inside thecommand -v xcodegenbranch.Validation
Project generation and the pin
ASFW.xcodeproj: no drifttargetsordering (identical afternormalizing the pbxproj to sorted JSON)
regeneration, zero drift
XCODEGEN_VERSIONundefined all stop without touching the pbxproj; matching version regenerates
command -v xcodegenthen resolved to the pinned 2.46.0, not the Homebrew copyTest reporting and the rest
xcodebuildexit status of 42ConfigROMStoreConcurrencyTests: 7/7 passed withPRE_TESTdiscoverybash -n build.sh,git diff --checkFollow-up for the stacked PRs
After this merges, #84–#87 should be rebased onto
mainto drop the duplicatedCI commits. #85 and #86 carry pbxproj changes of their own and must have their
project regenerated with the pinned XcodeGen 2.46.0 as part of that rebase, or
the drift check will fail. #84 and #87 touch no pbxproj.