Skip to content

fix: Change parameter of SDKInfo.initWithOptions to be nullable#4968

Merged
philprime merged 3 commits intomainfrom
philprime/null-handling-sentry-options
Mar 11, 2025
Merged

fix: Change parameter of SDKInfo.initWithOptions to be nullable#4968
philprime merged 3 commits intomainfrom
philprime/null-handling-sentry-options

Conversation

@philprime
Copy link
Copy Markdown
Member

📜 Description

Changes the parameter SDKInfo.initWithOptions to be nullable.

💡 Motivation and Context

The options can be nullable and will throw if doing something like options.sessionReplay.enableExperimentalViewRenderer.

This change is required for #4940.

💚 How did you test it?

Added a unit test

📝 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.

🔮 Next steps

@github-actions
Copy link
Copy Markdown
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1222.76 ms 1251.10 ms 28.34 ms
Size 22.30 KiB 823.35 KiB 801.05 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
8aec30e 1244.71 ms 1262.20 ms 17.49 ms
313b1d9 1240.18 ms 1258.44 ms 18.26 ms
649d940 1231.69 ms 1250.76 ms 19.06 ms
1734d1b 1198.69 ms 1221.62 ms 22.93 ms
ed1c644 1225.92 ms 1241.24 ms 15.33 ms
99fe600 1226.16 ms 1236.88 ms 10.71 ms
887502e 1225.40 ms 1249.92 ms 24.51 ms
2de284c 1234.92 ms 1254.45 ms 19.53 ms
3f6c30b 1252.98 ms 1266.22 ms 13.24 ms
2b19b82 1226.73 ms 1243.27 ms 16.53 ms

App size

Revision Plain With Sentry Diff
8aec30e 21.58 KiB 616.76 KiB 595.18 KiB
313b1d9 22.85 KiB 414.11 KiB 391.26 KiB
649d940 21.58 KiB 695.36 KiB 673.78 KiB
1734d1b 21.58 KiB 418.82 KiB 397.24 KiB
ed1c644 21.58 KiB 670.39 KiB 648.81 KiB
99fe600 21.90 KiB 708.13 KiB 686.23 KiB
887502e 21.58 KiB 704.26 KiB 682.67 KiB
2de284c 21.58 KiB 542.39 KiB 520.80 KiB
3f6c30b 22.85 KiB 408.88 KiB 386.03 KiB
2b19b82 21.58 KiB 542.18 KiB 520.60 KiB

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.504%. Comparing base (d320991) to head (88cde02).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #4968       +/-   ##
=============================================
+ Coverage   92.396%   92.504%   +0.107%     
=============================================
  Files          666       666               
  Lines        78979     78996       +17     
  Branches     27738     28602      +864     
=============================================
+ Hits         72974     73075      +101     
+ Misses        5914      5824       -90     
- Partials        91        97        +6     
Files with missing lines Coverage Δ
Sources/Sentry/SentrySdkInfo.m 100.000% <100.000%> (ø)
...es/Swift/Helper/SentryEnabledFeaturesBuilder.swift 100.000% <100.000%> (ø)
...sts/Helper/SentryEnabledFeaturesBuilderTests.swift 100.000% <100.000%> (ø)

... and 26 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 d320991...88cde02. Read the comment docs.

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

Copy link
Copy Markdown
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@philprime philprime merged commit e445ef2 into main Mar 11, 2025
48 of 50 checks passed
@philprime philprime deleted the philprime/null-handling-sentry-options branch March 11, 2025 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants