Skip to content

Preserve Package.resolved v3 format on Xcode 15.3+/16+#3

Merged
maximbilan merged 1 commit into
mainfrom
fix/preserve-resolved-v3-format
Jun 5, 2026
Merged

Preserve Package.resolved v3 format on Xcode 15.3+/16+#3
maximbilan merged 1 commit into
mainfrom
fix/preserve-resolved-v3-format

Conversation

@maximbilan

Copy link
Copy Markdown
Owner

Summary

  • Running this action on a project whose Package.resolved is format v3 (Xcode 15.3+/16+) was silently downgrading the file to v2 — see myswimpro/MySwimPro-ios#9181 where "version" : 3 flipped to "version" : 2.
  • Root cause: SPM keys the Package.resolved format off the synthetic manifest's swift-tools-version. 5.9 → v2; 5.10+ → v3 (with originHash). The default was 5.9.
  • Fix: bump the default --tools-version to 5.10. Verified locally that SPM now writes a proper v3 file with originHash.

Test plan

  • python3 update_spm.py --search-dir test/fixture --print-manifest shows // swift-tools-version:5.10
  • python3 update_spm.py --search-dir test/fixture --dry-run produces a Package.resolved with "version" : 3 and an originHash field
  • Re-run the action against a real Xcode 16+ project and confirm the PR no longer flips the version field

🤖 Generated with Claude Code

…ge.resolved v3

SPM keys the Package.resolved format version off the manifest's
swift-tools-version (5.9 -> v2, 5.10+ -> v3 with originHash). Projects
on Xcode 15.3+/16+ already ship a v3 file; the old default silently
downgraded it on every run.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@maximbilan
maximbilan merged commit f7c8a4c into main Jun 5, 2026
1 check passed
@maximbilan
maximbilan deleted the fix/preserve-resolved-v3-format branch June 5, 2026 16:28
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