feat(release-react): compile Hermes bytecode, and add bundle-react - #14
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--useHermes,--extraHermesFlagsand--podFilewere documented but ignored, so Hermes apps got a plain JS bundle. Nowrelease-reactcompiles with the hermesc that ships with React Native and swaps the bundle in place before anything hashes or uploads it. Source maps get composed with Metro's so traces still resolve.Detection is hermesEnabled in gradle.properties on Android, :hermes_enabled in the Podfile on iOS (including Expo's generated line). The RN 0.70+ template enables Hermes without writing either, so it reads as off. Guessing "on" would compile bytecode into a JSC app and brick it, so those projects pass
--useHermes.--no-useHermesopts out.Also adds
dpctl bundle-react <platform>: same zip, without releasing it.During review,
bundle-reactturned out to have the same signing bug #10 fixed in release. It signed against path.join(dir, "..") while the zip uses path.dirname, which only differ for ., which is exactly what you pass when bundling in place. Fixed, with a test that uses outputDir: "." since an absolute path passes even when it's broken.Metro and hermesc also now run without DEPLOYPULSE_ACCESS_KEY in their environment. Bundlers run Babel plugins out of your own node_modules and none of them need a full access key.