add function hard links for headers from ReactCodegen#53640
add function hard links for headers from ReactCodegen#53640cipolleschi wants to merge 8 commits into
Conversation
|
This pull request was exported from Phabricator. Differential Revision: D81778450 |
4734754 to
28f491e
Compare
|
This pull request was exported from Phabricator. Differential Revision: D81778450 |
28f491e to
ab201ea
Compare
cortinico
left a comment
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
ab201ea to
c9f3e83
Compare
|
This pull request was exported from Phabricator. Differential Revision: D81778450 |
c9f3e83 to
89b7413
Compare
89b7413 to
6714752
Compare
6714752 to
9edbad6
Compare
9edbad6 to
13c1447
Compare
|
@cipolleschi has exported this pull request. If you are a Meta employee, you can view the originating diff in D81778450. |
23f6cf7 to
24f59f9
Compare
|
@cipolleschi has exported this pull request. If you are a Meta employee, you can view the originating diff in D81778450. |
|
@cipolleschi has exported this pull request. If you are a Meta employee, you can view the originating diff in D81778450. |
24f59f9 to
c6b770a
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] - Reviewed By: cortinico Differential Revision: D82202860
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, ...) ## 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] - Reviewed By: cortinico Differential Revision: D82205692
…a destination path (facebook#53620) 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 between a source folder and a destination folder. ## Changelog: [Internal] - Reviewed By: cortinico Differential Revision: D81778469
…ers in the ReactApple folder (facebook#53629) 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 to properly create the header structure for the headers in ReactApple that requires a special case. ## Changelog: [Internal] - Reviewed By: cortinico Differential Revision: D81778471
…ers in the ReactCommon folder (facebook#53631) 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 ReactCommon folder that has a complex structure and complex mapping requirements ## Changelog: [Internal] - Reviewed By: cortinico Differential Revision: D81778470
…Native Core (facebook#53635) 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] - Reviewed By: cortinico Differential Revision: D81778464
…ndencies (facebook#53638) 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] - Reviewed By: cortinico 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] - Reviewed By: cortinico Differential Revision: D81778450
c6b770a to
c79c072
Compare
|
@cipolleschi has exported this pull request. If you are a Meta employee, you can view the originating diff in D81778450. |
|
This pull request has been merged in c6395ec. |
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