Skip to content

Let the C++ API snapshot config select its visibility (#58838) - #58838

Open
j-piasecki wants to merge 4 commits into
react:mainfrom
j-piasecki:export-D123001791
Open

j-piasecki wants to merge 4 commits into
react:mainfrom
j-piasecki:export-D123001791

Conversation

@j-piasecki

@j-piasecki j-piasecki commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

Adds a visibility option to the C++ API snapshot config.yml, listing which C++ stable API tiers (public, frameworks, private) a view includes. It can be set per view or at the top level, where it applies to views that do not set their own. When omitted it defaults to public, so existing snapshots are unchanged.

Headers in tiers outside the selection are skipped unless a header in an included tier reaches them. Unclassified headers are still kept.

Changelog: [Internal]

Differential Revision: D123001791

@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 D123001791.

@meta-codesync meta-codesync Bot changed the title Let the C++ API snapshot config select its visibility Let the C++ API snapshot config select its visibility (#58838) Oct 7, 2026
j-piasecki added a commit to j-piasecki/react-native that referenced this pull request Oct 7, 2026
Summary:

Adds a `visibility` option to the C++ API snapshot `config.yml`, listing which C++ stable API tiers (`public`, `frameworks`, `private`) a view includes. It can be set per view or at the top level, where it applies to views that do not set their own. When omitted it defaults to `public`, so existing snapshots are unchanged.

Headers in tiers outside the selection are skipped unless a header in an included tier reaches them. Unclassified headers are still kept.

Changelog: [Internal]

Differential Revision: D123001791
j-piasecki added a commit to j-piasecki/react-native that referenced this pull request Oct 7, 2026
Summary:
Pull Request resolved: react#58838

Adds a `visibility` option to the C++ API snapshot `config.yml`, listing which C++ stable API tiers (`public`, `frameworks`, `private`) a view includes. It can be set per view or at the top level, where it applies to views that do not set their own. When omitted it defaults to `public`, so existing snapshots are unchanged.

Headers in tiers outside the selection are skipped unless a header in an included tier reaches them. Unclassified headers are still kept.

Changelog: [Internal]

Differential Revision: D123001791
j-piasecki added a commit to j-piasecki/react-native that referenced this pull request Oct 7, 2026
Summary:
Pull Request resolved: react#58838

Adds a `visibility` option to the C++ API snapshot `config.yml`, listing which C++ stable API tiers (`public`, `frameworks`, `private`) a view includes. It can be set per view or at the top level, where it applies to views that do not set their own. When omitted it defaults to `public`, so existing snapshots are unchanged.

Headers in tiers outside the selection are skipped unless a header in an included tier reaches them. Unclassified headers are still kept.

Changelog: [Internal]

Differential Revision: D123001791
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
…act#58837)

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]

Reviewed By: coado

Differential Revision: D123001770
Summary:

Adds a `visibility` option to the C++ API snapshot `config.yml`, listing which C++ stable API tiers (`public`, `frameworks`, `private`) a view includes. It can be set per view or at the top level, where it applies to views that do not set their own. When omitted it defaults to `public`, so existing snapshots are unchanged.

Headers in tiers outside the selection are skipped unless a header in an included tier reaches them. Unclassified headers are still kept.

Changelog: [Internal]

Differential Revision: D123001791

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