Skip to content

ci: fail PRs whose Package.resolved is out of date - #940

Merged
bmc08gt merged 3 commits into
mainfrom
ci/package-resolved-check
Oct 1, 2026
Merged

bmc08gt merged 3 commits into
mainfrom
ci/package-resolved-check

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Adds a check that runs xcodebuild -resolvePackageDependencies -disableAutomaticPackageResolution, the same restriction Xcode Cloud resolves under. The flipcash2 0.14.x bump broke Deploy Flipcash for this reason (fixed in #938): Package.swift moved to exact: 0.14.1, Package.resolved stayed on 0.12.0, and local Xcode re-resolved without anyone noticing.

Against main's stale file it fails in about 40s, before cloning anything, with the same "out-of-date resolved file" error Xcode Cloud hits. Against #938's file it passes and leaves the file unchanged. A second step runs git diff --exit-code on the file in case resolution succeeds but rewrites a pin.

It runs on every PR so it can be a required check: a cheap ubuntu job checks whether a Package.swift, a Package.resolved, project.pbxproj, or the workflow itself changed, and the macOS resolve job is skipped (which GitHub counts as passing) when none did. A workflow-level paths: filter would leave unrelated PRs waiting on a check that never reports.

Xcode Cloud resolves from the committed workspace Package.resolved and
won't update it, so a stale pin fails every deploy while local Xcode
re-resolves silently. The flipcash2 0.14.x bump broke Deploy Flipcash
this way. Resolve with -disableAutomaticPackageResolution, which applies
the same restriction, on PRs that touch a Package.swift, Package.resolved,
or the project file.
@bmc08gt bmc08gt self-assigned this Oct 1, 2026
A workflow-level paths filter leaves PRs that don't match waiting on a
required check that never reports. Move the filter into a cheap ubuntu
job and skip the macOS resolve job when no package file changed; GitHub
counts a job skipped by its if: as passing.
@bmc08gt
bmc08gt merged commit 012093e into main Oct 1, 2026
2 of 3 checks passed
@bmc08gt
bmc08gt deleted the ci/package-resolved-check branch October 5, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant