Skip to content

Conversation

@cipolleschi
Copy link
Contributor

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] -

Differential Revision: D81778471

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 8, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D81778471

cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 8, 2025
…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] -

Differential Revision: D81778471
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 8, 2025
…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] -

Differential Revision: D81778471
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 8, 2025
…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] -

Differential Revision: D81778471
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 8, 2025
…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] -

Differential Revision: D81778471
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 8, 2025
…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] -

Differential Revision: D81778471
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 8, 2025
…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] -

Differential Revision: D81778471
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 8, 2025
…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] -

Differential Revision: D81778471
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 9, 2025
…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] -

Differential Revision: D81778471
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 9, 2025
…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] -

Differential Revision: D81778471
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 9, 2025
…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] -

Differential Revision: D81778471
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 9, 2025
…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] -

Differential Revision: D81778471
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 9, 2025
…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] -

Differential Revision: D81778471
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 9, 2025
…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] -

Differential Revision: D81778471
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 9, 2025
…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] -

Differential Revision: D81778471
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 9, 2025
…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] -

Differential Revision: D81778471
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D81778471

cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 9, 2025
…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
Copy link
Contributor

@cortinico cortinico left a 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.

cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 10, 2025
…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
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 10, 2025
…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
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 10, 2025
…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
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 10, 2025
…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
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 11, 2025
…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
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 12, 2025
…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
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 21, 2025
…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
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 21, 2025
…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
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 21, 2025
…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
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 21, 2025
…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
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 21, 2025
…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
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 21, 2025
…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
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 22, 2025
…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
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 22, 2025
…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
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 22, 2025
…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
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 22, 2025
…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
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 22, 2025
…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
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 22, 2025
…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
cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 22, 2025
…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
@facebook-github-bot
Copy link
Contributor

@cipolleschi has exported this pull request. If you are a Meta employee, you can view the originating diff in D81778471.

cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Sep 22, 2025
…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
cipolleschi pushed a commit to cipolleschi/react-native that referenced this pull request Sep 22, 2025
…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
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
@facebook-github-bot
Copy link
Contributor

@cipolleschi has exported this pull request. If you are a Meta employee, you can view the originating diff in D81778471.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Sep 22, 2025
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 8db93ab.

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. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants