Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[react-native] Upgrade to 0.62.2 #8310

Merged
merged 22 commits into from May 25, 2020
Merged

Conversation

sjchmiela
Copy link
Contributor

@sjchmiela sjchmiela commented May 14, 2020

Why

Let's have latest React Native in the upcoming SDK!

How

See the story at https://www.notion.so/expo/React-Native-Upgrade-Diary-947bc0b506a942189fd47ff6e53bf95b.

Test Plan

Expo Client runs, versioned SDK38 also runs (after a couple of post-version fixes outlined in the aforementioned doc).

expo-cli can't handle client_log events, but that's something we may want to figure out after merging this PR, I guess.

@github-actions
Copy link
Contributor

Native Component List for this branch is ready

@sjchmiela sjchmiela force-pushed the @sjchmiela/reactnative-0.62.2 branch 3 times, most recently from b193944 to b8a0d96 Compare May 19, 2020 13:38
@sjchmiela sjchmiela marked this pull request as ready for review May 19, 2020 13:41
@sjchmiela
Copy link
Contributor Author

Some of the commits may be left not-reviewed as they are effect of automated processes. Some changes worth reviewing are:

  • commits applied on top of 0.62-stable branch (@ide)
  • LogBoxModule exception suppression (@ide), story, fix
  • decision not to version JNI (@ide) story
  • symbolicateStackTrace fix (@ide, @fson) commit
  • Gradle upgrade across the repo (@mczernek) commit
  • added uiMode to Android Activities (@bbarthec) commit
  • soloader upgrade from 0.6.0 to 0.8.2 (0.8.0 used in RN 0.62, I saw reports of problems on 0.8.0, eg. this) (@ide) commit
  • removed custom resolution of @react-native-community/cli-platform-ios (@IjzerenHein) commit, pods installed ok 🤷‍♂️
  • fixed expotools for versioning of RN 0.62 (@tsapeta) commit

@ide
Copy link
Member

ide commented May 20, 2020

For the react-native branch, to keep things organized we have several expo/*** branches each with one commit. If there are new commits we need for sdk-38, or commits that were on the sdk-37 branch that do not have a corresponding expo/*** branch, please create an expo/*** branch for each one that is rebased either on top of upstream/master@HEAD or the most recent ancestor commit between upstream/master and 0.62-stable. Thank you for being thorough when going through the list of commits. The more we can upstream (or split into code that is upstreamable so that Expo-specific functionality can just be in the Expo code without needing a patch) the better, too.

The LogBox fix seems OK for now, but reaffirms that replacing the various devtools and devsupport classes will likely make the platform more stable.

Not versioning JNI seems simplest for now. I do want to be careful, though, because needing to patch several modules is not sustainable.

The symbolicateStackTrace change looks fine to me. I left some small inline comments. Make sure the unit tests continue to pass or update them if needed.

Removing the custom Yarn package resolution is fantastic. Thank you.

packages/expo/src/logs/LogSerialization.ts Outdated Show resolved Hide resolved
packages/expo/src/logs/LogSerialization.ts Outdated Show resolved Hide resolved
@@ -98,15 +98,15 @@

<activity
android:name=".experience.ExperienceActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, so this change will have to be inspected from the perspective of react-native-appearance 🤔
I'm not sure whether react-native-appearance can handle it properly (change from recreating whole activity to fire some lifecycle method upon change)? cc @brentvatne

package.json Show resolved Hide resolved
Copy link
Member

@tsapeta tsapeta left a comment

Choose a reason for hiding this comment

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

Changes in expotools and tools look good to me 💪. Thanks for taking care of this and testing out how versioning works 🤗

@sjchmiela sjchmiela force-pushed the @sjchmiela/reactnative-0.62.2 branch from b8a0d96 to bd53b8b Compare May 21, 2020 18:02
@ExpoBot
Copy link

ExpoBot commented May 22, 2020

Fails
🚫

📋 Missing Changelog

🛠 Add missing entires to:

🛠 Suggested fixes:

📋 Missing changelog

Apply suggested changes:

diff --git a/packages/expo-gl/CHANGELOG.md b/packages/expo-gl/CHANGELOG.md
index ec77c1295a..5c460f9bc1 100644
--- a/packages/expo-gl/CHANGELOG.md
+++ b/packages/expo-gl/CHANGELOG.md
@@ -8,6 +8,8 @@
 
 ### 🐛 Bug fixes
 
+- Upgrade to 0.62.2 ([#8310](https://github.com/expo/expo/pull/8310) by [@sjchmiela](https://github.com/sjchmiela))
+
 ## 8.2.0
 
 ### 🎉 New features

Generated by 🚫 dangerJS against adc6747

@sjchmiela
Copy link
Contributor Author

sdk CI fails due to not-changed changelog in expo-gl. The only change made there was upgrading react-test-renderer in devDependencies which is not a user-facing change, so it doesn't need to end up in CHANGELOG.

@sjchmiela sjchmiela force-pushed the @sjchmiela/reactnative-0.62.2 branch from 95d92b1 to e6a819f Compare May 22, 2020 17:28
JNI has been extracted to FBJNI package and it has become very difficult to version properly. Let's try to share one version of JNI between all future React Natives and hope that we can monkey-patch any non-backwards compatible changes thanks to access to source code at facebookincubator/fbjni.
…orm-ios

No longer needed, `pod install` in `apps/bare-expo/ios` succeeded
@sjchmiela sjchmiela force-pushed the @sjchmiela/reactnative-0.62.2 branch from e6a819f to adc6747 Compare May 25, 2020 09:21
@sjchmiela sjchmiela merged commit a4cabf3 into master May 25, 2020
@sjchmiela sjchmiela deleted the @sjchmiela/reactnative-0.62.2 branch May 25, 2020 13:07
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this pull request Jul 16, 2020
A reversion of e40c020 and 62621ef. Unfortunately, Jest 26 (the
latest), which we'll take in an upcoming commit, doesn't support
`jest-expo` at 37 [1].

We can't go past 37 (e.g., to 38.0.2, the latest) until we upgrade
to React Native v0.62 (that's zulip#3782). That's because jest-expo's
"react" peer dependency was bumped from ~16.9.0 to ~16.11.0 in
expo/expo#8310 [2], and we must do that React upgrade atomically
with our RN upgrade. The "react-native" peer dependency wasn't
touched; it remained at "*". So, I'm left unsure whether it was
intentional to drop support for RN v0.61 [3].

Ah well. As we were aware in e40c020:

"""
If `jest-expo` turns out to be buggy, or the dependency requirements
get even more tangled or burdensome, we should feel free to abandon
this effort; it's not terrible to have to add boring mocks.
"""

We may consider adding it back in as a followup to zulip#3782.

Run our usual `yarn yarn-deduplicate && yarn`, as prompted by
`tools/test deps`.

[1] We get errors about jest-expo using `require.requireActual`,
    which was removed in jestjs/jest#9854, out in v26.0.0-alpha.0.
[2] expo/expo@a4cabf30a#diff-4a85ebd1069aff25ee2e5f2b004281ccR33
[3] See react-native-webview/react-native-webview#1445.
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this pull request Aug 12, 2020
A reversion of e40c020 and 62621ef. Unfortunately, Jest 26 (the
latest), which we'll take in an upcoming commit, doesn't support
`jest-expo` at 37 [1].

We can't go past 37 (e.g., to 38.0.2, the latest) until we upgrade
to React Native v0.62 (that's zulip#3782). That's because jest-expo's
"react" peer dependency was bumped from ~16.9.0 to ~16.11.0 in
expo/expo#8310 [2], and we must do that React upgrade atomically
with our RN upgrade. The "react-native" peer dependency wasn't
touched; it remained at "*". So, I'm left unsure whether it was
intentional to drop support for RN v0.61 [3].

Ah, well. As I said in e40c020:

"""
If `jest-expo` turns out to be buggy, or the dependency requirements
get even more tangled or burdensome, we should feel free to abandon
this effort; it's not terrible to have to add boring mocks.
"""

We may consider adding it back in as a followup to zulip#3782.

Run our usual `yarn yarn-deduplicate && yarn`, as prompted by
`tools/test deps`.

[1] We get errors about jest-expo using `require.requireActual`,
    which was removed in jestjs/jest#9854, out in v26.0.0-alpha.0.
[2] expo/expo@a4cabf30a#diff-4a85ebd1069aff25ee2e5f2b004281ccR33
[3] See react-native-webview/react-native-webview#1445.
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this pull request Aug 14, 2020
A reversion of e40c020 and 62621ef. Unfortunately, Jest 26 (the
latest), which we'll take in an upcoming commit, doesn't support
`jest-expo` at 37 [1].

We can't go past 37 (e.g., to 38.0.2, the latest) until we upgrade
to React Native v0.62 (that's zulip#3782). That's because jest-expo's
"react" peer dependency was bumped from ~16.9.0 to ~16.11.0 in
expo/expo#8310 [2], and we must do that React upgrade atomically
with our RN upgrade. The "react-native" peer dependency wasn't
touched; it remained at "*". So, I'm left unsure whether it was
intentional to drop support for RN v0.61 [3].

Ah, well. As I said in e40c020:

"""
If `jest-expo` turns out to be buggy, or the dependency requirements
get even more tangled or burdensome, we should feel free to abandon
this effort; it's not terrible to have to add boring mocks.
"""

We may consider adding it back in as a followup to zulip#3782.

Run our usual `yarn yarn-deduplicate && yarn`, as prompted by
`tools/test deps`.

[1] We get errors about jest-expo using `require.requireActual`,
    which was removed in jestjs/jest#9854, out in v26.0.0-alpha.0.
[2] expo/expo@a4cabf30a#diff-4a85ebd1069aff25ee2e5f2b004281ccR33
[3] See react-native-webview/react-native-webview#1445.
prakashbask pushed a commit to prakashbask/expo that referenced this pull request Mar 16, 2022
# Why

Let's have latest React Native in the upcoming SDK!

# How

See the story at https://www.notion.so/expo/React-Native-Upgrade-Diary-947bc0b506a942189fd47ff6e53bf95b.

# Test Plan

Expo Client runs, versioned SDK38 also runs (after a couple of post-version fixes outlined in the aforementioned doc).

`expo-cli` can't handle `client_log` events, but that's something we may want to figure out after merging this PR, I guess.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants