-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Add Function to add missing sections in case the original project don't have them (#53648) #53654
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
base: main
Are you sure you want to change the base?
Conversation
|
This pull request was exported from Phabricator. Differential Revision: D81778443 |
cortinico
left a comment
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.
Review automatically exported from Phabricator review in Meta.
|
This pull request was exported from Phabricator. Differential Revision: D81778443 |
ed8ab45 to
29b9209
Compare
…'t have them (facebook#53654) Summary: Pull Request resolved: facebook#53654 Pull Request resolved: facebook#53648 ## Context Apple does not have a tool from CLI to add a package to a project, therefore we need to manually modify the Xcodeproject to integrate some Swift packages into it. ## Changed This change adds a function to add missing section to the project. This function is used by a coordination function in a future diff on the stack. ## Changelog: [Internal] - Differential Revision: D81778443
|
This pull request was exported from Phabricator. Differential Revision: D81778443 |
…'t have them (facebook#53654) Summary: Pull Request resolved: facebook#53654 Pull Request resolved: facebook#53648 ## Context Apple does not have a tool from CLI to add a package to a project, therefore we need to manually modify the Xcodeproject to integrate some Swift packages into it. ## Changed This change adds a function to add missing section to the project. This function is used by a coordination function in a future diff on the stack. ## Changelog: [Internal] - Differential Revision: D81778443
29b9209 to
ee9eccf
Compare
|
This pull request was exported from Phabricator. Differential Revision: D81778443 |
…'t have them (facebook#53654) Summary: Pull Request resolved: facebook#53654 Pull Request resolved: facebook#53648 ## Context Apple does not have a tool from CLI to add a package to a project, therefore we need to manually modify the Xcodeproject to integrate some Swift packages into it. ## Changed This change adds a function to add missing section to the project. This function is used by a coordination function in a future diff on the stack. ## Changelog: [Internal] - Differential Revision: D81778443
ee9eccf to
5584b04
Compare
Summary: This change adds a simple function that manages symlinks. This is used through the stack of changes to avoid code repetition. ## Context SwiftPM is very picky in how the header structure must be. In order to preserve the import/include statements as much as possible when building from source, we can recreate the header structure in a temporary folder inside the react-native package using symlinks. In this way, users can still modify the headers and build RNTester and HelloWorld using SwiftPM without breaking changes. ## Changelog: [Internal] - Differential Revision: D82202860 Reviewed By: cortinico
Summary: This change add a utility function to extract headers (both .h and .hpp) from a folder. It also allow to exclude some specific folders (e.g.: `tests`, non supported platforms, ...) ## Changelog: [Internal] - Differential Revision: D82205692
…a destination path (facebook#53620) Summary: Pull Request resolved: facebook#53620 ## Context One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`). To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers. ## Changed In this change we are adding an helper function that creates links between a source folder and a destination folder. ## Changelog: [Internal] - Differential Revision: D81778469 Reviewed By: cortinico
…ers in the ReactApple folder (facebook#53629) Summary: Pull Request resolved: facebook#53629 ## Context One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`). To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers. ## Changed In this change we are adding a function to properly create the header structure for the headers in ReactApple that requires a special case. ## Changelog: [Internal] - Differential Revision: D81778471 Reviewed By: cortinico
…ers in the ReactCommon folder (facebook#53631) Summary: Pull Request resolved: facebook#53631 ## Context One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`). To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers. ## Changed In this change we are adding an helper function that creates links for the ReactCommon folder that has a complex structure and complex mapping requirements ## Changelog: [Internal] - Differential Revision: D81778470 Reviewed By: cortinico
…Native Core Summary: ## Context One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`). To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers. ## Changed In this change we did two things: 1. we move the helper functions to a headers-utils.js file (and the tests to the `headers-utils-test.js` file) 2. we added a function that coordinates the creation of the header links *and added tests for it) ## Changelog: [Internal] - Differential Revision: D81778464
…ndencies Summary: ## Context One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`). To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers. ## Changed In this change we are adding an helper function that creates links for the ThirdPartyDependencies that React native and libraries might need to access. ## Changelog: [Internal] - Differential Revision: D81778459
Summary: ## Context One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`). To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers. ## Changed In this change we are adding an helper function to create hard links to Codegen Headers so that other libraries can access them. ## Changelog: [Internal] - Differential Revision: D81778450
…ard links Summary: ## Context One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`). To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers. ## Changed In this change we are adding a function that is used to orchestrate the helpers function defined in previous changes. ## Changelog: [Internal] - Differential Revision: D81778457
Summary: ## Context Apple does not have a tool from CLI to add a package to a project, therefore we need to manually modify the Xcodeproject to integrate some Swift packages into it. ## Changed All the Xcode project elements have an id of 24 hex characters. This change adds a function to generate the id randomly. ## Changelog: [Internal] - Differential Revision: D81778473
Summary: ## Context Apple does not have a tool from CLI to add a package to a project, therefore we need to manually modify the Xcodeproject to integrate some Swift packages into it. ## Changed Apple provides a helpful CLI program called `plutils` that can take a xcodeproj and convert it to json. We use that to parse the xcodeproject. ## Changelog: [Internal] - Differential Revision: D81778448
Summary: ## Context Apple does not have a tool from CLI to add a package to a project, therefore we need to manually modify the Xcodeproject to integrate some Swift packages into it. ## Changed We are adding a function that deintegrate local Swift Packages. This helps to make sure we can have an idempotent script and that we don't add the same package twice. ## Changelog: [Internal] - Differential Revision: D81778458
Summary: ## Context Apple does not have a tool from CLI to add a package to a project, therefore we need to manually modify the Xcodeproject to integrate some Swift packages into it. ## Changed This change adds some helper function that can be used to serialize some simple Xcodeproject objects back to string. This will be used in future diffs to rewrite the Xcodeproj file. ## Changelog: [Internal] - Differential Revision: D81778445
Summary: ## Context Apple does not have a tool from CLI to add a package to a project, therefore we need to manually modify the Xcodeproject to integrate some Swift packages into it. ## Changed This change does two things: - moves the function that generate the object id to a different file - adds a function to add the local Swift packages to the project Moving the generateObjectId function to a separate file is a required step to mock it in the tests. ## Changelog: [Internal] - Differential Revision: D81934363
…'t have them (facebook#53654) Summary: Pull Request resolved: facebook#53654 Pull Request resolved: facebook#53648 ## Context Apple does not have a tool from CLI to add a package to a project, therefore we need to manually modify the Xcodeproject to integrate some Swift packages into it. ## Changed This change adds a function to add missing section to the project. This function is used by a coordination function in a future diff on the stack. ## Changelog: [Internal] - Differential Revision: D81778443
|
This pull request was exported from Phabricator. Differential Revision: D81778443 |
5584b04 to
39abaf0
Compare
Summary:
Context
Apple does not have a tool from CLI to add a package to
a project, therefore we need to manually modify the Xcodeproject to integrate some Swift packages into it.
Changed
This change adds a function to add missing section to the project. This function is used by a coordination function in a future diff on the stack.
Changelog:
[Internal] -
Differential Revision: D81778443