-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Update build-hermes-xcode.sh
to fail faster
#47894
Conversation
@kraenhansen thank you for this PR. |
I've updated the description and uploaded a few screenshots to illustrate the before and after state of things 🤞 |
@dmytrorykun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Two of the jobs seem to be CI infrastructure related and one seem to be a legitimate build failure for Android / Maven, which this PR can't possibly touch (as the script is only supposed to be called through xcode). |
@kraenhansen could you please rebase this PR to re-trigger the CI? |
e7ceccc
to
22e251c
Compare
Done 👍 |
I can't see that being caused by my suggested change 🙈 |
@kraenhansen I believe the fix for this CI issue has landed (github.com//pull/48122). Please try rebasing once again. |
22e251c
to
1970403
Compare
@dmytrorykun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@dmytrorykun merged this pull request in acecf99. |
This pull request was successfully merged by @kraenhansen in acecf99 When will my fix make it into a release? | How to file a pick request? |
Summary:
While debugging an error building hermes from source in a React Native app, I kept getting this weird error:
The root cause was a call to
cmake
failing, but/sdks/hermes-engine/utils/build-hermes-xcode.sh
didn't exit on the error and instead continued building the hermes.framework from the dummy frameworks created by./sdks/hermes-engine/utils/create-dummy-hermes-xcframework.sh
.I suggest fixing this by introducing a
set -e
call similar to that used inbuild-hermesc-xcode.sh
:react-native/packages/react-native/sdks/hermes-engine/utils/build-hermesc-xcode.sh
Line 7 in 2f523f0
Changelog:
[Internal] - Ensure building hermes from source exits early on failures
Test Plan:
I followed https://github.com/facebook/hermes/blob/main/doc/ReactNativeIntegration.md getting to a state of building a React Native app with Hermes built from source. I then introduced an error in
hermes/API/hermes/hermes.cpp
(I simply typedasd
in the top of the file) and built the app from Xcode:If you scroll up, you can see the failed cmake build, but it just continues trying to build the framework, effectively hiding the error:
When applying this patch and cleaning the build folder, the error is more prominent and actionable: