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

Enable Hermes CI jobs for 0.71 #1780

Conversation

shwanton
Copy link

@shwanton shwanton commented Apr 7, 2023

Please select one of the following

  • I am removing an existing difference between facebook/react-native and microsoft/react-native-macos 👍
  • I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos 👍
  • I am making a fix / change for the macOS implementation of react-native
  • I am making a change required for Microsoft usage of react-native

Summary

  • Hermes CI jobs were not running after the 0.71 upgrade

Changelog

[GENERAL] [FIXED] - Enable Hermes CI jobs for 0.71

Test Plan

Builds w/ prebuilt Hermes archive

HERMES_ENGINE_TARBALL_PATH="/Users/shawndempsey/Downloads/react-native-artifacts-0.71.0-hermes-ios-debug.tar.gz" USE_HERMES=1 RCT_NEW_ARCH_ENABLED=1 bundle exec pod install --verbose

CleanShot 2023-04-10 at 10 20 16

.ado/apple-pr.yml Outdated Show resolved Hide resolved
@Saadnajmi
Copy link
Collaborator

This needs the latest changes from main for some of the CI

@Saadnajmi
Copy link
Collaborator

The remaining failures are legitimate, now.

@shwanton
Copy link
Author

It looks like main is not getting the correct 0.71.0 build of hermes-engine and that is why we are seeing build issues.
The Hermes podspec is looking for the latest sha of main and is assuming we are in the React Native core repo.

if version == '1000.0.0'
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
else
source[:tag] = "v#{version}"
end

When I replace the version in package.json with "0.71.0", the app builds w/ Hermes enabled

"version": "1000.0.0",

I'll try to determine which version of Hermes engine our sha is pointing to, my hunch is that it's pulling latest and it's not working w/ 0.70.0

@Saadnajmi
Copy link
Collaborator

Mentioned offline, could we split the Hermes stuff into a separate PR? I think the NEW_ARCH_ENABLED stuff is ready to go (and should be back ported to 0.71-stable), but the Hermes errors needs a little follow up.

@shwanton shwanton force-pushed the fabric/use_new_flag_and_enable_hermes_ci branch from 60e63b2 to dcd7b5f Compare April 10, 2023 20:28
@shwanton shwanton force-pushed the fabric/use_new_flag_and_enable_hermes_ci branch from dcd7b5f to 08798d0 Compare April 10, 2023 20:29
@shwanton
Copy link
Author

Confirmed that the hermes-engine is not using the correct pre-built on main and this is what is causing the build issues.

To get this working in a repo that is not React Native core, we need to pass in a custom hermes-engine prebuilt archive.

Prebuilts are created for each release & can be downloaded on the release page.
example for 0.71.0: https://github.com/facebook/react-native/releases/tag/v0.70.1
archive: https://github.com/facebook/react-native/releases/download/v0.70.1/hermes-runtime-darwin-v0.70.1.tar.gz

Once the prebuilt is downloaded, you can pass it to the build like this:
HERMES_ENGINE_TARBALL_PATH="/Users/shawndempsey/Downloads/react-native-artifacts-0.71.0-hermes-ios-debug.tar.gz" USE_HERMES=1 bundle exec pod install --verbose

To get this working for CI, a new step is needed to download the prebuilt archive, assign the path to a variable & pass this to the pod install command.

@shwanton shwanton changed the title Move to RCT_NEW_ACRH_ENABLED for Fabric & enable Hermes jobs Enable Hermes CI jobs for 0.71 Apr 10, 2023
@shwanton
Copy link
Author

shwanton commented Apr 10, 2023

Moved new arch flag change to #1782

@shwanton
Copy link
Author

Now that we are on 0.72, we should figure out how to pull down pre-builts instead of trying to build from scratch.
The core team doesn't want more complexity around the Hermes build process for 0.71

@shwanton shwanton closed this Sep 29, 2023
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.

None yet

2 participants