Skip to content
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

Testing: Remove private headers from podspecs #36993

Closed
wants to merge 1 commit into from

Conversation

NickGerleman
Copy link
Contributor

Summary: Changelog: [Internal]

Differential Revision: D45139075

@facebook-github-bot 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. p: Facebook Partner: Facebook Partner fb-exported labels Apr 20, 2023
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 20, 2023
Summary:
Pull Request resolved: facebook#36993

Fabric relies on the private C++ internals of Yoga. This creates a conundrum in the open source build due to how header creation in Cocoapods works.

1. The default mechanism of specifying public headers needs to include the private headers for them to be made usable by fabric (by default)
2. Cocoapods will roll up all of the public headers when importing a module

facebook#33381 fixed the Fabric Cocoapods build which ran into this. React Native relies on FlipperKit which relies on YogaKit, which in turn finally imports the Yoga podspec. Because YogaKit may use Swift, we can only expose the public Yoga C ABI.

The first solution in that PR was to allow RN to access Yoga private headers, but this was changed to instead make all Yoga headers public, and to add ifdefs to all of them to no-op when included outside of a C++ environment.

Talking to Kudo, we should be able to change back to the earlier approach in the PR, to instead expose the private headers to only RN. This lets us avoid exposing headers that we ideally wouldn't be, and lets us avoid the messy ifdefs in every Yoga header.

But also I have no idea what I'm doing here, so this will be exported and built.

Changelog: [Internal]

Differential Revision: D45139075

fbshipit-source-id: 1bf945f9ed2067e33279d3b80093784f60f72005
@facebook-github-bot
Copy link
Contributor

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

1 similar comment
@facebook-github-bot
Copy link
Contributor

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

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 20, 2023
Summary:
Pull Request resolved: facebook#36993

Fabric relies on the private C++ internals of Yoga. This creates a conundrum in the open source build due to how header creation in Cocoapods works.

1. The default mechanism of specifying public headers needs to include the private headers for them to be made usable by fabric (by default)
2. Cocoapods will roll up all of the public headers when importing a module

facebook#33381 fixed the Fabric Cocoapods build which ran into this. React Native relies on FlipperKit which relies on YogaKit, which in turn finally imports the Yoga podspec. Because YogaKit may use Swift, we can only expose the public Yoga C ABI.

The first solution in that PR was to allow RN to access Yoga private headers, but this was changed to instead make all Yoga headers public, and to add ifdefs to all of them to no-op when included outside of a C++ environment.

Talking to Kudo, we should be able to change back to the earlier approach in the PR, to instead expose the private headers to only RN. This lets us avoid exposing headers that we ideally wouldn't be, and lets us avoid the messy ifdefs in every Yoga header.

But also I have no idea what I'm doing here, so this will be exported and built.

Changelog: [Internal]

Differential Revision: D45139075

fbshipit-source-id: 820cc2080ca66838741c9a87e192b83dad5bb129
@facebook-github-bot
Copy link
Contributor

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

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 20, 2023
Summary:
Pull Request resolved: facebook#36993

Fabric relies on the private C++ internals of Yoga. This creates a conundrum in the open source build due to how header creation in Cocoapods works.

1. The default mechanism of specifying public headers needs to include the private headers for them to be made usable by fabric (by default)
2. Cocoapods will roll up all of the public headers when importing a module

facebook#33381 fixed the Fabric Cocoapods build which ran into this. React Native relies on FlipperKit which relies on YogaKit, which in turn finally imports the Yoga podspec. Because YogaKit may use Swift, we can only expose the public Yoga C ABI.

The first solution in that PR was to allow RN to access Yoga private headers, but this was changed to instead make all Yoga headers public, and to add ifdefs to all of them to no-op when included outside of a C++ environment.

Talking to Kudo, we should be able to change back to the earlier approach in the PR, to instead expose the private headers to only RN. This lets us avoid exposing headers that we ideally wouldn't be, and lets us avoid the messy ifdefs in every Yoga header.

But also I have no idea what I'm doing here, so this will be exported and built.

Changelog: [Internal]

Differential Revision: D45139075

fbshipit-source-id: 33b58e79a579cfc1426ceb283d0f85c9a80a607c
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 20, 2023
Summary:
Pull Request resolved: facebook#36993

Fabric relies on the private C++ internals of Yoga. This creates a conundrum in the open source build due to how header creation in Cocoapods works.

1. The default mechanism of specifying public headers needs to include the private headers for them to be made usable by fabric (by default)
2. Cocoapods will roll up all of the public headers when importing a module

facebook#33381 fixed the Fabric Cocoapods build which ran into this. React Native relies on FlipperKit which relies on YogaKit, which in turn finally imports the Yoga podspec. Because YogaKit may use Swift, we can only expose the public Yoga C ABI.

The first solution in that PR was to allow RN to access Yoga private headers, but this was changed to instead make all Yoga headers public, and to add ifdefs to all of them to no-op when included outside of a C++ environment.

Talking to Kudo, we should be able to change back to the earlier approach in the PR, to instead expose the private headers to only RN. This lets us avoid exposing headers that we ideally wouldn't be, and lets us avoid the messy ifdefs in every Yoga header.

But also I have no idea what I'm doing here, so this will be exported and built.

Changelog: [Internal]

Differential Revision: D45139075

fbshipit-source-id: 80e50effd28a22065932a43e5c605c00b25f9b01
@facebook-github-bot
Copy link
Contributor

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

1 similar comment
@facebook-github-bot
Copy link
Contributor

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

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 20, 2023
Summary:
Pull Request resolved: facebook#36993

Fabric relies on the private C++ internals of Yoga. This creates a conundrum in the open source build due to how header creation in Cocoapods works.

1. The default mechanism of specifying public headers needs to include the private headers for them to be made usable by fabric (by default)
2. Cocoapods will roll up all of the public headers when importing a module

facebook#33381 fixed the Fabric Cocoapods build which ran into this. React Native relies on FlipperKit which relies on YogaKit, which in turn finally imports the Yoga podspec. Because YogaKit may use Swift, we can only expose the public Yoga C ABI.

The first solution in that PR was to allow RN to access Yoga private headers, but this was changed to instead make all Yoga headers public, and to add ifdefs to all of them to no-op when included outside of a C++ environment.

Talking to Kudo, we should be able to change back to the earlier approach in the PR, to instead expose the private headers to only RN. This lets us avoid exposing headers that we ideally wouldn't be, and lets us avoid the messy ifdefs in every Yoga header.

But also I have no idea what I'm doing here, so this will be exported and built.

Changelog: [Internal]

Differential Revision: D45139075

fbshipit-source-id: c2e372adb63ce495066fe80ce2d7c5c035b37a22
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Apr 20, 2023
Summary:
X-link: facebook/react-native#36993

Fabric relies on the private C++ internals of Yoga. This creates a conundrum in the open source build due to how header creation in Cocoapods works.

1. The default mechanism of specifying public headers needs to include the private headers for them to be made usable by fabric (by default)
2. Cocoapods will roll up all of the public headers when importing a module

facebook/react-native#33381 fixed the Fabric Cocoapods build which ran into this. React Native relies on FlipperKit which relies on YogaKit, which in turn finally imports the Yoga podspec. Because YogaKit may use Swift, we can only expose the public Yoga C ABI.

The first solution in that PR was to allow RN to access Yoga private headers, but this was changed to instead make all Yoga headers public, and to add ifdefs to all of them to no-op when included outside of a C++ environment.

Talking to Kudo, we should be able to change back to the earlier approach in the PR, to instead expose the private headers to only RN. This lets us avoid exposing headers that we ideally wouldn't be, and lets us avoid the messy ifdefs in every Yoga header.

But also I have no idea what I'm doing here, so this will be exported and built.

Changelog: [Internal]

Differential Revision: D45139075

fbshipit-source-id: ed4c73f465bb73d23a2b22d1fed340d3cd41fe45
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 20, 2023
Summary:
Pull Request resolved: facebook#36993

Fabric relies on the private C++ internals of Yoga. This creates a conundrum in the open source build due to how header creation in Cocoapods works.

1. The default mechanism of specifying public headers needs to include the private headers for them to be made usable by fabric (by default)
2. Cocoapods will roll up all of the public headers when importing a module

facebook#33381 fixed the Fabric Cocoapods build which ran into this. React Native relies on FlipperKit which relies on YogaKit, which in turn finally imports the Yoga podspec. Because YogaKit may use Swift, we can only expose the public Yoga C ABI.

The first solution in that PR was to allow RN to access Yoga private headers, but this was changed to instead make all Yoga headers public, and to add ifdefs to all of them to no-op when included outside of a C++ environment.

Talking to Kudo, we should be able to change back to the earlier approach in the PR, to instead expose the private headers to only RN. This lets us avoid exposing headers that we ideally wouldn't be, and lets us avoid the messy ifdefs in every Yoga header.

But also I have no idea what I'm doing here, so this will be exported and built.

Changelog: [Internal]

Differential Revision: D45139075

fbshipit-source-id: f784c38a8169d269a0aabeaffe386e927df32e31
@facebook-github-bot
Copy link
Contributor

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

@analysis-bot
Copy link

analysis-bot commented Apr 20, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,623,502 +5
android hermes armeabi-v7a 7,936,340 -5
android hermes x86 9,110,446 -13
android hermes x86_64 8,965,250 -5
android jsc arm64-v8a 9,187,538 -2
android jsc armeabi-v7a 8,377,834 -7
android jsc x86 9,245,844 -3
android jsc x86_64 9,504,290 +2

Base commit: c1dea41
Branch: main

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 20, 2023
Summary:
X-link: facebook/yoga#1252

Pull Request resolved: facebook#36993

Fabric relies on the private C++ internals of Yoga. This creates a conundrum in the open source build due to how header creation in Cocoapods works.

1. The default mechanism of specifying public headers needs to include the private headers for them to be made usable by fabric (by default)
2. Cocoapods will roll up all of the public headers when importing a module

facebook#33381 fixed the Fabric Cocoapods build which ran into this. React Native relies on FlipperKit which relies on YogaKit, which in turn finally imports the Yoga podspec. Because YogaKit may use Swift, we can only expose the public Yoga C ABI.

The first solution in that PR was to allow RN to access Yoga private headers, but this was changed to instead make all Yoga headers public, and to add ifdefs to all of them to no-op when included outside of a C++ environment.

Talking to Kudo, we should be able to change back to the earlier approach in the PR, to instead expose the private headers to only RN. This lets us avoid exposing headers that we ideally wouldn't be, and lets us avoid the messy ifdefs in every Yoga header.

Changelog: [Internal]

Differential Revision: D45139075

fbshipit-source-id: 876f9379d890d38df32afdb280b0a26c6dd78172
@facebook-github-bot
Copy link
Contributor

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

1 similar comment
@facebook-github-bot
Copy link
Contributor

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

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 21, 2023
Summary:
X-link: facebook/yoga#1252

Pull Request resolved: facebook#36993

Fabric relies on the private C++ internals of Yoga. This creates a conundrum in the open source build due to how header creation in Cocoapods works.

1. The default mechanism of specifying public headers needs to include the private headers for them to be made usable by fabric (by default)
2. Cocoapods will roll up all of the public headers when importing a module

facebook#33381 fixed the Fabric Cocoapods build which ran into this. React Native relies on FlipperKit which relies on YogaKit, which in turn finally imports the Yoga podspec. Because YogaKit may use Swift, we can only expose the public Yoga C ABI.

The first solution in that PR was to allow RN to access Yoga private headers, but this was changed to instead make all Yoga headers public, and to add ifdefs to all of them to no-op when included outside of a C++ environment.

Talking to Kudo, we should be able to change back to the earlier approach in the PR, to instead expose the private headers to only RN. This lets us avoid exposing headers that we ideally wouldn't be, and lets us avoid the messy ifdefs in every Yoga header.

Changelog: [Internal]

Differential Revision: D45139075

fbshipit-source-id: c7c213b4004f88f002f8c8d7b13c5805727753a7
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 22, 2023
Summary:
X-link: facebook/yoga#1252

Pull Request resolved: facebook#36993

Fabric relies on the private C++ internals of Yoga. This creates a conundrum in the open source build due to how header creation in Cocoapods works.

1. The default mechanism of specifying public headers needs to include the private headers for them to be made usable by fabric (by default)
2. Cocoapods will roll up all of the public headers when importing a module

facebook#33381 fixed the Fabric Cocoapods build which ran into this. React Native relies on FlipperKit which relies on YogaKit, which in turn finally imports the Yoga podspec. Because YogaKit may use Swift, we can only expose the public Yoga C ABI.

The first solution in that PR was to allow RN to access Yoga private headers, but this was changed to instead make all Yoga headers public, and to add ifdefs to all of them to no-op when included outside of a C++ environment.

Talking to Kudo, we should be able to change back to the earlier approach in the PR, to instead expose the private headers to only RN. This lets us avoid exposing headers that we ideally wouldn't be, and lets us avoid the messy ifdefs in every Yoga header.

Changelog: [Internal]

Differential Revision: D45139075

fbshipit-source-id: fdc7d0723ec045bfa64c5c1dc2f8a3d7c5faff50
@facebook-github-bot
Copy link
Contributor

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

NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Apr 24, 2023
Summary:
Pull Request resolved: facebook#1252

X-link: facebook/react-native#36993

Fabric relies on the private C++ internals of Yoga. This creates a conundrum in the open source build due to how header creation in Cocoapods works.

1. The default mechanism of specifying public headers needs to include the private headers for them to be made usable by fabric (by default)
2. Cocoapods will roll up all of the public headers when importing a module

facebook/react-native#33381 fixed the Fabric Cocoapods build which ran into this. React Native relies on FlipperKit which relies on YogaKit, which in turn finally imports the Yoga podspec. Because YogaKit may use Swift, we can only expose the public Yoga C ABI.

The first solution in that PR was to allow RN to access Yoga private headers, but this was changed to instead make all Yoga headers public, and to add ifdefs to all of them to no-op when included outside of a C++ environment.

Talking to Kudo, we should be able to change back to the earlier approach in the PR, to instead expose the private headers to only RN. This lets us avoid exposing headers that we ideally wouldn't be, and lets us avoid the messy ifdefs in every Yoga header.

Changelog: [Internal]

Differential Revision: D45139075

fbshipit-source-id: af4c7c82ca15276a72c024d98cf44134da27497d
NickGerleman added a commit to NickGerleman/litho that referenced this pull request Apr 24, 2023
Summary:
X-link: facebook/yoga#1252

X-link: facebook/react-native#36993

Fabric relies on the private C++ internals of Yoga. This creates a conundrum in the open source build due to how header creation in Cocoapods works.

1. The default mechanism of specifying public headers needs to include the private headers for them to be made usable by fabric (by default)
2. Cocoapods will roll up all of the public headers when importing a module

facebook/react-native#33381 fixed the Fabric Cocoapods build which ran into this. React Native relies on FlipperKit which relies on YogaKit, which in turn finally imports the Yoga podspec. Because YogaKit may use Swift, we can only expose the public Yoga C ABI.

The first solution in that PR was to allow RN to access Yoga private headers, but this was changed to instead make all Yoga headers public, and to add ifdefs to all of them to no-op when included outside of a C++ environment.

Talking to Kudo, we should be able to change back to the earlier approach in the PR, to instead expose the private headers to only RN. This lets us avoid exposing headers that we ideally wouldn't be, and lets us avoid the messy ifdefs in every Yoga header.

Changelog: [Internal]

Differential Revision: D45139075

fbshipit-source-id: 8f1878f602b732cdd928a1311a6bedf85afe12ca
@facebook-github-bot
Copy link
Contributor

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

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 24, 2023
Summary:
X-link: facebook/yoga#1252

Pull Request resolved: facebook#36993

Fabric relies on the private C++ internals of Yoga. This creates a conundrum in the open source build due to how header creation in Cocoapods works.

1. The default mechanism of specifying public headers needs to include the private headers for them to be made usable by fabric (by default)
2. Cocoapods will roll up all of the public headers when importing a module

facebook#33381 fixed the Fabric Cocoapods build which ran into this. React Native relies on FlipperKit which relies on YogaKit, which in turn finally imports the Yoga podspec. Because YogaKit may use Swift, we can only expose the public Yoga C ABI.

The first solution in that PR was to allow RN to access Yoga private headers, but this was changed to instead make all Yoga headers public, and to add ifdefs to all of them to no-op when included outside of a C++ environment.

Talking to Kudo, we should be able to change back to the earlier approach in the PR, to instead expose the private headers to only RN. This lets us avoid exposing headers that we ideally wouldn't be, and lets us avoid the messy ifdefs in every Yoga header.

Changelog: [Internal]

Differential Revision: D45139075

fbshipit-source-id: 9220756c29b7f5f2bc95e7df126fb789e5c5833f
@facebook-github-bot
Copy link
Contributor

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

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 25, 2023
Summary:
X-link: facebook/litho#940

X-link: facebook/yoga#1252

Pull Request resolved: facebook#36993

Fabric relies on the private C++ internals of Yoga. This creates a conundrum in the open source build due to how header creation in Cocoapods works.

1. The default mechanism of specifying public headers needs to include the private headers for them to be made usable by fabric (by default)
2. Cocoapods will roll up all of the public headers when importing a module

facebook#33381 fixed the Fabric Cocoapods build which ran into this. React Native relies on FlipperKit which relies on YogaKit, which in turn finally imports the Yoga podspec. Because YogaKit may use Swift, we can only expose the public Yoga C ABI.

The first solution in that PR was to allow RN to access Yoga private headers, but this was changed to instead make all Yoga headers public, and to add ifdefs to all of them to no-op when included outside of a C++ environment.

Talking to Kudo, we should be able to change back to the earlier approach in the PR, to instead expose the private headers to only RN. This lets us avoid exposing headers that we ideally wouldn't be, and lets us avoid the messy ifdefs in every Yoga header.

Changelog: [Internal]

Differential Revision: D45139075

fbshipit-source-id: b80bcb5b2a20ec5b2936f6c4d84361f084e8f4c3
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 26, 2023
Summary:
X-link: facebook/litho#940

X-link: facebook/yoga#1252

Pull Request resolved: facebook#36993

Fabric relies on the private C++ internals of Yoga. This creates a conundrum in the open source build due to how header creation in Cocoapods works.

1. The default mechanism of specifying public headers needs to include the private headers for them to be made usable by fabric (by default)
2. Cocoapods will roll up all of the public headers when importing a module

facebook#33381 fixed the Fabric Cocoapods build which ran into this. React Native relies on FlipperKit which relies on YogaKit, which in turn finally imports the Yoga podspec. Because YogaKit may use Swift, we can only expose the public Yoga C ABI.

The first solution in that PR was to allow RN to access Yoga private headers, but this was changed to instead make all Yoga headers public, and to add ifdefs to all of them to no-op when included outside of a C++ environment.

Talking to Kudo, we should be able to change back to the earlier approach in the PR, to instead expose the private headers to only RN. This lets us avoid exposing headers that we ideally wouldn't be, and lets us avoid the messy ifdefs in every Yoga header.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D45139075

fbshipit-source-id: ad6c0b5b5a7aa5fbf849c3ca62f3fe330601b19a
@facebook-github-bot
Copy link
Contributor

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

Summary:
X-link: facebook/litho#940

X-link: facebook/yoga#1252

Pull Request resolved: facebook#36993

Fabric relies on the private C++ internals of Yoga. This creates a conundrum in the open source build due to how header creation in Cocoapods works.

1. The default mechanism of specifying public headers needs to include the private headers for them to be made usable by fabric (by default)
2. Cocoapods will roll up all of the public headers when importing a module

facebook#33381 fixed the Fabric Cocoapods build which ran into this. React Native relies on FlipperKit which relies on YogaKit, which in turn finally imports the Yoga podspec. Because YogaKit may use Swift, we can only expose the public Yoga C ABI.

The first solution in that PR was to allow RN to access Yoga private headers, but this was changed to instead make all Yoga headers public, and to add ifdefs to all of them to no-op when included outside of a C++ environment.

Talking to Kudo, we should be able to change back to the earlier approach in the PR, to instead expose the private headers to only RN. This lets us avoid exposing headers that we ideally wouldn't be, and lets us avoid the messy ifdefs in every Yoga header.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D45139075

fbshipit-source-id: 96dab7b73f5164cb5103674d074d0759dad9c8b0
@facebook-github-bot
Copy link
Contributor

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

facebook-github-bot pushed a commit to facebook/yoga that referenced this pull request Apr 27, 2023
Summary:
X-link: facebook/litho#940

Pull Request resolved: #1252

X-link: facebook/react-native#36993

Fabric relies on the private C++ internals of Yoga. This creates a conundrum in the open source build due to how header creation in Cocoapods works.

1. The default mechanism of specifying public headers needs to include the private headers for them to be made usable by fabric (by default)
2. Cocoapods will roll up all of the public headers when importing a module

facebook/react-native#33381 fixed the Fabric Cocoapods build which ran into this. React Native relies on FlipperKit which relies on YogaKit, which in turn finally imports the Yoga podspec. Because YogaKit may use Swift, we can only expose the public Yoga C ABI.

The first solution in that PR was to allow RN to access Yoga private headers, but this was changed to instead make all Yoga headers public, and to add ifdefs to all of them to no-op when included outside of a C++ environment.

Talking to Kudo, we should be able to change back to the earlier approach in the PR, to instead expose the private headers to only RN. This lets us avoid exposing headers that we ideally wouldn't be, and lets us avoid the messy ifdefs in every Yoga header.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D45139075

fbshipit-source-id: 99152986a578f7aac8324dffe0e18c42a38cc6a5
facebook-github-bot pushed a commit to facebook/litho that referenced this pull request Apr 27, 2023
Summary:
Pull Request resolved: #940

X-link: facebook/yoga#1252

X-link: facebook/react-native#36993

Fabric relies on the private C++ internals of Yoga. This creates a conundrum in the open source build due to how header creation in Cocoapods works.

1. The default mechanism of specifying public headers needs to include the private headers for them to be made usable by fabric (by default)
2. Cocoapods will roll up all of the public headers when importing a module

facebook/react-native#33381 fixed the Fabric Cocoapods build which ran into this. React Native relies on FlipperKit which relies on YogaKit, which in turn finally imports the Yoga podspec. Because YogaKit may use Swift, we can only expose the public Yoga C ABI.

The first solution in that PR was to allow RN to access Yoga private headers, but this was changed to instead make all Yoga headers public, and to add ifdefs to all of them to no-op when included outside of a C++ environment.

Talking to Kudo, we should be able to change back to the earlier approach in the PR, to instead expose the private headers to only RN. This lets us avoid exposing headers that we ideally wouldn't be, and lets us avoid the messy ifdefs in every Yoga header.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D45139075

fbshipit-source-id: 99152986a578f7aac8324dffe0e18c42a38cc6a5
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Apr 27, 2023
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 33ebb5d.

jeongshin pushed a commit to jeongshin/react-native that referenced this pull request May 7, 2023
Summary:
X-link: facebook/litho#940

X-link: facebook/yoga#1252

Pull Request resolved: facebook#36993

Fabric relies on the private C++ internals of Yoga. This creates a conundrum in the open source build due to how header creation in Cocoapods works.

1. The default mechanism of specifying public headers needs to include the private headers for them to be made usable by fabric (by default)
2. Cocoapods will roll up all of the public headers when importing a module

facebook#33381 fixed the Fabric Cocoapods build which ran into this. React Native relies on FlipperKit which relies on YogaKit, which in turn finally imports the Yoga podspec. Because YogaKit may use Swift, we can only expose the public Yoga C ABI.

The first solution in that PR was to allow RN to access Yoga private headers, but this was changed to instead make all Yoga headers public, and to add ifdefs to all of them to no-op when included outside of a C++ environment.

Talking to Kudo, we should be able to change back to the earlier approach in the PR, to instead expose the private headers to only RN. This lets us avoid exposing headers that we ideally wouldn't be, and lets us avoid the messy ifdefs in every Yoga header.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D45139075

fbshipit-source-id: 99152986a578f7aac8324dffe0e18c42a38cc6a5
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
Summary:
X-link: facebook/litho#940

X-link: facebook/yoga#1252

Pull Request resolved: facebook#36993

Fabric relies on the private C++ internals of Yoga. This creates a conundrum in the open source build due to how header creation in Cocoapods works.

1. The default mechanism of specifying public headers needs to include the private headers for them to be made usable by fabric (by default)
2. Cocoapods will roll up all of the public headers when importing a module

facebook#33381 fixed the Fabric Cocoapods build which ran into this. React Native relies on FlipperKit which relies on YogaKit, which in turn finally imports the Yoga podspec. Because YogaKit may use Swift, we can only expose the public Yoga C ABI.

The first solution in that PR was to allow RN to access Yoga private headers, but this was changed to instead make all Yoga headers public, and to add ifdefs to all of them to no-op when included outside of a C++ environment.

Talking to Kudo, we should be able to change back to the earlier approach in the PR, to instead expose the private headers to only RN. This lets us avoid exposing headers that we ideally wouldn't be, and lets us avoid the messy ifdefs in every Yoga header.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D45139075

fbshipit-source-id: 99152986a578f7aac8324dffe0e18c42a38cc6a5
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. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants