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

Upgrade React Native 0.68.1 to 0.69.0-rc.0 and React 18 w New Arch #585

Merged
merged 22 commits into from
May 12, 2022

Conversation

leotm
Copy link
Owner

@leotm leotm commented May 4, 2022

Including


React Native 0.69.0-rc0 Android and iOS Debug builds both generally working well locally on M1 MBP sims/AVDs, w unsupported

  • Monterey 12.4 Beta 4
  • Android
    • NDK 25 beta/rc 3-4
    • cmake 3.22.1

Testing

No GitHub Actions macos-12 iOS CI yet, test mikehardy/buildcache-action@v1


Ubuntu 20.04, Gradle 7.4.2 (not yet supported), NDK 23.1.7779620 (not yet supported)

[CXX1300] CMake '3.22.1' was not found in SDK, PATH, or by cmake.dir property.
[CXX1301] - CMake '3.23.1' found in PATH did not satisfy requested version.
[CXX1301] - CMake '3.10.2' found in SDK did not satisfy requested version.
[CXX1301] - CMake '3.18.1' found in SDK did not satisfy requested version.
[CXX1300] CMake '3.22.1' was not found in SDK, PATH, or by cmake.dir property.
[CXX1301] - CMake '3.23.1' found in PATH did not satisfy requested version.
[CXX1301] - CMake '3.10.2' found in SDK did not satisfy requested version.
[CXX1301] - CMake '3.18.1' found in SDK did not satisfy requested version.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':ReactAndroid'.
> Failed to notify project evaluation listener.
   > [CXX1300] CMake '3.22.1' was not found in SDK, PATH, or by cmake.dir property.
   > Could not get unknown property 'configureCMakeDebug' for project ':ReactAndroid' of type org.gradle.api.Project.

RN cmake_minimum_required(VERSION 3.13)
Hermes cmake_minimum_required(VERSION 3.13)

So Ubuntu /sdk/cmake has

  • 3.10.2 (below required)
  • 3.18.1 (satisfied)
  • 3.22.1 (missing, needed for NDK 23.1.7779620)
  • 3.23.1 (satisfied)

cmake_minimum_required(VERSION 3.22.1)

# /usr/local/lib/android/sdk/cmake/3.22.1
# https://cmake.org/files/v3.12/cmake-3.12.3-Linux-x86_64.tar.gz
# https://github.com/Kitware/CMake/releases/download/v3.23.1/cmake-3.23.1-linux-aarch64.tar.gz
wget https://github.com/Kitware/CMake/releases/download/v3.23.1/cmake-3.23.1-linux-x86_64.tar.gz
tar xzf cmake-3.23.1-linux-x86_64.tar.gz
rm -rf cmake-3.23.1-linux-x86_64.tar.gz
cp -rf cmake-3.23.1-linux-x86_64/* /usr/local/lib/android/sdk/cmake/3.22.1
cd cmake-3.23.1-linux-x86_64
./bin/cmake --version
> Task :app:bundleReleaseJsAndAssets FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:bundleReleaseJsAndAssets'.
> Process 'command 'node'' finished with non-zero exit value 1
  • Recent similar
  • Revert NDK to 2124
  • Revert Gradle to 7.3.3 Same as below Might rly need to revert
  • [ ] clean?
  • react etc 18.0.0
  • [ ] metro-react-native-babel-preset 70.1 70.3 in 0.69.0-rc1
    • [ ] resolution babel/core 7.13.10?
  • React Native 0.69.0-rc1
  • hermes false fixes gradle node_modules/.../hermes-related missing (sync or multiple cleans, debug)
  • newArch false fixes gradle node_modules/.../prefab missing (sync or multiple cleans, debug)
  • [ ] flipper false
  • cp index.ts index.js
  • Redefine Metro entryfile TypeScript file ext
  • [ ] Revert AGP 7.3.0-alpha09 to 7.1.1 (7.0.4 pre)
  • Fix static analysis
    • Types
    • Linting
    • Jest snapshot

@leotm leotm added this to the 0.69.0-rc0 milestone May 5, 2022
@leotm leotm added react React monorepo react native react-native-community.github.io/upgrade-helper labels May 5, 2022
@leotm leotm changed the title Upgrade to React Native 0.69.0-rc0 and React 18 Upgrade React Native 0.68.1 to 0.69.0-rc0 and React 18 May 5, 2022
@leotm leotm added the new arch Fabric / TurboModules / JSI changes label May 5, 2022
@leotm leotm changed the title Upgrade React Native 0.68.1 to 0.69.0-rc0 and React 18 Upgrade React Native 0.68.1 to 0.69.0-rc0 and React 18 with New Arch May 5, 2022
@leotm leotm added the 🐧 Linux: Ubuntu 22.04 LTS for Android CI label May 5, 2022
@leotm leotm changed the title Upgrade React Native 0.68.1 to 0.69.0-rc0 and React 18 with New Arch Upgrade React Native 0.68.1 to 0.69.0-rc0 and React 18 w New Arch May 5, 2022
@leotm leotm added types cocoapods CocoaPods changes for building iOS and tvOS labels May 5, 2022
@leotm leotm changed the title Upgrade React Native 0.68.1 to 0.69.0-rc0 and React 18 w New Arch Upgrade React Native 0.68.1 to 0.69.0-rc.0 and React 18 w New Arch May 5, 2022
@leotm leotm linked an issue May 5, 2022 that may be closed by this pull request
leotm added 2 commits May 6, 2022 11:00
Temporarily
This reverts commit 6cb0ffc.
leotm added 8 commits May 6, 2022 12:19
Temporarily
From resolution
Removed by mistake in first commit 3660e51
This reverts commit 76bb940.
This reverts commit 073430f.
- React 17: interface FunctionComponent<P = {}> { (props: PropsWithChildren<P>, ...
- React 18: interface FunctionComponent<P = {}> { (props: P, ...
- Doc deprecated prop-types error, later remove
- Update linter config @typescript-eslint/no-unnecessary-type-arguments doc comment
@leotm leotm marked this pull request as ready for review May 12, 2022 15:48
@leotm leotm merged commit 56121cf into master May 12, 2022
@leotm leotm deleted the rn-69.0-rc.0-react-18 branch May 12, 2022 15:50
@leotm leotm restored the rn-69.0-rc.0-react-18 branch May 12, 2022 15:56
leotm added a commit that referenced this pull request May 12, 2022
Upgrade React Native 0.68.1 to 0.69.0-rc.0 and React 18 w New Arch

Full details: #585

Including unofficially
- React 18.0 -> 18.1+
- TypeScript 4.6 (next) to 4.7 beta
- CMake 3.22.1 for NDK 23 on Ubuntu 20.04

And fixing React 18 type errors since
- React 17: interface FunctionComponent<P = {}> { (props: PropsWithChildren<P>
- React 18: interface FunctionComponent<P = {}> { (props: P
@leotm leotm deleted the rn-69.0-rc.0-react-18 branch May 12, 2022 16:25
leotm added a commit that referenced this pull request May 12, 2022
Upgrade React Native 0.68.1 to 0.69.0-rc.0 and React 18 w New Arch

Full details: #585

Including unofficially
- React 18.0 -> 18.1+
- TypeScript 4.6 (next) to 4.7 beta
- CMake 3.22.1 for NDK 23 on Ubuntu 20.04
- Dedupe yarn lockfile deps with overlapping ranges (TODO: CI)

And fixing React 18 type errors since
- React 17: interface FunctionComponent<P = {}> { (props: PropsWithChildren<P>
- React 18: interface FunctionComponent<P = {}> { (props: P
@leotm leotm added type Type definitions for type checking (rip Flow) in static analysis and removed types labels Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cocoapods CocoaPods changes for building iOS and tvOS new arch Fabric / TurboModules / JSI changes 🐧 Linux: Ubuntu 22.04 LTS for Android CI react native react-native-community.github.io/upgrade-helper react React monorepo type Type definitions for type checking (rip Flow) in static analysis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Ubuntu 20.04] RN @0.69.0-rc.0 - :app:bundleReleaseJsAndAssets
1 participant