Summary:
This fix is necessarly to ensure that when working on the codebase in the `0.XX-stable` branches (ex. when you are working on a release) the Hermes podfile is correctly set against the right commit for that branch, and not latest commit from main branch of Hermes repo.
I didn't add a check to verify that the file `.hermesversion` exists because I think it's safe to assume that the file and the tag correctly exists when this step (doing a pod install on the `0.XX-stable` branch).
Once this is merged, we need to cherry pick it on both the 0.69 and 0.70 branches
## Changelog
[iOS] [Fixed] - Hermes pod: change logic to use the hermes tag to set the pod source correctly
Pull Request resolved: https://github.com/facebook/react-native/pull/34221
Test Plan:
* git clone the repo
* checkout 0.69-stable branch
* follow https://reactnative.dev/contributing/release-testing
* without this commit, when testing RNTester + iOS + Hermes the app will insta-crash on opening
* with it, the app gets build successfully
Reviewed By: cortinico
Differential Revision: D37957660
Pulled By: cipolleschi
fbshipit-source-id: 4e50099ed712b1ad8e6439822e3f530142982c1b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33885
When building Hermes for React Native, point to the React Native JSI location to ensure both React Native and Hermes use the exact same version of JSI.
Changelog:
[iOS] [Changed] - When Hermes is enabled, it will use the same copy of JSI as React Native
Reviewed By: cortinico, cipolleschi
Differential Revision: D36567471
fbshipit-source-id: 97d954ef34007bd31f008fab451512194060d670
Summary:
Allow an arbitrary path to hermes-runtime-darwin-vX.Y.Z.tgz to be specified. This can be used in CI or in local e2e tests to test with Hermes enabled without having a matching GitHub release.
Usage:
```
HERMES_ENGINE_TARBALL_PATH=~/Downloads/hermes- runtime-darwin-v0.69.0.tar.gz \
USE_HERMES=1 \
pod install
```
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D36985477
fbshipit-source-id: 853829c89e6f0ac3f63781c7f290cf3994b8e0cd
Summary:
This PR includes a set of changes that landed only on the 0.69-stable release branch and need to be backported to main:
- a72d1960ff
- 659b693fcd
- 2a6832a7e3
- 0ca6e41059
- f50936bef2
Most of the fixes are working around the assumption that
`version != 1000.0.0 => Build Hermes From Source`.
That is not true in the release branch as the version is named (e.g. 0.69.0-rc4) and we need to build Hermes there.
## Changelog
[Internal] - Backports fixes on the 0.69 release branch to main
Pull Request resolved: https://github.com/facebook/react-native/pull/33938
Test Plan: Tested that those commits are working fine on the release branch.
Reviewed By: hramos
Differential Revision: D36776291
Pulled By: cortinico
fbshipit-source-id: 66e28232d80054fab4a2a97c8d2de12e3c1cf392
Summary:
Update `hermes-engine.podspec` to use pre-built Hermes artifacts from the corresponding React Native GitHub Release when targeting a specific React Native release.
Otherwise, fallback to building Hermes from source.
Changelog: [Internal]
Reviewed By: cortinico, cipolleschi
Differential Revision: D36609257
fbshipit-source-id: 6179c9e255558c7eaf1417ff46a2e7db120295f0
Summary:
Introduces option to use pre-built Hermes binaries.
Requires a `hermes-engine` pod release to have been published in the following manner:
```
env hermes-artifact-url='https://github.com/facebook/react-native/releases/download/vX.Y.Z/hermes-runtime-darwin-vX.Y.Z.tar.gz' pod trunk push hermes-engine.podspec
```
...where "vX.Y.Z" corresponds to a published React Native release on GitHub where the `hermes-runtime-darwin-vX.Y.Z.tar.gz` binary was generated and/or uploaded as part of the release process.
Changelog: [Internal]
Reviewed By: cortinico, cipolleschi
Differential Revision: D36532561
fbshipit-source-id: 73bc107158387ff2db359e1b6a973db6ee85995c
Summary:
Use pre-built hermesc if available by generating a ImportHermesc.cmake file that points to the hermesc binary. Recent `react-native` releases should have hermesc available in sdks/hermesc.
Hermes build scripts have been updated to support a `HERMES_OVERRIDE_HERMESC_PATH` envvar which can point to this generated ImportHermesc.cmake file.
Pull Request resolved: https://github.com/facebook/react-native/pull/33827
Changelog:
[iOS] [Changed] - Use pre-built HermesC if available in current React Native release
Reviewed By: cortinico
Differential Revision: D36024615
fbshipit-source-id: 476569f73309f9bd142f28cb02d1f7d57b6cbc6a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33811
Use `scripts/hermes/prepare-hermes-for-build.js` in Circle CI, eliminating redundant steps in the `prepare_hermes_workspace` Circle CI job.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D36335122
fbshipit-source-id: b7e8c7aeb2aac5afaf37677cd3ac949ac3f96de1
Summary:
Fixes some shellcheck warnings that arose in D36295406 (ae28880fbc) when the Hermes build scripts were copied over.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D36321074
fbshipit-source-id: 0eae36a4f793daa0e12786ba7989d4eac6b2e256
Summary:
The `utils/build-apple-framework.sh` script uses the ruby runtime to load `hermes-engine.podspec`, and in the process it will load the Core CocoaPods gem to parse the podspec file.
Since the podspec file uses Pod::UI to print logs, and the CoreUI gem is not loaded when `build-apple-framework.sh` accesses `hermes-engine.podspec`, we would get a warning due to Pod::UI not being defined.
This change will only use Pod::UI when it is defined, therefore limiting it to only executing when `hermes-engine.podspec` is loaded as part of the normal `pod install` build process.
Changelog: [Internal]
Reviewed By: cortinico, neildhar
Differential Revision: D36297856
fbshipit-source-id: ac1ab021f74f9dcaa7be2a2358482c73b827b756
Summary:
Hermes' build scripts use the Ninja build utility if available, otherwise they default to Unix Makefiles. When Unix Makefiles were used, builds would take far too long due to the use of a single core.
To reduce the surface area of issues that may arise as we switch to building Hermes from source, we will now focus on a single build system using Unix Makefiles. We will also ensure all available cores are used when building on macOS.
Changelog: [Internal]
Reviewed By: cortinico, neildhar
Differential Revision: D36296838
fbshipit-source-id: 4be23739fb022e3ae8e974ad3c2c70e7011abb5a
Summary:
Copy Hermes build scripts to React Native repository for greater control over the build pipeline when used in RN.
Changelog: [Internal]
Reviewed By: neildhar
Differential Revision: D36295406
fbshipit-source-id: 54bf4173b6c75db35de828378e6f5782a248ed2e