-
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
[template
] Use $REACT_NATIVE_PATH instead of relative path
#41968
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.
Shared with Meta
Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
labels
Dec 17, 2023
kraenhansen
changed the title
Use $REACT_NATIVE_PATH instead of relative path
[Dec 17, 2023
template
] Use $REACT_NATIVE_PATH instead of relative path
Base commit: 2441fa2 |
@robhogan has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
robhogan
approved these changes
Dec 18, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! We still have a bit of work to do to make REACT_NATIVE_PATH
itself correct of course, but this is a nice consolidation.
Othinn
pushed a commit
to Othinn/react-native
that referenced
this pull request
Jan 9, 2024
Summary: I believe it's valuable to be able to initialise the React Native template into a mono-repo and have it work with zero updates to the configuration. In its current form the template's Xcode project makes assumptions on the relative location of the `react-native` package, while it could instead use the `REACT_NATIVE_PATH` variable set in the `scripts/cocoapods/utils.rb` script: https://github.com/facebook/react-native/blob/2441fa284716ef782ec12dd0c2801548f8c47339/packages/react-native/scripts/cocoapods/utils.rb#L82 via https://github.com/facebook/react-native/blob/2441fa284716ef782ec12dd0c2801548f8c47339/packages/react-native/template/ios/Podfile#L35 ## Changelog: [IOS] [ADDED] - Add use of the `REACT_NATIVE_PATH` in the "Bundle React Native code and images" shell script build phase. This will help apps initialized into a mono-repo which hoists the `react-native` package. Pull Request resolved: facebook#41968 Test Plan: I initialized the React Native template into an NPM workspaces mono-repo and experienced a failure running the script phase. I updated it to the code in this PR, which resolved the issue. Reviewed By: christophpurrer, cipolleschi Differential Revision: D52240559 Pulled By: robhogan fbshipit-source-id: 1c5710c8ffe9d289f32c5ed83cb58ae27f3c931a
blakef
pushed a commit
to blakef/template
that referenced
this pull request
Feb 28, 2024
Summary: I believe it's valuable to be able to initialise the React Native template into a mono-repo and have it work with zero updates to the configuration. In its current form the template's Xcode project makes assumptions on the relative location of the `react-native` package, while it could instead use the `REACT_NATIVE_PATH` variable set in the `scripts/cocoapods/utils.rb` script: https://github.com/facebook/react-native/blob/2441fa284716ef782ec12dd0c2801548f8c47339/packages/react-native/scripts/cocoapods/utils.rb#L82 via https://github.com/facebook/react-native/blob/2441fa284716ef782ec12dd0c2801548f8c47339/packages/react-native/template/ios/Podfile#L35 ## Changelog: [IOS] [ADDED] - Add use of the `REACT_NATIVE_PATH` in the "Bundle React Native code and images" shell script build phase. This will help apps initialized into a mono-repo which hoists the `react-native` package. Pull Request resolved: facebook/react-native#41968 Test Plan: I initialized the React Native template into an NPM workspaces mono-repo and experienced a failure running the script phase. I updated it to the code in this PR, which resolved the issue. Reviewed By: christophpurrer, cipolleschi Differential Revision: D52240559 Pulled By: robhogan fbshipit-source-id: 1c5710c8ffe9d289f32c5ed83cb58ae27f3c931a Original: facebook/react-native@289e783
blakef
pushed a commit
to react-native-community/template
that referenced
this pull request
Feb 29, 2024
Summary: I believe it's valuable to be able to initialise the React Native template into a mono-repo and have it work with zero updates to the configuration. In its current form the template's Xcode project makes assumptions on the relative location of the `react-native` package, while it could instead use the `REACT_NATIVE_PATH` variable set in the `scripts/cocoapods/utils.rb` script: https://github.com/facebook/react-native/blob/2441fa284716ef782ec12dd0c2801548f8c47339/packages/react-native/scripts/cocoapods/utils.rb#L82 via https://github.com/facebook/react-native/blob/2441fa284716ef782ec12dd0c2801548f8c47339/packages/react-native/template/ios/Podfile#L35 ## Changelog: [IOS] [ADDED] - Add use of the `REACT_NATIVE_PATH` in the "Bundle React Native code and images" shell script build phase. This will help apps initialized into a mono-repo which hoists the `react-native` package. Pull Request resolved: facebook/react-native#41968 Test Plan: I initialized the React Native template into an NPM workspaces mono-repo and experienced a failure running the script phase. I updated it to the code in this PR, which resolved the issue. Reviewed By: christophpurrer, cipolleschi Differential Revision: D52240559 Pulled By: robhogan fbshipit-source-id: 1c5710c8ffe9d289f32c5ed83cb58ae27f3c931a Original-Commit: facebook/react-native@289e783
blakef
pushed a commit
to react-native-community/template
that referenced
this pull request
Feb 29, 2024
Summary: I believe it's valuable to be able to initialise the React Native template into a mono-repo and have it work with zero updates to the configuration. In its current form the template's Xcode project makes assumptions on the relative location of the `react-native` package, while it could instead use the `REACT_NATIVE_PATH` variable set in the `scripts/cocoapods/utils.rb` script: https://github.com/facebook/react-native/blob/2441fa284716ef782ec12dd0c2801548f8c47339/packages/react-native/scripts/cocoapods/utils.rb#L82 via https://github.com/facebook/react-native/blob/2441fa284716ef782ec12dd0c2801548f8c47339/packages/react-native/template/ios/Podfile#L35 ## Changelog: [IOS] [ADDED] - Add use of the `REACT_NATIVE_PATH` in the "Bundle React Native code and images" shell script build phase. This will help apps initialized into a mono-repo which hoists the `react-native` package. Pull Request resolved: facebook/react-native#41968 Test Plan: I initialized the React Native template into an NPM workspaces mono-repo and experienced a failure running the script phase. I updated it to the code in this PR, which resolved the issue. Reviewed By: christophpurrer, cipolleschi Differential Revision: D52240559 Pulled By: robhogan fbshipit-source-id: 1c5710c8ffe9d289f32c5ed83cb58ae27f3c931a Original-Commit: facebook/react-native@289e783
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.
Shared with Meta
Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
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:
I believe it's valuable to be able to initialise the React Native template into a mono-repo and have it work with zero updates to the configuration.
In its current form the template's Xcode project makes assumptions on the relative location of the
react-native
package, while it could instead use theREACT_NATIVE_PATH
variable set in thescripts/cocoapods/utils.rb
script:react-native/packages/react-native/scripts/cocoapods/utils.rb
Line 82 in 2441fa2
via
react-native/packages/react-native/template/ios/Podfile
Line 35 in 2441fa2
Changelog:
[IOS] [ADDED] - Add use of the
REACT_NATIVE_PATH
in the "Bundle React Native code and images" shell script build phase. This will help apps initialized into a mono-repo which hoists thereact-native
package.Test Plan:
I initialized the React Native template into an NPM workspaces mono-repo and experienced a failure running the script phase. I updated it to the code in this PR, which resolved the issue.