Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Runtime error when including Sentry static #3820

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

philipphofmann
Copy link
Member

馃摐 Description

Again, remove category functions to avoid NSInvalidArgumentException when including Sentry statically.

This is related to #3763 and #3819.

馃挕 Motivation and Context

While fixing #3818, I checked to see if we still have other category methods.

馃挌 How did you test it?

Same problem as #3763, for which removing the category function worked. So no need for an extra test.

馃摑 Checklist

You have to check all boxes before merging:

  • I reviewed the submitted code.
  • 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.
  • 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.

馃敭 Next steps

Again remove category functions to avoid NSInvalidArgumentException
when including Sentry statically.
Copy link

github-actions bot commented Apr 3, 2024

馃毃 Detected changes in high risk code 馃毃

High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:

  • Sources/Sentry/SentryUIViewControllerSwizzling.m

Copy link

codecov bot commented Apr 3, 2024

Codecov Report

Attention: Patch coverage is 90.32258% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 90.965%. Comparing base (645f63f) to head (8502842).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #3820       +/-   ##
=============================================
+ Coverage   90.941%   90.965%   +0.024%     
=============================================
  Files          559       560        +1     
  Lines        44366     44143      -223     
  Branches     15725     15753       +28     
=============================================
- Hits         40347     40155      -192     
+ Misses        3949      3918       -31     
  Partials        70        70               
Files Coverage 螖
Sources/Sentry/SentryUIViewControllerSwizzling.m 87.619% <酶> (酶)
...h/Reporting/Filters/SentryCrashReportFilterBasic.m 95.022% <100.000%> (酶)
...ntryTests/SentryCrash/Container+DeepSearch_Tests.m 100.000% <100.000%> (酶)
...porting/Filters/Tools/SentryDictionaryDeepSearch.m 86.956% <86.956%> (酶)

... and 24 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 645f63f...8502842. Read the comment docs.

Copy link

github-actions bot commented Apr 3, 2024

Performance metrics 馃殌

Plain With Sentry Diff
Startup time 1228.04 ms 1243.94 ms 15.90 ms
Size 21.58 KiB 571.76 KiB 550.18 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
5616e0a 1224.12 ms 1249.86 ms 25.74 ms
effc81c 1253.71 ms 1256.16 ms 2.45 ms
794f87f 1225.78 ms 1243.46 ms 17.68 ms
94b89eb 1236.08 ms 1264.58 ms 28.50 ms
ecd9ecd 1204.67 ms 1226.46 ms 21.79 ms
f938d24 1223.26 ms 1242.12 ms 18.86 ms
6001822 1265.10 ms 1270.40 ms 5.30 ms
8526e93 1228.24 ms 1239.14 ms 10.90 ms
2b55154 1231.36 ms 1247.82 ms 16.46 ms
fc015e2 1219.78 ms 1239.15 ms 19.37 ms

App size

Revision Plain With Sentry Diff
5616e0a 22.85 KiB 407.44 KiB 384.59 KiB
effc81c 20.76 KiB 433.18 KiB 412.42 KiB
794f87f 20.76 KiB 401.37 KiB 380.61 KiB
94b89eb 20.76 KiB 399.20 KiB 378.43 KiB
ecd9ecd 20.76 KiB 420.23 KiB 399.47 KiB
f938d24 20.76 KiB 434.88 KiB 414.12 KiB
6001822 22.85 KiB 410.98 KiB 388.13 KiB
8526e93 20.76 KiB 420.22 KiB 399.47 KiB
2b55154 22.84 KiB 402.19 KiB 379.34 KiB
fc015e2 21.58 KiB 546.20 KiB 524.62 KiB

@philipphofmann philipphofmann merged commit 1ee3d54 into main Apr 3, 2024
68 of 70 checks passed
@philipphofmann philipphofmann deleted the fix/remove-category-functions branch April 3, 2024 09:12
dKasabwala pushed a commit to dKasabwala/sentry-cocoa that referenced this pull request May 6, 2024
Again remove category functions to avoid NSInvalidArgumentException
when including Sentry statically.
threema-matteo pushed a commit to threema-ch/sentry-cocoa that referenced this pull request May 21, 2024
Again remove category functions to avoid NSInvalidArgumentException
when including Sentry statically.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants