Skip to content

fix: Add Package@swift-6.1.swift for Xcode 26 SPM compatibility#7784

Merged
itaybre merged 11 commits intov8.xfrom
fix/xcode-26-spm-traits
Apr 9, 2026
Merged

fix: Add Package@swift-6.1.swift for Xcode 26 SPM compatibility#7784
itaybre merged 11 commits intov8.xfrom
fix/xcode-26-spm-traits

Conversation

@itaybre
Copy link
Copy Markdown
Contributor

@itaybre itaybre commented Apr 9, 2026

Summary

This PR extends the release tooling introduced in #7768 to fully support Package@swift-6.1.swift alongside Package.swift.

  • Package@swift-6.1.swift: Added inline marker comments (//Sentry-Static, //Sentry-Dynamic, etc.) to each binary target checksum line. update-package-sha.sh and verify-package-sha.sh already glob Package@swift-*.swift files, but rely on these comments for their sed/grep patterns.
  • Utils/VersionBump/main.swift: Added ./Package@swift-6.1.swift to the files array so version bump updates the download URLs in it during releases.
  • .github/actions/prepare-package.swift/action.yml: Updated the action to loop over all Package*.swift files automatically (removed the now-unnecessary package-file input), consistent with update-package-sha.sh and verify-package-sha.sh.

Fixes: getsentry/sentry-kotlin-multiplatform#535

Test plan

  • version-bump-util CI job covers Package@swift-6.1.swift via the run_version_bump_util_for_prs filter (Package*.swift glob)
  • release CI job's prepare-package.swift action now processes both package files

uny and others added 2 commits April 1, 2026 09:08
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
- Add checksum marker comments to Package@swift-6.1.swift so that
  update-package-sha.sh and verify-package-sha.sh can find and update
  the checksums (they already glob Package@swift-*.swift files but rely
  on the inline //Sentry-* comments for sed/grep patterns)
- Add ./Package@swift-6.1.swift to the VersionBump files list so the
  version URL is bumped during releases
- Update prepare-package.swift action to loop over all Package*.swift
  files (removing unused package-file input), consistent with the other
  release scripts
- Update clang-format (22.1.3) and swiftlint (0.63.2) version files
  and apply reformatting

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@itaybre itaybre changed the base branch from main to v8.x April 9, 2026 03:44
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Bug Fixes 🐛

  • Add Package@swift-6.1.swift for Xcode 26 SPM compatibility by itaybre in #7784
  • Add Package@swift-6.1.swift for Xcode 26 SPM compatibility by itaybre in #7784

🤖 This preview updates automatically when you update the PR.

@itaybre itaybre added the ready-to-merge Use this label to trigger all PR workflows label Apr 9, 2026
@itaybre itaybre closed this Apr 9, 2026
@itaybre itaybre reopened this Apr 9, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 9, 2026

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
4086 1 4085 28
View the top 1 failed test(s) by shortest run time
SentryTests.SentryANRTrackerV1Tests::testMultipleListeners
Stack Traces | 0s run time
.../Integrations/ANR/SentryANRTrackerV1Tests.swift:78 - Asynchronous wait failed: Exceeded timeout of 5 seconds, with unfulfilled expectations: "ANR Detection".

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

itaybre and others added 6 commits April 9, 2026 08:36
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- Updated build and test scripts to use iOS simulator version 18.5 instead of 18.4.
- Adjusted references in build.yml, release.yml, test-cross-platform.yml, test.yml, and ui-tests-critical.yml.
- Modified Fastfile in the iOS-Cocoapods-Swift6 sample to reflect the new simulator version.
Swift 6.1's stricter SPM validation requires publicHeadersPath to be
explicitly set when the default 'include' directory doesn't exist at
the target root. SentryObjc uses path: "Sources" but headers live at
Sources/Sentry/include, so we explicitly set publicHeadersPath to
"Sentry/include".

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1223.65 ms 1257.30 ms 33.64 ms
Size 24.15 KiB 1005.13 KiB 980.99 KiB

Baseline results on branch: v8.x

Startup times

Revision Plain With Sentry Diff
e537c90 1226.22 ms 1256.64 ms 30.41 ms
b66be9b 1218.22 ms 1244.19 ms 25.96 ms
5e3fb04 1239.84 ms 1267.39 ms 27.55 ms
b79b552 1216.04 ms 1241.27 ms 25.22 ms
33c9619 1233.02 ms 1252.60 ms 19.58 ms
48dc176 1204.96 ms 1237.73 ms 32.77 ms
b79b552 1210.26 ms 1232.54 ms 22.28 ms
f73c5c8 1211.10 ms 1234.62 ms 23.51 ms
3af1ae9 1225.60 ms 1252.65 ms 27.05 ms
237dfb1 1214.90 ms 1258.63 ms 43.73 ms

App size

Revision Plain With Sentry Diff
e537c90 23.75 KiB 992.03 KiB 968.28 KiB
b66be9b 23.75 KiB 996.03 KiB 972.28 KiB
5e3fb04 23.74 KiB 981.30 KiB 957.56 KiB
b79b552 23.75 KiB 992.16 KiB 968.41 KiB
33c9619 24.14 KiB 1001.34 KiB 977.19 KiB
48dc176 24.14 KiB 1001.34 KiB 977.20 KiB
b79b552 23.75 KiB 992.25 KiB 968.50 KiB
f73c5c8 24.14 KiB 1001.32 KiB 977.18 KiB
3af1ae9 23.74 KiB 981.29 KiB 957.55 KiB
237dfb1 23.75 KiB 1000.79 KiB 977.04 KiB

Previous results on branch: fix/xcode-26-spm-traits

Startup times

Revision Plain With Sentry Diff
b524b9e 1223.43 ms 1262.06 ms 38.64 ms
22d1c5f 1238.51 ms 1271.88 ms 33.37 ms

App size

Revision Plain With Sentry Diff
b524b9e 24.15 KiB 1005.14 KiB 980.99 KiB
22d1c5f 24.15 KiB 1005.13 KiB 980.99 KiB

itaybre added 2 commits April 9, 2026 10:30
Removed deprecated comments and updated iOS simulator version.
Consolidate changelog entries for Xcode 26 SPM compatibility.
@itaybre itaybre changed the title fix: update release scripts to handle Package@swift-6.1.swift fix: Add Package@swift-6.1.swift for Xcode 26 SPM compatibility Apr 9, 2026
Copy link
Copy Markdown
Member

@romtsn romtsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@itaybre itaybre merged commit e5256c6 into v8.x Apr 9, 2026
145 checks passed
@itaybre itaybre deleted the fix/xcode-26-spm-traits branch April 9, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Use this label to trigger all PR workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants