-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Make Hermes the default JS engine #12321
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
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
This PR makes Hermes the default JS engine for RNW going forward. For now, this is still managed by setting the `<UseHermes>` MSBuild property. However, if the property is not explicitly set, the default value in `JSEngine.props` will now be `true` instead of `false`. The property will remain exposed (and now set to `true`) in project's `ExperimentalFeatures.props` files. This will be done for new projects created with the `npx react-native-windows-init` command targeting versions with this change. (Use or omission of the `--useHermes` flag will no longer be recognized at project creation time). Hermes will also be the default for projects created with the new `npx react-native init-windows` CLI command. Current users attempting to *upgrade* their existing projects with these tools will be given a warning if they were previously using the Chakra engine, and instructions to revert back to using Chakra if necessary. However, support for Chakra will be deprecated in the future, so best to migrate sooner rather than later. In addition, this PR should also enable Hermes use when consuming the official (experimental) NuGet package binaries. Finally, this PR updates our CI infrastructure to instead denote "Chakra" (rather than "Hermes") for builds and tests.
3e31d6c to
97d09ac
Compare
vmoroz
approved these changes
Nov 8, 2023
jonthysell
added a commit
to jonthysell/react-native-windows
that referenced
this pull request
Nov 9, 2023
This PR backports microsoft#12321 to 0.73. This PR makes Hermes the default JS engine for RNW going forward. For now, this is still managed by setting the `<UseHermes>` MSBuild property. However, if the property is not explicitly set, the default value in `JSEngine.props` will now be `true` instead of `false`. The property will remain exposed (and now set to `true`) in project's `ExperimentalFeatures.props` files. This will be done for new projects created with the `npx react-native-windows-init` command targeting versions with this change. (Use or omission of the `--useHermes` flag will no longer be recognized at project creation time). Hermes will also be the default for projects created with the new `npx react-native init-windows` CLI command. Current users attempting to *upgrade* their existing projects with these tools will be given a warning if they were previously using the Chakra engine, and instructions to revert back to using Chakra if necessary. However, support for Chakra will be deprecated in the future, so best to migrate sooner rather than later. In addition, this PR should also enable Hermes use when consuming the official (experimental) NuGet package binaries. Finally, this PR updates our CI infrastructure to instead denote "Chakra" (rather than "Hermes") for builds and tests. - New feature (non-breaking change which adds functionality) - Breaking change (fix or feature that would cause existing functionality to not work as expected) - This change requires a documentation update Hermes is the officially supported and maintained JS engine for React Native, and as time goes on, the cost of maintain Chakra (which hasn't been updated in years) only increases. The "new" architecture includes Hermes. Resolves microsoft#11251 See above N/A Ran existing tests Should this change be included in the release notes: yes Hermes is now the default JS engine for all new projects and will eventually be the only supported JS engine.
jonthysell
added a commit
that referenced
this pull request
Nov 10, 2023
This PR backports #12321 to 0.73. ## Description This PR makes Hermes the default JS engine for RNW going forward. For now, this is still managed by setting the `<UseHermes>` MSBuild property. However, if the property is not explicitly set, the default value in `JSEngine.props` will now be `true` instead of `false`. The property will remain exposed (and now set to `true`) in project's `ExperimentalFeatures.props` files. This will be done for new projects created with the `npx react-native-windows-init` command targeting versions with this change. (Use or omission of the `--useHermes` flag will no longer be recognized at project creation time). Hermes will also be the default for projects created with the new `npx react-native init-windows` CLI command. Current users attempting to *upgrade* their existing projects with these tools will be given a warning if they were previously using the Chakra engine, and instructions to revert back to using Chakra if necessary. However, support for Chakra will be deprecated in the future, so best to migrate sooner rather than later. In addition, this PR should also enable Hermes use when consuming the official (experimental) NuGet package binaries. Finally, this PR updates our CI infrastructure to instead denote "Chakra" (rather than "Hermes") for builds and tests. ### Type of Change - New feature (non-breaking change which adds functionality) - Breaking change (fix or feature that would cause existing functionality to not work as expected) - This change requires a documentation update ### Why Hermes is the officially supported and maintained JS engine for React Native, and as time goes on, the cost of maintain Chakra (which hasn't been updated in years) only increases. The "new" architecture includes Hermes. Resolves #11251 ### What See above ## Screenshots N/A ## Testing Ran existing tests ## Changelog Should this change be included in the release notes: yes Hermes is now the default JS engine for all new projects and will eventually be the only supported JS engine.
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.
Description
This PR makes Hermes the default JS engine for RNW going forward.
For now, this is still managed by setting the
<UseHermes>MSBuild property. However, if the property is not explicitly set, the default value inJSEngine.propswill now betrueinstead offalse.The property will remain exposed (and now set to
true) in project'sExperimentalFeatures.propsfiles. This will be done for new projects created with thenpx react-native-windows-initcommand targeting versions with this change. (Use or omission of the--useHermesflag will no longer be recognized at project creation time). Hermes will also be the default for projects created with the newnpx react-native init-windowsCLI command.Current users attempting to upgrade their existing projects with these tools will be given a warning if they were previously using the Chakra engine, and instructions to revert back to using Chakra if necessary. However, support for Chakra will be deprecated in the future, so best to migrate sooner rather than later.
In addition, this PR should also enable Hermes use when consuming the official (experimental) NuGet package binaries.
Finally, this PR updates our CI infrastructure to instead denote "Chakra" (rather than "Hermes") for builds and tests.
Type of Change
Why
Hermes is the officially supported and maintained JS engine for React Native, and as time goes on, the cost of maintain Chakra (which hasn't been updated in years) only increases. The "new" architecture includes Hermes.
Resolves #6136
Resolves #11251
What
See above
Screenshots
N/A
Testing
Ran existing tests
Changelog
Should this change be included in the release notes: yes
Hermes is now the default JS engine for all new projects and will eventually be the only supported JS engine.
Microsoft Reviewers: Open in CodeFlow