-
-
Notifications
You must be signed in to change notification settings - Fork 342
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
refactor: Change type of Swift String constants to NSString #4894
refactor: Change type of Swift String constants to NSString #4894
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4894 +/- ##
=============================================
+ Coverage 92.369% 92.371% +0.001%
=============================================
Files 659 659
Lines 77548 77549 +1
Branches 28079 28081 +2
=============================================
+ Hits 71631 71633 +2
+ Misses 5821 5817 -4
- Partials 96 99 +3
... and 14 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
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.
The tests are failing. We should investigate how we can avoid this issue from happening again. It doesn't have to be in this PR, but we must come up with something cause it can happen again.
…change-constants-to-nsstring
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
075a044 | 1237.26 ms | 1255.36 ms | 18.10 ms |
7fb7afb | 1235.00 ms | 1256.81 ms | 21.81 ms |
2b19b82 | 1212.94 ms | 1252.84 ms | 39.90 ms |
257c2a9 | 1231.45 ms | 1252.12 ms | 20.67 ms |
6129be5 | 1215.65 ms | 1247.18 ms | 31.54 ms |
3bf3c92 | 1236.94 ms | 1253.00 ms | 16.06 ms |
5d6ce0e | 1237.10 ms | 1257.46 ms | 20.36 ms |
319f0f5 | 1229.68 ms | 1247.67 ms | 17.99 ms |
7cd187e | 1239.39 ms | 1258.02 ms | 18.63 ms |
48e8c2e | 1231.00 ms | 1244.52 ms | 13.52 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
075a044 | 20.76 KiB | 420.41 KiB | 399.65 KiB |
7fb7afb | 20.76 KiB | 419.69 KiB | 398.94 KiB |
2b19b82 | 21.58 KiB | 542.18 KiB | 520.59 KiB |
257c2a9 | 20.76 KiB | 401.36 KiB | 380.60 KiB |
6129be5 | 21.58 KiB | 418.00 KiB | 396.42 KiB |
3bf3c92 | 21.58 KiB | 706.06 KiB | 684.48 KiB |
5d6ce0e | 22.85 KiB | 405.38 KiB | 382.53 KiB |
319f0f5 | 22.30 KiB | 749.70 KiB | 727.40 KiB |
7cd187e | 20.76 KiB | 401.65 KiB | 380.89 KiB |
48e8c2e | 21.58 KiB | 418.44 KiB | 396.86 KiB |
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, if the tests are green. As already pointed out we should follow up with a strategy to prevent regressions.
|
It keeps failing with flaky UI tests unrelated to the changes. Merging this now. |
📜 Description
Change the type of constants to
NSString
.💡 Motivation and Context
We purposely defined constants such as
SentryTraceOrigin
,SentrySpanOperation
andSentrySpanDataKey
in Swift for our long-term effort in migrating to Swift.Stack traces in #4887 indicate that the bridging of Swift String to NSString might be causing memory issues when used from Objective-C blocks (i.e.
useSpan
).This PR is an attempt to reduce the amount of bridging performed.
💚 How did you test it?
Can not be reproduced/tested reliably.