getsentry / sentry-react-native

Official Sentry SDK for React Native
https://sentry.io
MIT License
1.58k stars 338 forks source link

Can I use 5.32.0 in hot JS update? #4091

Closed chenweisen2013 closed 1 month ago

chenweisen2013 commented 2 months ago

Description

Is @sentry/react-native 5.32.0 compatible with iOS RNSentry 5.32.0? Is @sentry/react-native backward compatible, meaning can it be used with iOS RNSentry versions lower than 5.32.0? Our app currently supports JavaScript hot updates, and there are cases where older versions of the app use newer versions of JavaScript. If the JavaScript uses a newer version of @sentry/react-native, it could result in @sentry/react-native being 5.32.0 while the iOS RNSentry is lower than 5.32.0. We want to confirm if @sentry/react-native has backward compatibility in this scenario. Similarly, does this apply to the Android platform as well? Thank you for your assistance.

krystofwoldrich commented 2 months ago

Hi @chenweisen2013, the https://github.com/getsentry/sentry-react-native/releases/tag/5.32.0 release is compatible with https://github.com/getsentry/sentry-react-native/releases/tag/5.31.1

But it general we recommend upgrading the SDK version only in native application releases. The same as any other dependencies shipping with native code.

To determinate the compatibility with JS updates, you need to check if the there were no native code changes between the versions.

You can use the GitHub compare releases feature to do that -> https://github.com/getsentry/sentry-react-native/compare/5.31.0...5.31.1#files_bucket

If you see Sentry Cocoa or Sentry Android was updated in the changelog than JS update is not possible.