Skip to content

Commit 5976cff

Browse files
j-piaseckimeta-codesync[bot]
authored andcommitted
Apply doxygen input filters only when needed (#56177)
Summary: Pull Request resolved: #56177 Changelog: [Internal] Makes doxygen input filers opt-in via the config file. Those are only needed for objective c files, so there's no need to run them for ReactCommon or ReactAndroid. Reviewed By: cortinico Differential Revision: D97489420 fbshipit-source-id: 0503801de60d6c2ae58506f20fcc06feec0501ec
1 parent bf7cb89 commit 5976cff

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

scripts/cxx-api/config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ReactCommon:
1010
- "*/platform/macos/*"
1111
- "*/platform/ios/*"
1212
- "*/platform/android/*"
13+
input_filter: false
1314
definitions:
1415
variants:
1516
debug:
@@ -33,6 +34,7 @@ ReactAndroid:
3334
- "*/platform/windows/*"
3435
- "*/platform/macos/*"
3536
- "*/platform/ios/*"
37+
input_filter: false
3638
definitions:
3739
RN_SERIALIZABLE_STATE: 1
3840
ANDROID: 1
@@ -66,6 +68,7 @@ ReactApple:
6668
- "*+Internal.h"
6769
- "*/scripts/*"
6870
- "*/templates/*"
71+
input_filter: true
6972
definitions:
7073
__cplusplus: 1
7174
variants:

scripts/cxx-api/parser/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def build_snapshots(
139139
output_dir=output_dir,
140140
codegen_platform=config.codegen_platform,
141141
verbose=verbose,
142-
input_filter=input_filter,
142+
input_filter=input_filter if config.input_filter else None,
143143
)
144144
else:
145145
snapshot = build_snapshot_for_view(

scripts/cxx-api/parser/config.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class ApiViewSnapshotConfig:
3737
exclude_patterns: list[str]
3838
definitions: dict[str, str | int]
3939
codegen_platform: str | None = None
40+
input_filter: bool = False
4041

4142

4243
def parse_config(
@@ -65,6 +66,7 @@ def parse_config(
6566
codegen_config = view_config.get("codegen") or {}
6667
codegen_platform = codegen_config.get("platform")
6768
exclude_patterns = view_config.get("exclude_patterns") or []
69+
input_filter = view_config.get("input_filter", False)
6870
base_definitions = view_config.get("definitions") or {}
6971

7072
raw_variants = view_config.get("variants") or {}
@@ -84,6 +86,7 @@ def parse_config(
8486
exclude_patterns=exclude_patterns,
8587
definitions=base_definitions,
8688
codegen_platform=codegen_platform,
89+
input_filter=input_filter,
8790
)
8891
)
8992
else:
@@ -97,6 +100,7 @@ def parse_config(
97100
exclude_patterns=exclude_patterns,
98101
definitions=merged_definitions,
99102
codegen_platform=codegen_platform,
103+
input_filter=input_filter,
100104
)
101105
)
102106

0 commit comments

Comments
 (0)