Skip to content

[react-native] Fix Hermes version mismatch#2014

Merged
Saadnajmi merged 3 commits intomicrosoft:mainfrom
gabrieldonadel:fix-hermes-version-mismatch
Jan 19, 2024
Merged

[react-native] Fix Hermes version mismatch#2014
Saadnajmi merged 3 commits intomicrosoft:mainfrom
gabrieldonadel:fix-hermes-version-mismatch

Conversation

@gabrieldonadel
Copy link
Copy Markdown

Please select one of the following

  • I am removing an existing difference between facebook/react-native and microsoft/react-native-macos 👍
  • I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos 👍
  • I am making a fix / change for the macOS implementation of react-native
  • I am making a change required for Microsoft usage of react-native

Summary:

The hermes script (hermes-utils.rb) uses the react-native-macos version to check for available hermes artifacts on maven but the problem is that whenever react-native-macos version gets ahead of react-native there are no prebuilds to be found and hermes will try to build from source (which does not work).

This PR fixes this by checking the latest available patch version for a given version and using that as the hermes-version

Changelog:

[MACOS] [FIXED] - Fix Hermes version mismatch

Test Plan:

Enable hermes on rntester, set react-native package.json version to 0.73.2, run pod install and certify it's downloading the prebuild tarball

@gabrieldonadel gabrieldonadel requested a review from a team as a code owner January 5, 2024 17:08
Comment thread packages/react-native/sdks/hermes-engine/hermes-utils.rb Outdated
Comment thread packages/react-native/sdks/hermes-engine/hermes-engine.podspec
Comment thread packages/react-native/sdks/hermes-engine/hermes-utils.rb Outdated
Comment thread packages/react-native/sdks/hermes-engine/hermes-utils.rb Outdated
Co-authored-by: Saad Najmi <sanajmi@microsoft.com>
@gabrieldonadel
Copy link
Copy Markdown
Author

Hi @Saadnajmi, Is there something else that needs to be addressed here to get this merged?

@Saadnajmi
Copy link
Copy Markdown
Collaborator

Hi @Saadnajmi, Is there something else that needs to be addressed here to get this merged?

Nope, just a nudge! If you also want this for 0.73, could you cherry-pick the change and make a PR against the 0.73 branch? It's easier for me to approve/merge that way

@Saadnajmi Saadnajmi merged commit 2121f8c into microsoft:main Jan 19, 2024
@gabrieldonadel gabrieldonadel deleted the fix-hermes-version-mismatch branch January 19, 2024 18:47
Saadnajmi added a commit that referenced this pull request Jan 19, 2024
* [react-native] Fix Hermes version mismatch

* Address PR comments

* Update packages/react-native/sdks/hermes-engine/hermes-utils.rb



---------

Co-authored-by: Saad Najmi <sanajmi@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants