fix: add Package@swift-6.1.swift for Xcode 26 compatibility#7768
fix: add Package@swift-6.1.swift for Xcode 26 compatibility#7768uny wants to merge 1 commit intogetsentry:v8.xfrom
Conversation
Xcode 26 uses Swift 6.1 which enforces SE-0450 Package Traits. SPM selects version-specific manifests by swift-tools-version, so Package@swift-6.1.swift is used when the Swift 6.1 compiler is active. Changes: - Add Package@swift-6.1.swift with swift-tools-version:6.1 and traits declaration (required by SE-0450) - Keep original Package.swift (5.3) untouched for older toolchains - Binary xcframework URLs remain at 8.58.0 (no SDK change) Fixes: getsentry/sentry-kotlin-multiplatform#535
|
This PR has been automatically closed. The referenced issue is already assigned to someone else. If you believe this assignment is outdated, please comment on the issue to discuss before opening a new PR. Please review our contributing guidelines for more details. |
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Bug Fixes 🐛
🤖 This preview updates automatically when you update the PR. |
|
Looks like this got closed automatically I am reopening it |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2652b58. Configure here.
| .binaryTarget( | ||
| name: "Sentry", | ||
| url: "https://github.com/getsentry/sentry-cocoa/releases/download/8.58.0/Sentry.xcframework.zip", | ||
| checksum: "d883f19575ab064633237c2c58ee16a1e596c58f5efe1c110f65998bc71b0389" |
There was a problem hiding this comment.
Missing checksum comment markers break release automation scripts
High Severity
The checksum lines in Package@swift-6.1.swift are missing the comment markers (e.g., //Sentry-Static, //Sentry-Dynamic, etc.) that Package.swift has. The release script scripts/update-package-sha.sh uses sed patterns matching these exact comments to update checksums during releases. Since the new file is discovered by the script (via find . -name "Package@swift-*.swift") but lacks the markers, the sed replacements will silently fail, leaving stale checksums. The scripts/verify-package-sha.sh script will then fail when it can't grep for these markers, blocking the release pipeline.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 2652b58. Configure here.
| .binaryTarget( | ||
| name: "Sentry", | ||
| url: "https://github.com/getsentry/sentry-cocoa/releases/download/8.58.0/Sentry.xcframework.zip", | ||
| checksum: "d883f19575ab064633237c2c58ee16a1e596c58f5efe1c110f65998bc71b0389" |
There was a problem hiding this comment.
New manifest not in VersionBump files list
High Severity
The Utils/VersionBump/main.swift utility, which is invoked during releases via scripts/bump.sh, has a hardcoded files array that includes ./Package.swift but not ./Package@swift-6.1.swift. The updateVersion function does string replacement of the old version number with the new one in each listed file. Since the new manifest isn't listed, its download URLs (containing the version like 8.58.0) will remain stale after future version bumps, causing Xcode 26 users to download the wrong xcframework binaries.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 2652b58. Configure here.


Problem
Xcode 26 (Swift 6.1) enforces SE-0450 Package Traits. When resolving SPM packages, it uses the version-specific manifest
Package@swift-6.1.swiftif available, and rejects packages that declare no traits with the error:This affects all users of sentry-cocoa 8.x on Xcode 26.
Solution
Add
Package@swift-6.1.swift— a version-specific manifest that SPM uses when the Swift 6.1 compiler is active (Xcode 26). This is the same approach used on themainbranch for 9.x.The manifest:
swift-tools-version:6.1(required fortraitsparameter)traits: [.default(enabledTraits: [])](satisfies SE-0450)swiftLanguageModes: [.v5](maintains Swift 5 compatibility)The original
Package.swift(swift-tools-version:5.3) is untouched and continues to work with older Xcode versions.Verification
Tested on macOS 26 + Xcode 26 (Swift 6.1):
swift package dump-package✅Fixes: getsentry/sentry-kotlin-multiplatform#535