Skip to content

Add guards for react/renderer/components/view (#57357) (#57357) (#57357) - #57357

Open
coado wants to merge 3 commits into
react:mainfrom
coado:export-D109847184
Open

Add guards for react/renderer/components/view (#57357) (#57357) (#57357)#57357
coado wants to merge 3 commits into
react:mainfrom
coado:export-D109847184

Conversation

@coado

@coado coado commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary:
Roll umbrella with umbrella guards for headers under react/renderer/components/view subtree. Initially, we assume that the entire target is public, so each header within includes a public umbrella guard.

Changelog:
[Internal]

Pulled By:
coado

coado

Reviewed By: cipolleschi

Differential Revision: D109847184

@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 Jun 29, 2026
@facebook-github-tools facebook-github-tools Bot added p: Software Mansion Partner: Software Mansion Partner p: Facebook Partner: Facebook labels Jun 29, 2026
@meta-codesync

meta-codesync Bot commented Jun 29, 2026

Copy link
Copy Markdown

@coado has exported this pull request. If you are a Meta employee, you can view the originating Diff in D109847184.

coado added a commit to coado/react-native that referenced this pull request Jun 29, 2026
Summary:
Pull Request resolved: react#57357

Roll umbrella with umbrella guards for headers under `react/renderer/components/view` subtree. Initially, we assume that the entire target is public, so each header within includes a public umbrella guard.

Changelog:
[Internal]

Differential Revision: D109847184
@coado
coado force-pushed the export-D109847184 branch from fe00d62 to 4f9826c Compare June 29, 2026 10:54
@meta-codesync meta-codesync Bot changed the title Add guards for react/renderer/components/view Add guards for react/renderer/components/view (#57357) Jun 29, 2026
@coado
coado force-pushed the export-D109847184 branch from 4f9826c to fb72d26 Compare June 29, 2026 13:48
coado added a commit to coado/react-native that referenced this pull request Jun 29, 2026
Summary:
Pull Request resolved: react#57357

Roll umbrella with umbrella guards for headers under `react/renderer/components/view` subtree. Initially, we assume that the entire target is public, so each header within includes a public umbrella guard.

Changelog:
[Internal]

Differential Revision: D109847184
coado added a commit to coado/react-native that referenced this pull request Jun 29, 2026
Summary:
Pull Request resolved: react#57357

Roll umbrella with umbrella guards for headers under `react/renderer/components/view` subtree. Initially, we assume that the entire target is public, so each header within includes a public umbrella guard.

Changelog:
[Internal]

Differential Revision: D109847184
@coado
coado force-pushed the export-D109847184 branch from fb72d26 to 95f69ef Compare June 29, 2026 13:57
coado added a commit to coado/react-native that referenced this pull request Aug 7, 2026
Summary:
Pull Request resolved: react#57357

Roll umbrella with umbrella guards for headers under `react/renderer/components/view` subtree. Initially, we assume that the entire target is public, so each header within includes a public umbrella guard.

Changelog:
[Internal]

Differential Revision: D109847184
@coado
coado force-pushed the export-D109847184 branch 2 times, most recently from 7db213d to 9353807 Compare August 10, 2026 10:38
coado added a commit to coado/react-native that referenced this pull request Aug 10, 2026
Summary:
Pull Request resolved: react#57357

Roll umbrella with umbrella guards for headers under `react/renderer/components/view` subtree. Initially, we assume that the entire target is public, so each header within includes a public umbrella guard.

Changelog:
[Internal]

Differential Revision: D109847184
coado added a commit to coado/react-native that referenced this pull request Aug 11, 2026
Summary:
Pull Request resolved: react#57357

Roll umbrella with umbrella guards for headers under `react/renderer/components/view` subtree. Initially, we assume that the entire target is public, so each header within includes a public umbrella guard.

Changelog:
[Internal]

Differential Revision: D109847184
@coado
coado force-pushed the export-D109847184 branch from 9353807 to dd63424 Compare August 11, 2026 12:02
coado added a commit to coado/react-native that referenced this pull request Aug 11, 2026
Summary:
Pull Request resolved: react#57357

Roll umbrella with umbrella guards for headers under `react/renderer/components/view` subtree. Initially, we assume that the entire target is public, so each header within includes a public umbrella guard.

Changelog:
[Internal]

Differential Revision: D109847184
@coado
coado force-pushed the export-D109847184 branch from dd63424 to 4098227 Compare August 11, 2026 12:07
@meta-codesync

meta-codesync Bot commented Aug 11, 2026

Copy link
Copy Markdown

@coado has imported this pull request. If you are a Meta employee, you can view this in D109847184.

@meta-codesync meta-codesync Bot changed the title Add guards for react/renderer/components/view (#57357) Add guards for react/renderer/components/view (#57357) (#57357) Aug 12, 2026
@coado
coado force-pushed the export-D109847184 branch from 68a4ab7 to b7ed0e1 Compare August 12, 2026 12:24
coado added a commit to coado/react-native that referenced this pull request Aug 12, 2026
)

Summary:
Roll umbrella with umbrella guards for headers under `react/renderer/components/view` subtree. Initially, we assume that the entire target is public, so each header within includes a public umbrella guard.

Changelog:
[Internal]

Pull Request resolved: react#57357

Differential Revision: D109847184

Pulled By: coado
…rgets (react#57861)

Summary:
Pull Request resolved: react#57861

React Native's public C++ headers are gaining guards from `react/cxxstableapi`, which
turn a direct include of a fine-grained header into an error for consumers that opt into
the strict API by defining `RN_STRICT_API`. React Native's own sources keep including
those headers directly, so they are exempted via `RN_BUILDING`.

Unlike CocoaPods, these three build systems each have a single chokepoint:

- CMake: one `add_compile_definitions(RN_BUILDING)` in the ReactAndroid JNI project,
  a directory property inherited by every `add_react_common_subdir` below it. It is
  declared *after* the third-party NDK subdirectories so glog/boost/folly/fmt never see
  it, and this project never compiles app or third-party module code.
- SwiftPM: one `.define` in the shared `Target.reactNativeTarget` factory that every
  React Native target is created through. `cxxSettings` are per-target and are not
  inherited by packages that depend on React.
- Buck: a `_set_rn_building_flag` helper called from the four macros React Native's own
  targets use. It is `preprocessor_flags`, deliberately
  not `exported_preprocessor_flags`, so dependents are not exempted either.

This change is inert on its own: nothing behaves differently unless a consumer defines
`RN_STRICT_API`.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D115051088
coado added a commit to coado/react-native that referenced this pull request Aug 13, 2026
) (react#57357)

Summary:
Roll umbrella with umbrella guards for headers under `react/renderer/components/view` subtree. Initially, we assume that the entire target is public, so each header within includes a public umbrella guard.

Changelog:
[Internal]

Pulled By:
coado

Pull Request resolved: react#57357

coado

Reviewed By: cipolleschi

Differential Revision: D109847184
@meta-codesync meta-codesync Bot changed the title Add guards for react/renderer/components/view (#57357) (#57357) Add guards for react/renderer/components/view (#57357) (#57357) (#57357) Aug 13, 2026
@coado
coado force-pushed the export-D109847184 branch from 435e9e1 to 34af97e Compare August 13, 2026 10:00
Summary:
`react/cxxstableapi` is a header-only module — the stable API guards are pure
preprocessor headers with no compilable source. Under `use_frameworks!`,
CocoaPods emits a `PBXAggregateTarget` for a pod with no compilable sources, and
an aggregate target produces no `.framework`, so pods depending on
`React-cxxstableapi` cannot resolve the guard headers.

Add an anchor translation unit so the pod has one source and CocoaPods emits a
real framework target instead, and widen the podspec's build-from-source glob to
pick it up. The prebuilt glob stays headers-only, since prebuilt pods do not
generate frameworks. This mirrors the existing `CSSDummy.cpp` anchor for the
header-only `React-renderercss` pod.

Also register `react/cxxstableapi` as a subdirectory of the Fantom tester CMake
build so the guard headers resolve there.

Changelog: [Internal]

Differential Revision: D115859623
coado added a commit to coado/react-native that referenced this pull request Aug 13, 2026
) (react#57357)

Summary:
Roll umbrella with umbrella guards for headers under `react/renderer/components/view` subtree. Initially, we assume that the entire target is public, so each header within includes a public umbrella guard.

Changelog:
[Internal]

Pulled By:
coado

Pull Request resolved: react#57357

coado

Reviewed By: cipolleschi

Differential Revision: D109847184
@coado
coado force-pushed the export-D109847184 branch from 34af97e to f0f1265 Compare August 13, 2026 10:59
) (react#57357)

Summary:
Roll umbrella with umbrella guards for headers under `react/renderer/components/view` subtree. Initially, we assume that the entire target is public, so each header within includes a public umbrella guard.

Changelog:
[Internal]

Pulled By:
coado

Pull Request resolved: react#57357

coado

Reviewed By: cipolleschi

Differential Revision: D109847184
@coado
coado force-pushed the export-D109847184 branch from f0f1265 to 6b102b2 Compare August 13, 2026 12:33
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. meta-exported p: Facebook Partner: Facebook p: Software Mansion Partner: Software Mansion Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant