Skip to content

Leave private and frameworks headers out of the C++ API snapshots - #58837

Open
j-piasecki wants to merge 3 commits into
react:mainfrom
j-piasecki:export-D123001770
Open

j-piasecki wants to merge 3 commits into
react:mainfrom
j-piasecki:export-D123001770

Conversation

@j-piasecki

Copy link
Copy Markdown
Contributor

Summary:
The C++ API snapshots now cover only the public tier of the C++ stable API. Symbols declared in headers that include PrivateGuard.h or FrameworksGuard.h are left out, unless a public header reaches them directly or transitively, in which case they are public in practice. Unclassified headers are kept. In verbose mode the generator reports how many private or frameworks headers are kept that way.

The snapshots are regenerated, and the README and snapshot docs describe the filtering.

Changelog: [Internal]

Differential Revision: D123001770

Summary:

Classifies `JavaModuleWrapper.h`, `JavaScriptExecutorHolder.h`, `JniJSModulesUnbundle.h`, `MethodInvoker.h` and `ModuleRegistryBuilder.h` from the `reactnativejni` target as "private" under the three-tier C++ stable API visibility model. They exist only to wire the legacy bridge and expose private `cxxreact` types. Consumers that opt into `RN_STRICT_API` now get an error if they include them directly; without that flag the guards are inert, so no existing build changes behaviour.

The remaining headers of `reactnativejni` are not classified yet.

Changelog: [Internal]

Differential Revision: D122764164
Summary:
Adds a header tier classifier to the C++ API snapshot generator. A header's tier comes from the stable API guard it includes; headers without one are unclassified. With the new `--log-boundary-breaks` flag, the generator logs every public header that reaches a frameworks or private header, and every frameworks header that reaches a private one, with the include chain. Snapshot output is unchanged.

Changelog: [Internal]

Differential Revision: D123001749
Summary:
The C++ API snapshots now cover only the public tier of the C++ stable API. Symbols declared in headers that include `PrivateGuard.h` or `FrameworksGuard.h` are left out, unless a public header reaches them directly or transitively, in which case they are public in practice. Unclassified headers are kept. In verbose mode the generator reports how many private or frameworks headers are kept that way.

The snapshots are regenerated, and the README and snapshot docs describe the filtering.

Changelog: [Internal]

Differential Revision: D123001770
@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 Oct 5, 2026
@facebook-github-tools facebook-github-tools Bot added p: Software Mansion Partner: Software Mansion Partner p: Facebook Partner: Facebook labels Oct 5, 2026
@meta-codesync

meta-codesync Bot commented Oct 5, 2026

Copy link
Copy Markdown

@j-piasecki has exported this pull request. If you are a Meta employee, you can view the originating Diff in D123001770.

This branch has not been deployed

No deployments
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