-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Add Functions to coordinate the update of the xcode project. #53664
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: D82020721 |
|
This pull request was exported from Phabricator. Differential Revision: D82020721 |
…k#53664) Summary: Pull Request resolved: facebook#53664 ## 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 is the last function required to manipulate the Xcodeproject file. It is an high-level function that orchestrate all the changes that are needed in the xcodeproj file ## Changelog: [Internal] - Differential Revision: D82020721
bc98e64 to
ff7825f
Compare
|
This pull request was exported from Phabricator. Differential Revision: D82020721 |
…k#53664) Summary: Pull Request resolved: facebook#53664 ## 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 is the last function required to manipulate the Xcodeproject file. It is an high-level function that orchestrate all the changes that are needed in the xcodeproj file ## Changelog: [Internal] - Differential Revision: D82020721
ff7825f to
a393a93
Compare
|
This pull request was exported from Phabricator. Differential Revision: D82020721 |
…k#53664) Summary: Pull Request resolved: facebook#53664 ## 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 is the last function required to manipulate the Xcodeproject file. It is an high-level function that orchestrate all the changes that are needed in the xcodeproj file ## Changelog: [Internal] - Differential Revision: D82020721
a393a93 to
ab90be6
Compare
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.
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#53648) Summary: 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
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 printFilesForBuildPhase to xcode-core-utils to make it easier to mock the function - Adds a function to update the package reference section to configure the list of build files for the FrameworkBuildStep ## Changelog: [Internal] - Differential Revision: D81778472
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 update the package reference section so that Xcode can properly load the packages in the project. ## Changelog: [Internal] - Differential Revision: D81778463
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: - moves the print functions and the addMissingSections function to a separate file, to make it easier to mocke them in tests - add a function that coordinates the manipulation of the xcodeproj ## Changelog: [Internal] - Differential Revision: D81778451
…k#53664) Summary: Pull Request resolved: facebook#53664 ## 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 is the last function required to manipulate the Xcodeproject file. It is an high-level function that orchestrate all the changes that are needed in the xcodeproj file ## Changelog: [Internal] - Differential Revision: D82020721
|
This pull request was exported from Phabricator. Differential Revision: D82020721 |
ab90be6 to
42742da
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 is the last function required to manipulate the Xcodeproject file. It is an high-level function that orchestrate all the changes that are needed in the xcodeproj file
Changelog:
[Internal] -
Differential Revision: D82020721