Skip to content

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

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

Closed
wants to merge 1 commit into from

Conversation

NickGerleman
Copy link
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
Contributor

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

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 27, 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: 556cabcea962666b06098eb845ad414527a3fef0
@facebook-github-bot
Copy link
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
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 27, 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: 9996f0b0d02759eb6e7afd8469d2317471162378
@facebook-github-bot
Copy link
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/react-native that referenced this pull request Apr 27, 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: e2c453e903c919dd9c6875208451295edc79a656
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 28, 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: bdfbb4a3bc32bc005dbb639c5d7ab532ddd2c07a
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
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
Contributor

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

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 29, 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: 973984f8e9963a17cf9fefa5b024669ba9c6e9f7
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
Contributor

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

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 29, 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: d4f7aae4c1758b514cbc84ed4fbc1c8ed6d0e62f
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
Contributor

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

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 29, 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: 2cc38bf8644bb31c7c98b0c208a58d63997e0e77
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
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 2, 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: 918747718cacd6d2dba8970f5aaf6e2db6ec623e
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request May 2, 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: 764517903b9b8ad1f55dded6d11d8388163f339e
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
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 2, 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: 59af51541ee952c831a81e7f2a37d53f88e2c5c7
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
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 2, 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: 630791a0fec1e4842c876151e3de3d6bec7bb9b9
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: c338c44f8ac94c39ea61d3a9c210fad5a239d52a
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: 30a23813bf756281d56b6078268194ba52fd3d4a
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: a74f0b6e9bb575963c1af3d5adc513c53edc8d51
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
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
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request May 4, 2023
Summary:
Pull Request resolved: facebook#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: e35afac1ff001057715e2039473be89c7ecb0bc8
jeongshin pushed a commit to jeongshin/react-native that referenced this pull request May 7, 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: 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