Skip to content

chore: Add Package@swift-6.2.swift#7778

Open
itaybre wants to merge 7 commits intomainfrom
itay/add_package_6.2
Open

chore: Add Package@swift-6.2.swift#7778
itaybre wants to merge 7 commits intomainfrom
itay/add_package_6.2

Conversation

@itaybre
Copy link
Copy Markdown
Contributor

@itaybre itaybre commented Apr 6, 2026

📜 Description

Add a newer Package@swift-6.2.swift, so newer SPM tools use it instead and allow using unsafe flags.

💡 Motivation and Context

When using plain SPM, seems like using unsafe flags is disabled when swift tools is lower than 6.1

Fixes: #7738

💚 How did you test it?

Tested it with a sample project and using releases on a fork

📝 Checklist

You have to check all boxes before merging:

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

@itaybre itaybre added the ready-to-merge Use this label to trigger all PR workflows label Apr 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 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).


Internal Changes 🔧

  • Add Package@swift-6.2.swift by itaybre in #7778

🤖 This preview updates automatically when you update the PR.

@itaybre itaybre changed the title Itay/add package 6.2 chore: Add Package@swift-6.2.swift Apr 6, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.392%. Comparing base (0bff410) to head (7a8c78e).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #7778       +/-   ##
=============================================
+ Coverage   85.135%   85.392%   +0.256%     
=============================================
  Files          487       487               
  Lines        29183     29183               
  Branches     12612     12621        +9     
=============================================
+ Hits         24845     24920       +75     
+ Misses        4286      4212       -74     
+ Partials        52        51        -1     

see 12 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0bff410...7a8c78e. Read the comment docs.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1205.94 ms 1228.64 ms 22.70 ms
Size 24.14 KiB 1.13 MiB 1.11 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
8d9e501 1233.04 ms 1260.40 ms 27.35 ms
d0b4402 1218.62 ms 1241.80 ms 23.18 ms
e06cf5f 1222.96 ms 1254.66 ms 31.70 ms
09a80f2 1214.78 ms 1237.85 ms 23.07 ms
17fe3fd 1224.77 ms 1259.00 ms 34.23 ms
dbfeb41 1215.17 ms 1237.41 ms 22.23 ms
0e4a9dc 1222.92 ms 1255.78 ms 32.86 ms
b882255 1216.49 ms 1253.66 ms 37.17 ms
4883c74 1224.80 ms 1258.65 ms 33.85 ms
5fff6ba 1206.13 ms 1232.49 ms 26.36 ms

App size

Revision Plain With Sentry Diff
8d9e501 24.14 KiB 1.12 MiB 1.10 MiB
d0b4402 24.14 KiB 1.11 MiB 1.08 MiB
e06cf5f 24.14 KiB 1.13 MiB 1.10 MiB
09a80f2 24.14 KiB 1.10 MiB 1.08 MiB
17fe3fd 24.14 KiB 1.12 MiB 1.10 MiB
dbfeb41 24.14 KiB 1.04 MiB 1.02 MiB
0e4a9dc 24.14 KiB 1.11 MiB 1.09 MiB
b882255 24.14 KiB 1.12 MiB 1.09 MiB
4883c74 24.14 KiB 1.12 MiB 1.10 MiB
5fff6ba 24.14 KiB 1.13 MiB 1.10 MiB

Previous results on branch: itay/add_package_6.2

Startup times

Revision Plain With Sentry Diff
4a2d69f 1194.06 ms 1218.38 ms 24.32 ms

App size

Revision Plain With Sentry Diff
4a2d69f 24.14 KiB 1.13 MiB 1.11 MiB

@itaybre itaybre marked this pull request as ready for review April 8, 2026 01:02
var targets: [Target] = [
.binaryTarget(
name: "Sentry",
url: "https://github.com/getsentry/sentry-cocoa/releases/download/9.9.0/Sentry.xcframework.zip",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The new Package@swift-6.2.swift file is missing from the hardcoded list in the VersionBump script, which will prevent its binary target URLs from being updated during releases.
Severity: HIGH

Suggested Fix

Add Package@swift-6.2.swift to the files array in Utils/VersionBump/main.swift. Consider using a glob pattern to automatically discover Package@swift-*.swift files to prevent this issue in the future.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: Package@swift-6.2.swift#L26

Potential issue: The `VersionBump` utility, used during releases, relies on a hardcoded
list of files to update version numbers. The newly added `Package@swift-6.2.swift` is
not in this list. Consequently, when a new version is released, the binary target URLs
within this file will not be updated and will continue to point to the old `9.9.0`
binaries. While the checksum update script correctly discovers the file, it cannot fix
the stale URLs. This will cause Swift 6.2+ users to silently receive an outdated SDK
version, regardless of the version they specify in their package dependencies.

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ce93130. Configure here.

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.

the target 'SentrySwift' in product 'SentrySPM' contains unsafe build flags

1 participant