Skip to content

Upstream RN macOS Hermes integration bits#29748

Closed
alloy wants to merge 3 commits intofacebook:masterfrom
alloy:upstream-macos-hermes-integration-bits
Closed

Upstream RN macOS Hermes integration bits#29748
alloy wants to merge 3 commits intofacebook:masterfrom
alloy:upstream-macos-hermes-integration-bits

Conversation

@alloy
Copy link
Copy Markdown
Contributor

@alloy alloy commented Aug 24, 2020

Summary

Microsoft’s RN for macOS fork supports the Hermes engine nowadays microsoft#473. As a longer term work item, we’ve started moving bits that are not invasive for iOS but are a maintenance burden on us—mostly when merging—upstream. Seeing as this one is a recent addition, it seemed like a good candidate to start with.

As to the actual changes, these include:

  • Sharing Android’s Hermes executor with the objc side of the codebase.
  • Adding a CocoaPods subspec to build the Hermes inspector source and its dependencies (Folly/Futures, libevent).
  • Adding the bits to the Xcode build phase script that creates the JS bundle for release builds to compile Hermes bytecode and source-maps…
  • …coincidentally it turns out that the Xcode build phase script did not by default output source-maps for iOS, which is now fixed too.

All of the Hermes bits are automatically enabled, on macOS, when providing the hermes-engine-darwin npm package and enabling the Hermes pods.

Changelog

[General] [Added] - Upstream RN macOS Hermes integration bits

Test Plan

Building RNTester for iOS and Android still works as before.

To test the actual changes themselves, you’ll have to use the macOS target in RNTester in the macOS fork, or create a new application from master:

Screenshot 2020-08-18 at 16 55 06

alloy added 2 commits August 24, 2020 14:54
This removes the need to maintain this in our fork. See:
microsoft#473
Otherwise it ends up clashing with Flipper-Folly, which started now that
we load more of Folly in RN iOS/macOS due to the increased requirements
imposed by Hermes debugging.
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 24, 2020
@alloy
Copy link
Copy Markdown
Contributor Author

alloy commented Aug 24, 2020

@appden Can you give this a review? 🙏

@react-native-bot react-native-bot added the Type: Enhancement A new feature or enhancement of an existing feature. label Aug 24, 2020
@analysis-bot
Copy link
Copy Markdown

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,191,493 186,946
android hermes armeabi-v7a 6,840,298 171,788
android hermes x86 7,626,128 201,264
android hermes x86_64 7,517,084 201,339
android jsc arm64-v8a 9,351,333 186,953
android jsc armeabi-v7a 8,992,252 171,798
android jsc x86 9,214,055 201,285
android jsc x86_64 9,791,184 201,332

Base commit: 1704a72

@alloy alloy force-pushed the upstream-macos-hermes-integration-bits branch from 657a36c to 081e7ed Compare August 24, 2020 16:25
@alloy alloy force-pushed the upstream-macos-hermes-integration-bits branch from 081e7ed to f1e3210 Compare August 24, 2020 16:42
@analysis-bot
Copy link
Copy Markdown

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: 1704a72

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fkgozali has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @alloy in 941bc0e.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Aug 27, 2020
@alloy alloy deleted the upstream-macos-hermes-integration-bits branch August 27, 2020 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. p: Microsoft Partner: Microsoft Partner Type: Enhancement A new feature or enhancement of an existing feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants