Skip to content

Conversation

antonis
Copy link
Contributor

@antonis antonis commented Aug 5, 2025

📜 Description

Adds self in closures to fix older react native compilation issue

💡 Motivation and Context

See getsentry/sentry-react-native#5038 (comment)

Fixes errors like the following in RN 0.65.3 that uses more strict compilation rules

Error: reference to property 'videoWriter' in closure requires explicit use of 'self' to make capture semantics explicit
            SentrySDKLog.debug("[Session Replay] Finished video writing, status: \(videoWriter.status)")

This should unblock 8.54.0 RN bump along with the other changes in getsentry/sentry-react-native#5038

💚 How did you test it?

CI

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

#skip-changelog

@antonis antonis marked this pull request as ready for review August 5, 2025 14:58
Copy link

codecov bot commented Aug 5, 2025

Codecov Report

❌ Patch coverage is 72.72727% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.641%. Comparing base (b2c7769) to head (8501613).
⚠️ Report is 7 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...ions/SessionReplay/SentryVideoFrameProcessor.swift 72.727% 2 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #5816       +/-   ##
=============================================
+ Coverage   86.623%   86.641%   +0.017%     
=============================================
  Files          423       423               
  Lines        36347     36343        -4     
  Branches     17096     17091        -5     
=============================================
+ Hits         31485     31488        +3     
+ Misses        4815      4810        -5     
+ Partials        47        45        -2     
Files with missing lines Coverage Δ
...ions/SessionReplay/SentryVideoFrameProcessor.swift 96.376% <72.727%> (ø)

... and 4 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 b2c7769...8501613. Read the comment docs.

Copy link
Contributor

github-actions bot commented Aug 5, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1225.18 ms 1239.02 ms 13.84 ms
Size 23.74 KiB 913.71 KiB 889.97 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
4e3915a 1230.02 ms 1258.90 ms 28.88 ms
c2982e7 1223.92 ms 1242.86 ms 18.94 ms
736bcfb 1229.86 ms 1249.59 ms 19.73 ms
2a07609 1207.79 ms 1233.77 ms 25.98 ms
9add417 1224.33 ms 1243.06 ms 18.73 ms
2a7868a 1226.54 ms 1256.92 ms 30.37 ms
d38165b 1211.41 ms 1242.49 ms 31.08 ms
42cfd79 1222.13 ms 1244.23 ms 22.10 ms
aa98fe8 1227.69 ms 1253.18 ms 25.50 ms
b714cb9 1224.71 ms 1238.04 ms 13.33 ms

App size

Revision Plain With Sentry Diff
4e3915a 23.75 KiB 858.69 KiB 834.94 KiB
c2982e7 23.75 KiB 911.62 KiB 887.87 KiB
736bcfb 23.74 KiB 891.02 KiB 867.28 KiB
2a07609 23.75 KiB 912.78 KiB 889.03 KiB
9add417 23.75 KiB 908.40 KiB 884.65 KiB
2a7868a 23.75 KiB 880.20 KiB 856.45 KiB
d38165b 23.75 KiB 855.37 KiB 831.62 KiB
42cfd79 23.75 KiB 880.20 KiB 856.45 KiB
aa98fe8 23.75 KiB 891.01 KiB 867.26 KiB
b714cb9 23.75 KiB 858.69 KiB 834.93 KiB

@antonis antonis merged commit be6a4ee into main Aug 6, 2025
139 of 140 checks passed
@antonis antonis deleted the antonis/rn-legacy-compile-issue branch August 6, 2025 09:16
philipsawyerdd added a commit to justin-doordash/sentry-cocoa that referenced this pull request Sep 25, 2025
philipsawyerdd added a commit to justin-doordash/sentry-cocoa that referenced this pull request Sep 25, 2025
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