-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Make sure that hermes-engine is updated with cocoapods. #37148
Closed
Closed
Conversation
This file contains 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
facebook-github-bot
added
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
p: Facebook
Partner: Facebook
Partner
fb-exported
labels
Apr 28, 2023
This pull request was exported from Phabricator. Differential Revision: D45394241 |
Base commit: 97b2702 |
cipolleschi
pushed a commit
to cipolleschi/react-native
that referenced
this pull request
Apr 28, 2023
Summary: Pull Request resolved: facebook#37148 This should fix https://github.com/facebook/react-native/issue/36945, which is also causing annoyance when doing the releases ## Changelog: [iOS][Changed] - Use contents of sdks/.hermesversion to let cocoapods recognize Hermes updates. Differential Revision: D45394241 fbshipit-source-id: 5f6fd51136ccb517825597fa438a44759da62363
cipolleschi
force-pushed
the
export-D45394241
branch
from
April 28, 2023 17:07
ae09baf
to
41e3600
Compare
This pull request was exported from Phabricator. Differential Revision: D45394241 |
Summary: Pull Request resolved: facebook#37148 This should fix https://github.com/facebook/react-native/issue/36945, which is also causing annoyance when doing the releases ## Changelog: [iOS][Changed] - Use contents of sdks/.hermesversion to let cocoapods recognize Hermes updates. Differential Revision: D45394241 fbshipit-source-id: 3304a7fbcd6303bd22cd7f0c0ce6a3bc2c13cb65
cipolleschi
force-pushed
the
export-D45394241
branch
from
May 1, 2023 17:54
41e3600
to
272a134
Compare
This pull request was exported from Phabricator. Differential Revision: D45394241 |
This pull request has been merged in 9f496e2. |
kelset
pushed a commit
that referenced
this pull request
May 3, 2023
Summary: Pull Request resolved: #37148 This should fix https://github.com/facebook/react-native/issue/36945, which is also causing annoyance when doing the releases ## Changelog: [iOS][Changed] - Use contents of sdks/.hermesversion to let cocoapods recognize Hermes updates. Reviewed By: cipolleschi Differential Revision: D45394241 fbshipit-source-id: 972fbee8f954b90f7087bb232f922761c1639e06
jeongshin
pushed a commit
to jeongshin/react-native
that referenced
this pull request
May 7, 2023
Summary: Pull Request resolved: facebook#37148 This should fix https://github.com/facebook/react-native/issue/36945, which is also causing annoyance when doing the releases ## Changelog: [iOS][Changed] - Use contents of sdks/.hermesversion to let cocoapods recognize Hermes updates. Reviewed By: cipolleschi Differential Revision: D45394241 fbshipit-source-id: 972fbee8f954b90f7087bb232f922761c1639e06
facebook-github-bot
pushed a commit
that referenced
this pull request
Aug 3, 2023
…s from a different folder (#38754) Summary: This PR aims to fix an issue where installing iOS pods from a different directory causes the `hermes-engine` `:tag:` not to be properly resolved. Ever since #37148 was merged, the `setup_hermes` script tries to resolve the `node_modules/react-native/sdks/.hermesversion` file and use its content to generate the pod tag, in order to verify when it changes over time. This works perfectly when installing pods within the `ios` folder, as the `react_native_path` should point to the correct relative folder (`../node_modules/react-native` by default). However, when installing pods from a different directory (the project root, for example) and leveraging the `--project-directory` flag, the file fails to resolve, as the current working directory is considered when resolving the `.hermesversion` file. ### Quick Example: - `react_native_path`: `../node_modules/react-native` (the default config) **Installing pods from the `ios` folder:** - `cd ios` - `bundle exec pod install` - `hermestag_file` resolved path: `$project_root/node_modules/react-native` ✅ - `hermes-engine` `:tag:`: `hermes-2023-03-20-RNv0.72.0-49794cfc7c81fb8f69fd60c3bbf85a7480cc5a77` ✅ **Installing pods from the `$project_root` folder** - `bundle exec pod install --project-directory=ios` - `hermestag_file` resolved path: `$parent_folder/$project_root/node_modules/react-native` ❌ - `hermes-engine` `:tag:`: `''` ❌ ### The fix Turns out that the same file had a resolved reference to the `react-native` folder, assigned to the `react_native_dir` variable: ```ruby react_native_dir = Pod::Config.instance.installation_root.join(react_native_path) ``` By resolving the `.hermesversion` using that folder, we guarantee that the relative path will always reference the directory where the `Podfile` is defined, which is the expected behaviour. ## Changelog: [Internal] - Fix an issue where installing pods from a different directory would fail to resolve `hermes-engine` tags correctly. For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests Pull Request resolved: #38754 Test Plan: - Init a new `react-native` repo - Remove the generated `Podfile.lock` file - Navigate to the project root folder - `bundle exec pod install -project-directory=ios` - Check that the `hermes-engine` entry has a properly populated `:tag:` attribute: **Before:** ``` hermes-engine: :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" :tag: '' ``` **After:** ``` hermes-engine: :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" :tag: hermes-2023-03-20-RNv0.72.0-49794cfc7c81fb8f69fd60c3bbf85a7480cc5a77 ``` Reviewed By: cortinico Differential Revision: D48029413 Pulled By: cipolleschi fbshipit-source-id: 82d465abd5c888eeb9eacd32858fa4ecf4f8c217
lunaleaps
pushed a commit
that referenced
this pull request
Aug 7, 2023
…s from a different folder (#38754) Summary: This PR aims to fix an issue where installing iOS pods from a different directory causes the `hermes-engine` `:tag:` not to be properly resolved. Ever since #37148 was merged, the `setup_hermes` script tries to resolve the `node_modules/react-native/sdks/.hermesversion` file and use its content to generate the pod tag, in order to verify when it changes over time. This works perfectly when installing pods within the `ios` folder, as the `react_native_path` should point to the correct relative folder (`../node_modules/react-native` by default). However, when installing pods from a different directory (the project root, for example) and leveraging the `--project-directory` flag, the file fails to resolve, as the current working directory is considered when resolving the `.hermesversion` file. ### Quick Example: - `react_native_path`: `../node_modules/react-native` (the default config) **Installing pods from the `ios` folder:** - `cd ios` - `bundle exec pod install` - `hermestag_file` resolved path: `$project_root/node_modules/react-native` ✅ - `hermes-engine` `:tag:`: `hermes-2023-03-20-RNv0.72.0-49794cfc7c81fb8f69fd60c3bbf85a7480cc5a77` ✅ **Installing pods from the `$project_root` folder** - `bundle exec pod install --project-directory=ios` - `hermestag_file` resolved path: `$parent_folder/$project_root/node_modules/react-native` ❌ - `hermes-engine` `:tag:`: `''` ❌ ### The fix Turns out that the same file had a resolved reference to the `react-native` folder, assigned to the `react_native_dir` variable: ```ruby react_native_dir = Pod::Config.instance.installation_root.join(react_native_path) ``` By resolving the `.hermesversion` using that folder, we guarantee that the relative path will always reference the directory where the `Podfile` is defined, which is the expected behaviour. ## Changelog: [Internal] - Fix an issue where installing pods from a different directory would fail to resolve `hermes-engine` tags correctly. For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests Pull Request resolved: #38754 Test Plan: - Init a new `react-native` repo - Remove the generated `Podfile.lock` file - Navigate to the project root folder - `bundle exec pod install -project-directory=ios` - Check that the `hermes-engine` entry has a properly populated `:tag:` attribute: **Before:** ``` hermes-engine: :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" :tag: '' ``` **After:** ``` hermes-engine: :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" :tag: hermes-2023-03-20-RNv0.72.0-49794cfc7c81fb8f69fd60c3bbf85a7480cc5a77 ``` Reviewed By: cortinico Differential Revision: D48029413 Pulled By: cipolleschi fbshipit-source-id: 82d465abd5c888eeb9eacd32858fa4ecf4f8c217
This was referenced Aug 10, 2023
This was referenced Jan 4, 2024
This was referenced Jan 10, 2024
This was referenced Feb 28, 2024
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.
fb-exported
Merged
This PR has been merged.
p: Facebook
Partner: Facebook
Partner
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.
Summary:
This should fix #36945, which is also causing annoyance when doing the releases
Changelog:
[iOS][Changed] - Use :path instead of :podspec to let cocoapods recognize Hermes updates
Differential Revision: D45394241