Skip to content

Don't export private headers from Buck target (#37127)#1269

Closed
NickGerleman wants to merge 1 commit intofacebook:mainfrom
NickGerleman:export-D45339425
Closed

Don't export private headers from Buck target (#37127)#1269
NickGerleman wants to merge 1 commit intofacebook:mainfrom
NickGerleman:export-D45339425

Conversation

@NickGerleman
Copy link
Copy Markdown
Contributor

Summary:
X-link: facebook/react-native#37127

This prevents targets which include Yoga from using its private APIs.

Instances of this have been mostly cleaned up in the past diffs, with the major exception of RN Fabric. To stage this without blocking on that, I added a yoga-private-api target for now to keep using these headers while making it unlikely new usages will show up.

Reviewed By: javache

Differential Revision: D45339425

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

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

X-link: facebook/react-native#37127

This prevents targets which include Yoga from using its private APIs.

Instances of this have been mostly cleaned up in the past diffs, with the major exception of RN Fabric. To stage this without blocking on that, I added a `yoga-private-api` target for now to keep using these headers while making it unlikely new usages will show up.

Reviewed By: javache

Differential Revision: D45339425

fbshipit-source-id: 5c7aaf6c4e83ffe51ad1a59313eb5b518987a28e
@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

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

X-link: facebook/react-native#37127

This prevents targets which include Yoga from using its private APIs.

Instances of this have been mostly cleaned up in the past diffs, with the major exception of RN Fabric. To stage this without blocking on that, I added a `yoga-private-api` target for now to keep using these headers while making it unlikely new usages will show up.

Reviewed By: javache

Differential Revision: D45339425

fbshipit-source-id: 9520d3b4e8d7ace9aa039379d60b58a1ae1278fc
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Apr 28, 2023
Summary:
Pull Request resolved: facebook#1269

X-link: facebook/react-native#37127

This prevents targets which include Yoga from using its private APIs.

Instances of this have been mostly cleaned up in the past diffs, with the major exception of RN Fabric. To stage this without blocking on that, I added a `yoga-private-api` target for now to keep using these headers while making it unlikely new usages will show up.

Reviewed By: javache

Differential Revision: D45339425

fbshipit-source-id: 29f1f31d15ea3f70bdca20ce5991e9f8c1fab4fe
@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

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

X-link: facebook/react-native#37127

This prevents targets which include Yoga from using its private APIs.

Instances of this have been mostly cleaned up in the past diffs, with the major exception of RN Fabric. To stage this without blocking on that, I added a `yoga-private-api` target for now to keep using these headers while making it unlikely new usages will show up.

Reviewed By: javache

Differential Revision: D45339425

fbshipit-source-id: 61d9b442a9a16a409da37c7ad6d5fa1b58922de9
@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

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

X-link: facebook/react-native#37127

This prevents targets which include Yoga from using its private APIs.

Instances of this have been mostly cleaned up in the past diffs, with the major exception of RN Fabric. To stage this without blocking on that, I added a `yoga-private-api` target for now to keep using these headers while making it unlikely new usages will show up.

Reviewed By: javache

Differential Revision: D45339425

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

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

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

X-link: facebook/react-native#37127

This prevents targets which include Yoga from using its private APIs.

Instances of this have been mostly cleaned up in the past diffs, with the major exception of RN Fabric. To stage this without blocking on that, I added a `yoga-private-api` target for now to keep using these headers while making it unlikely new usages will show up.

Reviewed By: javache

Differential Revision: D45339425

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

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

NickGerleman added a commit to NickGerleman/yoga that referenced this pull request May 2, 2023
Summary:
Pull Request resolved: facebook#1269

X-link: facebook/react-native#37127

This prevents targets which include Yoga from using its private APIs.

Instances of this have been mostly cleaned up in the past diffs, with the major exception of RN Fabric. To stage this without blocking on that, I added a `yoga-private-api` target for now to keep using these headers while making it unlikely new usages will show up.

Reviewed By: javache

Differential Revision: D45339425

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

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

NickGerleman added a commit to NickGerleman/yoga that referenced this pull request May 2, 2023
Summary:
Pull Request resolved: facebook#1269

X-link: facebook/react-native#37127

This prevents targets which include Yoga from using its private APIs.

Instances of this have been mostly cleaned up in the past diffs, with the major exception of RN Fabric. To stage this without blocking on that, I added a `yoga-private-api` target for now to keep using these headers while making it unlikely new usages will show up.

Reviewed By: javache

Differential Revision: D45339425

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

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

Summary:
Pull Request resolved: facebook#1269

X-link: facebook/react-native#37127

This prevents targets which include Yoga from using its private APIs.

Instances of this have been mostly cleaned up in the past diffs, with the major exception of RN Fabric. To stage this without blocking on that, I added a `yoga-private-api` target for now to keep using these headers while making it unlikely new usages will show up.

Reviewed By: javache

Differential Revision: D45339425

fbshipit-source-id: 9a00c89c4d6ccfa33db7064c34b5cf5d400d58fe
@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request May 3, 2023
Summary:
X-link: facebook/yoga#1269

Pull Request resolved: facebook#37127

This prevents targets which include Yoga from using its private APIs.

Instances of this have been mostly cleaned up in the past diffs, with the major exception of RN Fabric. To stage this without blocking on that, I added a `yoga-private-api` target for now to keep using these headers while making it unlikely new usages will show up.

Reviewed By: javache

Differential Revision: D45339425

fbshipit-source-id: 5b2fd84c6d1e23d32c31a1c5c59775a829b758fd
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in d8dec0f.

facebook-github-bot pushed a commit to facebook/react-native that referenced this pull request May 3, 2023
Summary:
X-link: facebook/yoga#1269

Pull Request resolved: #37127

This prevents targets which include Yoga from using its private APIs.

Instances of this have been mostly cleaned up in the past diffs, with the major exception of RN Fabric. To stage this without blocking on that, I added a `yoga-private-api` target for now to keep using these headers while making it unlikely new usages will show up.

Reviewed By: javache

Differential Revision: D45339425

fbshipit-source-id: eb7ef151ad2467d7c3370cd7c10d47e8db9496a0
facebook-github-bot pushed a commit to facebook/litho that referenced this pull request May 3, 2023
Summary:
X-link: facebook/yoga#1269

X-link: facebook/react-native#37127

This prevents targets which include Yoga from using its private APIs.

Instances of this have been mostly cleaned up in the past diffs, with the major exception of RN Fabric. To stage this without blocking on that, I added a `yoga-private-api` target for now to keep using these headers while making it unlikely new usages will show up.

Reviewed By: javache

Differential Revision: D45339425

fbshipit-source-id: eb7ef151ad2467d7c3370cd7c10d47e8db9496a0
NickGerleman added a commit to NickGerleman/litho that referenced this pull request May 4, 2023
Summary:
X-link: facebook/react-native#37242

X-link: facebook/yoga#1278

facebook/yoga#1269 broke building Yoga Buck targets with MSVC. The build logs suggest this is because headers may be double included from `exported_headers` and `headers`, causing redefinition. We are not saved on the MSVC build by `#pragma once` since headers are imported from different paths (but the Clang build seems okay with this).

This diff attempts to isolate headers so that nothing may be double exported. This is done in a little bit of a tricky way, since Starlark doesn't seem to support globs in the form of `{a,b}`, and Yoga's directory structure does not separate public and private headers cleanly (we should fix this, but it needs to be changed in multiple build systems at once which I want to do not in this change).

We also get a side effect that every file which isn't a public header needs to use the namespaced form to refer to a public header, even if in the same directory. Though this is going to be needed anyway if we end up wanting to move the public headers to a new directory.

Reviewed By: yungsters

Differential Revision: D45552325

fbshipit-source-id: 407fda6b062692c1016e157b066cac286c29ec49
NickGerleman added a commit to NickGerleman/yoga that referenced this pull request May 4, 2023
Summary:
X-link: facebook/react-native#37242

Pull Request resolved: facebook#1278

facebook#1269 broke building Yoga Buck targets with MSVC. The build logs suggest this is because headers may be double included from `exported_headers` and `headers`, causing redefinition. We are not saved on the MSVC build by `#pragma once` since headers are imported from different paths (but the Clang build seems okay with this).

This diff attempts to isolate headers so that nothing may be double exported. This is done in a little bit of a tricky way, since Starlark doesn't seem to support globs in the form of `{a,b}`, and Yoga's directory structure does not separate public and private headers cleanly (we should fix this, but it needs to be changed in multiple build systems at once which I want to do not in this change).

We also get a side effect that every file which isn't a public header needs to use the namespaced form to refer to a public header, even if in the same directory. Though this is going to be needed anyway if we end up wanting to move the public headers to a new directory.

Reviewed By: yungsters

Differential Revision: D45552325

fbshipit-source-id: f11852242c600044e4fb6da3aa7b522da248ca4b
liujinye-sys pushed a commit to open-vela/external_yoga that referenced this pull request Dec 16, 2025
Summary:
Pull Request resolved: facebook/yoga#1269

X-link: facebook/react-native#37127

This prevents targets which include Yoga from using its private APIs.

Instances of this have been mostly cleaned up in the past diffs, with the major exception of RN Fabric. To stage this without blocking on that, I added a `yoga-private-api` target for now to keep using these headers while making it unlikely new usages will show up.

Reviewed By: javache

Differential Revision: D45339425

fbshipit-source-id: eb7ef151ad2467d7c3370cd7c10d47e8db9496a0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants