Skip to content

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

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

chore: Add Package@swift-6.2.swift#7778
itaybre wants to merge 2 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 🔧

Deps

  • Bump mikepenz/action-junit-report from 6.3.1 to 6.4.0 by dependabot in #7773
  • Bump ruby/setup-ruby from 1.298.0 to 1.299.0 by dependabot in #7772
  • Bump fastlane-plugin-sentry from 2.5.0 to 2.5.1 by dependabot in #7771

Other

  • 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.398%. Comparing base (a47ad66) to head (03f4c16).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #7778       +/-   ##
=============================================
- Coverage   85.401%   85.398%   -0.004%     
=============================================
  Files          487       487               
  Lines        29086     29086               
  Branches     12602     12601        -1     
=============================================
- Hits         24840     24839        -1     
- Misses        4196      4197        +1     
  Partials        50        50               

see 1 file 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 a47ad66...03f4c16. 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 1194.06 ms 1218.38 ms 24.32 ms
Size 24.14 KiB 1.13 MiB 1.11 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
bc00c87 1214.34 ms 1245.67 ms 31.33 ms
b590539 1220.42 ms 1239.82 ms 19.40 ms
3950d78 1212.52 ms 1243.20 ms 30.68 ms
a47ad66 1221.94 ms 1249.59 ms 27.66 ms
1a887e2 1212.46 ms 1241.33 ms 28.87 ms
eaeb9bc 1216.22 ms 1250.78 ms 34.56 ms
554a67d 1225.85 ms 1254.71 ms 28.86 ms
6515f11 1214.72 ms 1244.82 ms 30.10 ms
d68691e 1221.48 ms 1248.13 ms 26.65 ms
21cd5ba 1218.68 ms 1255.54 ms 36.86 ms

App size

Revision Plain With Sentry Diff
bc00c87 24.14 KiB 1.13 MiB 1.10 MiB
b590539 24.14 KiB 1.12 MiB 1.09 MiB
3950d78 24.14 KiB 1.11 MiB 1.09 MiB
a47ad66 24.14 KiB 1.13 MiB 1.10 MiB
1a887e2 24.14 KiB 1.09 MiB 1.07 MiB
eaeb9bc 24.14 KiB 1.12 MiB 1.10 MiB
554a67d 24.14 KiB 1.13 MiB 1.10 MiB
6515f11 24.14 KiB 1.11 MiB 1.09 MiB
d68691e 24.14 KiB 1.12 MiB 1.09 MiB
21cd5ba 24.14 KiB 1.04 MiB 1.02 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.

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