-
-
Notifications
You must be signed in to change notification settings - Fork 372
feat: Add SPM sample #6439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add SPM sample #6439
Conversation
|
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| a3dfd57 | 1230.78 ms | 1244.91 ms | 14.14 ms |
| e9f483c | 1224.60 ms | 1260.00 ms | 35.40 ms |
| ad964ca | 1234.73 ms | 1254.88 ms | 20.15 ms |
| 0b6776b | 1230.18 ms | 1262.06 ms | 31.88 ms |
| 52bdc10 | 1216.35 ms | 1255.18 ms | 38.83 ms |
| 3cdbc22 | 1231.63 ms | 1251.06 ms | 19.43 ms |
| d48a247 | 1243.59 ms | 1273.27 ms | 29.67 ms |
| c585b1e | 1232.88 ms | 1249.45 ms | 16.58 ms |
| aff3b66 | 1229.53 ms | 1263.08 ms | 33.55 ms |
| f262e10 | 1226.88 ms | 1250.39 ms | 23.51 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| a3dfd57 | 23.75 KiB | 913.63 KiB | 889.87 KiB |
| e9f483c | 23.75 KiB | 1022.77 KiB | 999.03 KiB |
| ad964ca | 23.75 KiB | 913.17 KiB | 889.42 KiB |
| 0b6776b | 23.75 KiB | 968.23 KiB | 944.49 KiB |
| 52bdc10 | 23.75 KiB | 1022.78 KiB | 999.03 KiB |
| 3cdbc22 | 23.75 KiB | 928.14 KiB | 904.40 KiB |
| d48a247 | 23.75 KiB | 994.73 KiB | 970.99 KiB |
| c585b1e | 23.75 KiB | 879.95 KiB | 856.21 KiB |
| aff3b66 | 23.75 KiB | 978.53 KiB | 954.78 KiB |
| f262e10 | 23.75 KiB | 913.62 KiB | 889.87 KiB |
Previous results on branch: addSPMExample
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| a2acf83 | 1208.89 ms | 1242.36 ms | 33.47 ms |
| 8afcfeb | 1216.15 ms | 1236.04 ms | 19.89 ms |
| 1268f4f | 1226.69 ms | 1263.32 ms | 36.63 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| a2acf83 | 24.14 KiB | 1.01 MiB | 1014.00 KiB |
| 8afcfeb | 23.74 KiB | 1008.68 KiB | 984.94 KiB |
| 1268f4f | 23.74 KiB | 1009.43 KiB | 985.68 KiB |
005e509 to
786d2c1
Compare
786d2c1 to
1f2bfe3
Compare
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
2f42897 to
f4c8186
Compare
itaybre
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with a comment
philprime
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with comments to consider
f4c8186 to
7210241
Compare
This reverts commit 2181b05.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Binary Target Removal Fails, Creating Orphans
Removing the conditional wrapper around targets.append breaks the --remove-binary-targets flag in prepare-package.sh. The script's sed pattern /^let env = getenv("EXPERIMENTAL_SPM_BUILDS")/,/^}/d no longer matches, leaving the append statement intact. After the script replaces the targets array with only SentryDistribution, the unconditional append re-adds all SentrySPM targets without corresponding products, creating orphaned targets.
Package.swift#L76-L114
Lines 76 to 114 in 29c5899
| products.append(.library(name: "SentrySPM", type: .dynamic, targets: ["SentryObjc"])) | |
| targets.append(contentsOf: [ | |
| // At least one source file is required, therefore we use a dummy class to satisfy the SPM build system | |
| .target( | |
| name: "SentryHeaders", | |
| path: "Sources/Sentry", | |
| sources: ["SentryDummyPublicEmptyClass.m"], | |
| publicHeadersPath: "Public" | |
| ), | |
| .target( | |
| name: "_SentryPrivate", | |
| dependencies: ["SentryHeaders"], | |
| path: "Sources/Sentry", | |
| sources: ["SentryDummyPrivateEmptyClass.m"], | |
| publicHeadersPath: "include", | |
| cSettings: [.headerSearchPath("include/HybridPublic")]), | |
| .target( | |
| name: "SentrySwift", | |
| dependencies: ["_SentryPrivate", "SentryHeaders"], | |
| path: "Sources/Swift", | |
| swiftSettings: [ | |
| .unsafeFlags(["-enable-library-evolution"]) | |
| ]), | |
| .target( | |
| name: "SentryObjc", | |
| dependencies: ["SentrySwift"], | |
| path: "Sources", | |
| exclude: ["Sentry/SentryDummyPublicEmptyClass.m", "Sentry/SentryDummyPrivateEmptyClass.m", "Swift", "SentrySwiftUI", "Resources", "Configuration", "SentryCppHelper", "SentryDistribution", "SentryDistributionTests"], | |
| cSettings: [ | |
| .headerSearchPath("Sentry/include/HybridPublic"), | |
| .headerSearchPath("Sentry"), | |
| .headerSearchPath("SentryCrash/Recording"), | |
| .headerSearchPath("SentryCrash/Recording/Monitors"), | |
| .headerSearchPath("SentryCrash/Recording/Tools"), | |
| .headerSearchPath("SentryCrash/Installations"), | |
| .headerSearchPath("SentryCrash/Reporting/Filters"), | |
| .headerSearchPath("SentryCrash/Reporting/Filters/Tools")]) | |
| ]) |
This adds a sample app that builds natively with SPM. I don't want to call this GA yet, but once we merge this it will be possible for anyone to build with SPM and I would update the docs to call it a pre-release. With a future major version we can update all the public API to be in Swift and then call it GA
#skip-changelog
Closes #6762