sentry-cocoa icon indicating copy to clipboard operation
sentry-cocoa copied to clipboard

ref: Convert SentryExtraPackages to Swift

Open noahsmartin opened this issue 6 months ago • 2 comments

:scroll: Description

Converts SentryExtraPackages to Swift, found this as a small internal class that is easy to migrate. I kept the API of the class the same so hybrid SDKs don't have to make any changes, since it is still exposed to objc with @objc

:green_heart: How did you test it?

Tests already exist for this class

:pencil: Checklist

You have to check all boxes before merging:

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

#skip-changelog

noahsmartin avatar Jun 21 '25 03:06 noahsmartin

Codecov Report

Attention: Patch coverage is 55.55556% with 16 lines in your changes missing coverage. Please review.

Project coverage is 86.269%. Comparing base (8ea5293) to head (1c7f99e). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
Sources/Sentry/SentryProfileCollector.mm 0.000% 12 Missing :warning:
Sources/Sentry/PrivateSentrySDKOnly.m 0.000% 3 Missing :warning:
...ources/Swift/Core/Helper/SentryExtraPackages.swift 95.238% 1 Missing :warning:
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #5453       +/-   ##
=============================================
+ Coverage   85.773%   86.269%   +0.496%     
=============================================
  Files          400       401        +1     
  Lines        34802     34865       +63     
  Branches     14769     15135      +366     
=============================================
+ Hits         29851     30078      +227     
+ Misses        4909      4746      -163     
+ Partials        42        41        -1     
Files with missing lines Coverage Δ
Sources/Sentry/SentrySdkInfo.m 100.000% <ø> (ø)
...ources/Swift/Core/Helper/SentryExtraPackages.swift 95.238% <95.238%> (ø)
Sources/Sentry/PrivateSentrySDKOnly.m 24.019% <0.000%> (ø)
Sources/Sentry/SentryProfileCollector.mm 0.000% <0.000%> (ø)

... and 42 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 8ea5293...1c7f99e. Read the comment docs.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Jun 21 '25 04:06 codecov[bot]

Performance metrics :rocket:

  Plain With Sentry Diff
Startup time 1226.24 ms 1245.91 ms 19.67 ms
Size 23.75 KiB 854.77 KiB 831.02 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
fc0757dafef9fca8b8101395728bae8800c6a65a 1231.83 ms 1248.98 ms 17.15 ms
2b02431104d0f2ae572950a3f9e14e29e19b5eb5 1229.63 ms 1248.98 ms 19.35 ms
2691350f392f9e1d9cfebba331b3cd210822d385 1224.92 ms 1255.82 ms 30.90 ms
8ea529392812f6159f226be117c1d6e6eaab9f9f 1242.70 ms 1262.25 ms 19.55 ms
5cfc76877e04e23aca2f156286738a33882cd485 1220.74 ms 1245.06 ms 24.32 ms

App size

Revision Plain With Sentry Diff
fc0757dafef9fca8b8101395728bae8800c6a65a 23.75 KiB 850.73 KiB 826.98 KiB
2b02431104d0f2ae572950a3f9e14e29e19b5eb5 23.75 KiB 850.73 KiB 826.98 KiB
2691350f392f9e1d9cfebba331b3cd210822d385 23.75 KiB 850.73 KiB 826.98 KiB
8ea529392812f6159f226be117c1d6e6eaab9f9f 23.75 KiB 852.24 KiB 828.49 KiB
5cfc76877e04e23aca2f156286738a33882cd485 23.75 KiB 850.73 KiB 826.98 KiB

Previous results on branch: sentryExtraPackagesSwift

Startup times

Revision Plain With Sentry Diff
b3275dab4cd93a38c5dea5b1014a3160bfe8954e 1218.35 ms 1242.28 ms 23.93 ms
d50788eb1dbedb4f8618a8920f7520ca02623642 1239.90 ms 1265.45 ms 25.55 ms
6223d1f8f793e002d91f0d275dbb8e3e66cdf56a 1212.81 ms 1245.67 ms 32.86 ms

App size

Revision Plain With Sentry Diff
b3275dab4cd93a38c5dea5b1014a3160bfe8954e 23.75 KiB 853.95 KiB 830.20 KiB
d50788eb1dbedb4f8618a8920f7520ca02623642 23.75 KiB 855.17 KiB 831.42 KiB
6223d1f8f793e002d91f0d275dbb8e3e66cdf56a 23.75 KiB 853.94 KiB 830.19 KiB

github-actions[bot] avatar Jun 21 '25 04:06 github-actions[bot]