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

Hermes is built from source on the CI for iOS in React Native 0.71.0-rc.3 #35547

Closed
satya164 opened this issue Dec 3, 2022 · 3 comments
Closed
Labels
p: Callstack Partner: Callstack Partner Platform: iOS iOS applications. Priority: High Resolution: Fixed A PR that fixes this issue has been merged. Tech: Hermes Hermes Engine: https://hermesengine.dev/

Comments

@satya164
Copy link
Contributor

satya164 commented Dec 3, 2022

Description

On some of the CI builds on GitHub Actions, it seems Hermes is being built from source. This increases the build time a lot.

Here are the logs from pod install:

> pod install
Auto-linking React Native module for target `ReactNativeTestExample`: bob-react-native-test
[Hermes] Downloading Hermes source code for commit 1eb8f7ea3059a338[20](https://github.com/callstack/react-native-builder-bob/actions/runs/3601771799/jobs/6067958978#step:21:21)5c302cea0f5a3057f93049
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Dload  Upload   Total   Spent    Left  Speed
0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 2400k    0 2400k    0     0  1881k      0 --:--:--  0:00:01 --:--:-- 1881k
100 7376k    0 7376k    0     0  3[23](https://github.com/callstack/react-native-builder-bob/actions/runs/3601771799/jobs/6067958978#step:21:24)6k      0 --:--:--  0:00:02 --:--:-- 4961k
100 9661k    0 9661k    0     0  3677k      0 --:--:--  0:00:02 --:--:-- 5374k
[Hermes] Expanding Hermes tarball for commit 1eb8f7ea3059a338205c302cea0f5a3057f93049
[Hermes] Using pre-built HermesC
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
[Codegen] Found FBReactNativeSpec
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Fetching podspec for `hermes-engine` from `../node_modules/react-native/sdks/hermes/hermes-engine.podspec`
[Hermes] Detected that you are on a React Native release branch, building Hermes from source but fetched from tag...

From a discussion with @kelset and @tido64, we found this line that results in this behavior: https://github.com/facebook/react-native/blob/0.71-stable/sdks/hermes-engine/hermes-engine.podspec#L46

The CI variable is set to true by default on GitHub Actions (and some other CIs): https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables

This code was added here: 4b51207

As per @cipolleschi

In the RN CI we don’t enter in this branch because we build the Hermes tarball once and we propagate it to the other jobs (using the HERMES_ENGINE_TARBALL_PATH env variable).

Version

0.71.0-rc.3

Output of npx react-native info

Local environment is not relevant since the issue is on CI.

Steps to reproduce

I was able to reproduce this by triggering an iOS build on GitHub Actions. Link to logs: https://github.com/callstack/react-native-builder-bob/actions/runs/3601771799/jobs/6067958978

Snack, code example, screenshot, or link to a repository

Link to workflow: https://github.com/callstack/react-native-builder-bob/blob/main/.github/workflows/build-templates.yml

@kelset
Copy link
Contributor

kelset commented Dec 14, 2022

@satya164 this should be fixed now, can you try with RC4?

@satya164
Copy link
Contributor Author

@kelset thanks! i'll test and let you know

@satya164
Copy link
Contributor Author

@kelset it's no longer building from source on CI callstack/react-native-builder-bob#345

I'll close the issue.

@cortinico cortinico added the Resolution: Fixed A PR that fixes this issue has been merged. label Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p: Callstack Partner: Callstack Partner Platform: iOS iOS applications. Priority: High Resolution: Fixed A PR that fixes this issue has been merged. Tech: Hermes Hermes Engine: https://hermesengine.dev/
Projects
None yet
Development

No branches or pull requests

5 participants