Upgrade React Native to 0.71.6#6220
Merged
jpcloureiro merged 176 commits intomainfrom Jun 30, 2023
Merged
Conversation
Contributor
Author
cortisiko
previously approved these changes
Jun 29, 2023
Member
cortisiko
left a comment
There was a problem hiding this comment.
This PR is officially QA passed.
3 tasks
1d3c652 to
87b94b1
Compare
leotm
reviewed
Jun 30, 2023
Contributor
Author
Hey @Gudahtt we've revised We also removed the Thanks for pointing that out! |
leotm
approved these changes
Jun 30, 2023
Contributor
leotm
left a comment
There was a problem hiding this comment.
great pairing and reviewing this pr today, lgtm ![]()
|
Kudos, SonarCloud Quality Gate passed! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.












Description
React Native upgrade to 0.71.6 requires
Upgrade Helper
By using React-native upgrade helper (https://react-native-community.github.io/upgrade-helper/) we were able to bump one major version at a time. This approach allows us to handle specific version bump issues separately.
Most of the native (ios, android) changes were grabbed from this helper
React native Reanimated
Using Reanimated 2 we have the option to use Reanimated API v1 or V2. https://docs.swmansion.com/react-native-reanimated/docs/2.x/fundamentals/migration
Reanimated team added support for RN 0.71 on 2.14.4 but it is crashing our app on iOS native side.
We are forced to use Reanimated 3. This version only ships API v2, forcing us to do the V1 -> V2 migration as well as the
gesture-handlerthat depends on it.Hermes engine on Android
JSC does not fully support BigInt operations & that is a requirement for our app.
hermes version that comes with 0.71.6 crashes when some specific errors are thrown.
We can't use the latest version of hermes on 0.71.6 because its API is not compatible.
commit that fixes the crash facebook/hermes@f2f1a2e
We checked out https://github.com/facebook/hermes/releases/tag/hermes-2023-03-07-RNv0.71.4-31fdcf738940875c9bacf251e149006cf515d763, and cherry-picked the fix.
here's the tarball we are using https://github.com/MetaMask/hermes/tree/ae2ac688c3faf868d2360a10a7791226ed5702fb
hermes-engine/build.gradlehad to be patched to allow the build process to fetch the tarball from our fork.Why not Hermes on iOS as well?
We use JSC on iOS because it already has the necessary BigInt support. We tested hermes on iOS & it was unstable on our project (crashes)
Issue
Progresses https://github.com/metamask/mobile-planning/issues/690
Checklist