You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2ff3e14
Browse filesBrowse the repository at this point in the historyBrowse files
Let the C++ API snapshot config select its visibility (#58838)
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
Copy file name to clipboardExpand all lines: scripts/cxx-api/README.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Python build pipeline for React Native's C++ (and Objective-C) API snapshots.
4
4
5
5
## Overview
6
6
7
-
`scripts/cxx-api` generates human-readable snapshots of React Native's public C++ API surface. It uses [Doxygen](https://www.doxygen.nl/) to parse C/C++/Objective-C headers and a custom Python parser to produce a simplified, sorted representation of every public symbol. Symbols declared in headers that the C++ stable API classifies as private or "for frameworks" are left out (see [Tier filtering](#tier-filtering)).
7
+
`scripts/cxx-api` generates human-readable snapshots of React Native's public C++ API surface. It uses [Doxygen](https://www.doxygen.nl/) to parse C/C++/Objective-C headers and a custom Python parser to produce a simplified, sorted representation of every public symbol. Symbols declared in headers that the C++ stable API classifies as private or "for frameworks" are left out by default (see [Tier filtering](#tier-filtering)).
8
8
9
9
The pipeline produces one `.api` snapshot file per configured **API view × variant** combination:
10
10
@@ -76,7 +76,7 @@ The Python parser (`parser/`) reads the Doxygen XML output and builds a scope tr
76
76
77
77
## Tier filtering
78
78
79
-
A private or for-frameworksheader is skipped unless a public header reaches it, directly or through other includes: anything a public header includes is public in practice, whatever its own guard says. Unclassified headers are never skipped.
79
+
Each view includes the tiers listed in its `visibility` config (`public`, `frameworks`, `private`), only `public` by default. A header in any other tier is skipped unless a header in an included tier reaches it, directly or through other includes: anything a public header includes is public in practice, whatever its own guard says. Unclassified headers are never skipped.
80
80
81
81
A boundary break is a public header that reaches a for-frameworks or private header, or a for-frameworks header that reaches a private one. `--log-boundary-breaks` reports them at the edge where visibility drops.
82
82
@@ -102,8 +102,9 @@ All API views and their variants are defined in `config.yml`. Each view specifie
102
102
|`codegen`| Optional codegen platform (`android`, `ios`) to generate TurboModule/Component headers before scanning |
103
103
|`exclude_symbols`| Regex patterns for symbols to skip |
104
104
|`input_filter`| Whether to run Doxygen through the input filters in `parser/input_filters/`|
105
+
|`visibility`| C++ stable API tiers to include (`public`, `frameworks`, `private`); defaults to `[public]`. See [Tier filtering](#tier-filtering)|
105
106
106
-
`exclude_patterns` and `exclude_symbols` can also be set at the top level, in which case they apply to every view.
107
+
`exclude_patterns` and `exclude_symbols` can also be set at the top level, in which case they apply to every view. A top-level `visibility` applies to every view that does not set its own.
0 commit comments