1610 Commits
Author SHA1 Message Date
Jakub Piasecki 32f1dcd804 Generate snapshots in parallel (#56184)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56184

Changelog: [Internal]

Updates the snapshot generator script to run generation steps for all snapshots in parallel instead of in sequence, significantly improving the generation time.

Reviewed By: cortinico

Differential Revision: D97714334

fbshipit-source-id: b643dd7bb2fa4f3f9db1495bc7a44c0069a25274
2026-03-24 02:34:59 -07:00
Jakub Piasecki 5976cff039 Apply doxygen input filters only when needed (#56177)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/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
2026-03-22 23:56:16 -07:00
LeoTM faeef2b90a Bump fmt to 12.1.0 to fix xcode 26.4 (#56099)
Summary:
Follow-up to
- https://github.com/facebook/react-native/pull/47033
- https://github.com/facebook/react-native/pull/50431

TODO
- [x] bump packages/react-native/third-party-podspecs/fmt.podspec
- [x] bump scripts/releases/ios-prebuild/configuration.js
- [x] packages/react-native/third-party-podspecs/RCT-Folly.podspec
- [x] packages/react-native/gradle/libs.versions.toml
- [x] packages/rn-tester/Podfile.lock
  - rn-rester (main) ios not building on Xcode 26.3, CI currently only supports Xcode 16
  - i cannot downgrade macos26.4b4 locally to macos15 to install Xcode16.4 and bump pods this way
  - so on Xcode 26.3 i've attempted to bump only fmt minimally, ignoring remaining RN 0.86 hashes

Ref: https://github.com/search?q=repo%3Afacebook%2Freact-native+%2211.0.2%22&type=code

however unable to test rn-tester, ios doesn't seem to build on Xcode 26.3 let alone 26.4b
not tested previous versions of Xcode
not tested prior branches/tags to main

rn-tester CI is passing on old macos-15 Xcode 16.4.0 only, ideally this should be extended to stable macos lts and Xcode 26.3 stable first

separate follow-ups to this minimal fmt bump
- bump CI macos-15 xcode 16.1-4 to macos-26 xcode 26.0-3
- bump rn-tester Podfile.lock from RN 0.82 to 0.86 main (aka nightly)
- bump folly to 2025.11.03.00
- bump folly to 2026.03.09.00

Resolve: https://github.com/facebook/react-native/issues/55601

## Changelog:

[General][Changed] Bump fmt to 12.1.0 to fix Xcode 26.4

Pull Request resolved: https://github.com/facebook/react-native/pull/56099

Test Plan: RNTester

Reviewed By: alanleedev

Differential Revision: D97358194

Pulled By: cipolleschi

fbshipit-source-id: 3eb578a99a310e3eb77433692bf35502d0d78d24
2026-03-19 16:54:50 -07:00
Dawid Małecki 25ef8444ef Add documentation for Cxx API snapshot generation (#56146)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56146

Adds documentation for the cxx-api snapshot generation pipeline, covering usage commands for generating and checking snapshots, and configuration.

It answers:
1. What the script does.
2. What the output looks like.
3. How to use it (generate, check).
4. How it works (Doxygen → parser → .api files).
5. How it can be configured (config.yml).
6. What to do when snapshots differ.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D96316004

fbshipit-source-id: b527606b87efb2af72680b572135a5fc595ab85e
2026-03-19 05:19:51 -07:00
Dawid Małecki 0b1ce70b62 Prevent identifiers being qualified to themselves (#56091)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56091

Changelog: [Internal]

When qualifying a member, prevent taking itself as a target for qualification, to prevent types referencing themselves.

Reviewed By: cipolleschi

Differential Revision: D96455842

fbshipit-source-id: 2ed59a4688d0daa98db603a734283f41ffbe4ead
2026-03-18 09:29:02 -07:00
Dawid Małecki 91c6c4d4ae Use dictionary for calling input filters (#56089)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56089

Changelog: [Internal]

Replaces chained input filter calls with an iteration over a dict.

Reviewed By: cipolleschi

Differential Revision: D96455826

fbshipit-source-id: bdaf44285db6d3432a6401d6118f245abfa7dafb
2026-03-18 09:29:02 -07:00
Dawid Małecki 4aacd3f2be Change doxygen template decoding to use a dictionary (#56087)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56087

Changelog: [Internal]

Replaces the chain of `replace` calls with a dict containing relevant mappings.

Reviewed By: cipolleschi

Differential Revision: D96455803

fbshipit-source-id: adaf8bcd84ae091841797af243e90dec664be09f
2026-03-18 09:29:02 -07:00
Dawid Małecki d596a3d2f3 Deduplicate code in member classes (#56086)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56086

Changelog: [Internal]

Deduplicates specialization_args, qualified names and function pointer check in the member classes.

Reviewed By: cipolleschi

Differential Revision: D96455789

fbshipit-source-id: 835b73406d4469808b3d7fec7601394f7e42313b
2026-03-18 09:29:02 -07:00
Dawid Małecki f0b51fc6bf Add ParsedSectionKind dataclass not to rely on strings directly (#56088)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56088

Changelog: [Internal]

Adds `ParsedSectionKind` which encapsulates logic related to parsing the section kind string.

Reviewed By: cipolleschi

Differential Revision: D96455765

fbshipit-source-id: 6d4866112511f24f5781e014eb720b96c3cfaf0d
2026-03-18 09:29:02 -07:00
Dawid Małecki 20cf9bca83 Move scope string generation logic to the base class (#56085)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56085

Changelog: [Internal]

Moves the logic responsible for generating a string view of the scope's body to the base class to reduce duplication.

Similarly, moves the logic responsible for qualifying template arguments to the `Extensible` class.

Reviewed By: cipolleschi

Differential Revision: D96455746

fbshipit-source-id: 1d800c7992080e02831f61fee4aaa9cb31f8fc9a
2026-03-18 09:29:02 -07:00
Dawid Małecki 3a14967f81 Refactor doxygen xml parser (#56084)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56084

Changelog: [Internal]

Replaces a wall of if-else statements with a map (compound_type -> parser method).

Reviewed By: cipolleschi

Differential Revision: D96455723

fbshipit-source-id: bd44c02a4a8d08bf9abf463bacdfa0f77615dcff
2026-03-18 09:29:02 -07:00
Dawid Małecki b3032d866c Refactor snapshot generator entry point (#56090)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56090

Changelog: [Internal]

Refactors the `__main__.py` file of the snapshot generator:
- moves doxygen related logic to a separate file
- unifies snapshot generation branches
- reduces duplication

Reviewed By: cipolleschi

Differential Revision: D96455701

fbshipit-source-id: 7306fd2612bb401cd4ff02688ccaf38ecc71f239
2026-03-18 09:29:02 -07:00
Dawid Małecki 59660bc0e1 Replace subprocess rm calls with Python stdlib (#56083)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56083

Changelog: [Internal]

Removes direct calls to `rm` in the snapshot generator

Reviewed By: cipolleschi

Differential Revision: D96455685

fbshipit-source-id: e53dd3607b8cbb7566903c29af303377276b1ec5
2026-03-18 09:29:02 -07:00
Dawid Małecki 78a7718d6c Extract member specializations from name (#56076)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56076

Changelog: [Internal]

Updates the C++ API snapshot generator to extract specializations from name when a member is created, instead of relying on the one stored in the name string.

It also makes out-of-class definitions of members to be skipped in the snapshot as those were essentially duplicated between their declaration inside the class, and the initialization outside of it.

Reviewed By: cipolleschi

Differential Revision: D96303740

fbshipit-source-id: d649cb04bd7370af55ce707d607a372d7b4115b4
2026-03-18 09:29:02 -07:00
Dawid Małecki 140509f7d4 Extract class specializations from name (#56075)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56075

Changelog: [Internal]

Updates the parser to extract the template specializations from name string in order to avoid repeated operations on the name string.

Reviewed By: cipolleschi

Differential Revision: D96303732

fbshipit-source-id: 08ff8ba34522426adccd53129590c5a7d59e0438
2026-03-18 09:29:02 -07:00
Dawid Małecki 4391a5f4b0 Move inheritance logic to a separate class (#56074)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56074

Changelog: [Internal]

Extracts the duplicated handling of inheritance and base classes to a separate, reusable class.

Reviewed By: cipolleschi

Differential Revision: D96287394

fbshipit-source-id: 6075b5dafb754167b6f78abbaee60c1243c99bb5
2026-03-18 09:29:02 -07:00
Dawid Małecki 62ce98db99 Split scope definitions into smaller files (#56073)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56073

Changelog: [Internal]

Splits `scope.py` into multiple smaller files, each containing a separate defitnition.

Reviewed By: cipolleschi

Differential Revision: D96284004

fbshipit-source-id: f99275cc9b5f8844f9a14f9d6207ae988aa9ccd7
2026-03-18 09:29:02 -07:00
Dawid Małecki 756203cb27 Split member definitions into smaller files (#56072)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56072

Changelog: [Internal]

Splits `member.py` into multiple smaller files, each containing single member definition.

Reviewed By: cipolleschi

Differential Revision: D96282653

fbshipit-source-id: 25956dccaf266bf2be5b216ba554991f1bb221b8
2026-03-18 09:29:02 -07:00
Dawid Małecki e6f0724c4e Add option to generate a single snapshot view from CLI (#56071)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56071

Changelog: [Internal]

Adds `--view` argument to the snapshot generator, which allows to generate a single snapshot view instead of all of them.

Reviewed By: cipolleschi

Differential Revision: D96280524

fbshipit-source-id: 6ebf3689e7b0256ba54c3d5a8e1dd602b044ec02
2026-03-18 09:29:02 -07:00
Dawid Małecki 248d38e5c1 Fix qualification of enum values in template specialization args (#56070)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56070

Changelog: [Internal]

Fixes qualification of unscoped enum values used as template specialization arguments.

Reviewed By: cipolleschi

Differential Revision: D96279462

fbshipit-source-id: d151b069124b352451964a31da0385744d21013f
2026-03-18 09:29:02 -07:00
Dawid Małecki d0ec2956f8 Fix handling of member function pointers in the API snapshot (#56069)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56069

Changelog: [Internal]

Fixes handling of member function pointers in the C++ Api snapshot.

Reviewed By: cipolleschi

Differential Revision: D96279461

fbshipit-source-id: 42e7b004878eedfbbb8504345165bb1d60acde78
2026-03-18 09:29:02 -07:00
Dawid Małecki 882dbe0118 Handle template variables in the API snapshot (#56068)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56068

Changelog: [Internal]

Adds support for templates in variable declaration to the c++ API snapshot generator

Reviewed By: cipolleschi

Differential Revision: D96279463

fbshipit-source-id: eb68f97f926e4a407d6c7fa2dda6edf7e43e23ba
2026-03-18 09:29:02 -07:00
Dawid Małecki c625015c6f Include packages/react-native/Libraries path in ReactApple snapshot (#56060)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56060

There are Objective-C files located in the `packages/react-native/Libraries` paths. This diff modifies the config to tell doxygen to parse them and fixes problem with parsing interfaces and protocols that share the same name.

Changelog:
[Internal]

Reviewed By: cipolleschi

Differential Revision: D96141632

fbshipit-source-id: 76c5873574108eb0f610637ce2bd2eeb54b8537c
2026-03-12 03:16:36 -07:00
Jakub Piasecki 150377caf0 Move input_filters inside the parser package (#56054)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56054

Changelog: [Internal]

Moves `input_filers` inside the `parser` package. Imports outside of the package were causing errors when running the snapshot generator in OSS.

Reviewed By: cipolleschi

Differential Revision: D96109755

fbshipit-source-id: c29d70c895057fd51a92c1a073b331d27c0b289b
2026-03-11 23:58:46 -07:00
Jakub Piasecki 4e1a8777ba Requalify incorrect references produced by doxygen (#56058)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56058

Changelog: [Internal]

Doxygen may incorrectly resolve reference to a friend declaration or inherited constructor instead of the actual friend or the base class.

This diff updates the qualification algorithm to try to requalify cases like these.

Reviewed By: cipolleschi

Differential Revision: D96129278

fbshipit-source-id: fba4c78c74d43870a2a14f5eedce061ba6f2793d
2026-03-11 23:51:12 -07:00
Jakub Piasecki f1ac82ca93 Don't include private compound objects in the snapshot (#56028)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56028

Changelog: [Internal]

Updates the snapshot generator to ignore compound objects with visibility set to `private`.

Reviewed By: cortinico

Differential Revision: D95913606

fbshipit-source-id: 3c5b2e0bf46e16627c3f6bdf6cd700a862f56698
2026-03-11 01:42:26 -07:00
Jakub Piasecki a5daece0b3 Add reverse mapping for default values in base class specialization (#56032)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56032

Changelog: [Internal]

When generating xml output, doxygen replaces template arguments in specialized base classes with the default values:

```
template <typename T = int>
class Test : public Base<T> {};
```

becomes

```
template <typename T = int>
class Test : public Base<int> {};
```

To work around this issue, this diff adds reverse mapping for template params in the base classes. In the above case, the map would be: `{ "int" -> "T" }`, and `int` in `Base<int>` would be replaced with T.

This approach assumes that none of the default values are used directly in the base class specialization, which holds for the React Native codebase.

Reviewed By: cortinico

Differential Revision: D95933835

fbshipit-source-id: c1dd79a09f0f368fb106330409e15d54ebad2b4f
2026-03-11 01:40:36 -07:00
Jakub Piasecki 7425a5f9c6 Fix ordering of const and mutable keywords (#56027)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56027

Changelog: [Internal]

The current implementation swaps the ordering of `const` and `mutable` keywords. This diff fixes it.

Reviewed By: cortinico

Differential Revision: D95912404

fbshipit-source-id: 6f726f0793b129fdd85b34b4c92dd22cf11bfb41
2026-03-11 00:18:57 -07:00
Jakub Piasecki 94f40e7591 Strip leading :: for globally qualified identifiers (#56033)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56033

Changelog: [Internal]

Currently, if the source code uses globally qualified identifiers, those will be kept in the snapshot without changes. Since in the output, everything is fully qualified, the leading `::` can be stripped from those.

Reviewed By: cortinico

Differential Revision: D95947334

fbshipit-source-id: 9592b00bd896679dda90ed56d32024b22752d2b7
2026-03-11 00:17:04 -07:00
Jakub Piasecki 7f6790bf79 Inline private type aliases in the API snapshot (#56030)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56030

Changelog: [Internal]

Currently, the parser ignores all private sections, which causes private type aliases definitions not to be present in the snapshot. The refereces to those types can still appear in the public API, if they are resolvable to public types.

This diff updates the parser to track private type definitions, and inline them when referenced from the public API.

Reviewed By: cortinico

Differential Revision: D95920125

fbshipit-source-id: 054786987c266ac1062c0fa3ba1631cb179fb6ef
2026-03-11 00:14:41 -07:00
Dawid Małecki 3612f53735 Exclude Internal and Private categories (#56035)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56035

Excludes files with `*+Internal.h` and `*+Private.h` categories from the public API `ReactApple` snapshot.

Changelog:
[Internal]

Reviewed By: cipolleschi

Differential Revision: D95953096

fbshipit-source-id: f23aec53631263013a4099e0c443a8c0c15e9589
2026-03-10 09:17:30 -07:00
Jakub Piasecki 4fcd2f9f6d Run codegen for each API view separately (#55997)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55997

Changelog: [Internal]

Updates the C++ API snapshot generator to invoke codegen automatically for each created API view, generating for the specific platform that's being considered.

Reviewed By: cipolleschi

Differential Revision: D95788766

fbshipit-source-id: 8b376542f7822b73e44399c2615c327332378830
2026-03-10 09:09:06 -07:00
Jakub Piasecki 7d80d6e5a1 Use the derived class name in inherited constructors in the API snapshot (#56031)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56031

Changelog: [Internal]

Doxygen uses base class name for inherited constructors. This diff adds a guard to replace them with the derived class name in the final API snapshot.

Reviewed By: cipolleschi

Differential Revision: D95939080

fbshipit-source-id: 918135b8c5c603423e3a13537d9723e54ed4f035
2026-03-10 06:53:06 -07:00
Dawid Małecki 2be2770fc8 Fix issue with parsing lightweight objective-c generics (#55979)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55979

Fixes issue with parsing lightweight objective-c generics. Doxygen produces malformed xml output due to incorrect handling of interfaces such as:

```obj-c
interface Foo<T> : NSObject
end
```

The solution is to encode the interface into the form of `interface Foo__GENERICS_T_ENDGENERICS`, then produce the snapshot and finally decode it back to `interface Foo<T>`.

Changelog:
[Internal]

Reviewed By: cipolleschi

Differential Revision: D95567196

fbshipit-source-id: c8ae97f99e893ecd48ded21f24a650286d708c60
2026-03-10 04:50:31 -07:00
Andrew Datsenko 37b6c089cb Split Fantom workflow into separate build and test jobs (#54729)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54729

Changelog: [Internal]

- Created new build-fantom-runner action to compile the Fantom runner binary
- Modified run-fantom-tests action to download and use pre-built binary
- Updated test-all.yml workflow to run build and test as separate jobs
- Removed build dependencies and ccache configuration from test job

Reviewed By: cortinico

Differential Revision: D88012198

fbshipit-source-id: cd1c91b18cccc3c62b9edbcbeb131e80551369f1
2026-03-09 23:21:17 -07:00
Jakub Piasecki 41a1941961 Remove incorrect qualification from function parameters (#55971)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55971

Changelog: [Internal]

Doxygen incorrectly transforms parameter names to references if they match a member. This diff strips the resulting invalid qualification from the type.

Reviewed By: cipolleschi

Differential Revision: D95548542

fbshipit-source-id: c1e475f10e07af6a4076336cab0d3cbe0da342e5
2026-03-08 23:52:42 -07:00
Dawid Małecki d83bf7394b Add input filter for stripping methods marked as NS_UNAVAILABLE (#55973)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55973

Adds input filter for stripping methods marked as `NS_UNAVAILABLE` which shouldn't be part of the public API.

Changelog:
[Internal]

Reviewed By: cipolleschi

Differential Revision: D95552298

fbshipit-source-id: 2e5b33f047bfda259733b92b187ce86d9967cf93
2026-03-06 10:15:51 -08:00
Dawid Małecki 0686cde779 Strip __deprecated_msg in the preprocessing (#55970)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55970

Strips `__deprecated_msg` annotations due to incorrect parsing when in front of the interfaces (predefining does not help unfortunately). It doesn't fully solve the issue stated in the added test as doxygen also has problem with parsing interfaces for which the base class is in the new line.

```
interface Foo
           : Bar<NSObject>
end
```

This will be handled by the fix in the doxygen.

This diff also adds stripping the `__deprecated` label which is again incorrectly parsed by doxygen.

Changelog:
[Internal]

Reviewed By: cipolleschi

Differential Revision: D95541064

fbshipit-source-id: 08aca2eb5ed8b1897166d385ab513879e7ecbad7
2026-03-06 08:09:48 -08:00
Jakub Piasecki c0f2f63ce1 Qualify identifiers in template specializations (#55929)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55929

Changelog: [Internal]

Adds support for identifier qualification when using template specializations and when inheriting from template objects.

Reviewed By: cortinico

Differential Revision: D95367957

fbshipit-source-id: 60f7057e3fa1c5fbc117ff03a50de43c2f0dc371
2026-03-06 06:54:33 -08:00
Dawid Małecki dc8c442aa5 Normalize template specialization angle bracket spacing (#55910)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55910

Normalizes angle bracket spacing in scope names for template specializations.

Doxygen encodes template specializations with spaces around angle brackets in compound names (e.g., `CSSDataTypeParser< CSSMatrix >`). This caused inconsistent output in API snapshots.

The fix applies `normalize_angle_brackets()` to qualified paths when parsing scope names, ensuring consistent output:
- `CSSDataTypeParser< CSSMatrix >` → `CSSDataTypeParser<CSSMatrix>`
- `Callback< R(Args...)>` → `Callback<R(Args...)>`

Added a new test case `should_normalize_template_specialization_angle_brackets` to verify the fix.

Changelog:
[Internal]

Reviewed By: cipolleschi

Differential Revision: D95204780

fbshipit-source-id: d0d5fe7759a414b32630647f334b39e26da15108
2026-03-05 07:21:42 -08:00
Dawid Małecki 78c8842f9e Normalize Objective-C nullability annotations (#55898)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55898

Normalize Objective-C nullability annotations in the cxx-api parser to ensure consistent output in API snapshots.

Objective-C has three different forms of nullability annotations that are semantically equivalent:
- `nonnull`/`nullable` (context-sensitive keywords)
- `_Nonnull`/`_Nullable` (type qualifiers)
- `__nonnull`/`__nullable` (legacy Apple macros)

This diff normalizes all forms to `_Nonnull`/`_Nullable` for consistency.

**Examples:**
- `nonnull NSString*` → `_Nonnull NSString*`
- `NSString* __nonnull` → `NSString* _Nonnull`
- `nullable id` → `_Nullable id`
- `id __nullable` → `id _Nullable`
- `NSString* _Nonnull` → `NSString* _Nonnull` (unchanged)

Added a test case to verify the normalization works correctly.

Changelog:
[Internal]

Reviewed By: cortinico

Differential Revision: D95195669

fbshipit-source-id: ca2afd14b3c8bf7e62864daf9c3848f5d713898e
2026-03-05 07:21:42 -08:00
Dawid Małecki 725b056dc7 Filter category members from interface scope (#55899)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55899

Doxygen incorrectly merges category members into the base interface XML output.
This causes duplicate members to appear in both the category scope and the interface scope.

The fix detects category members by checking if their definition contains the pattern
`ClassName(CategoryName)::` (e.g., `RCTBridgeProxy(Cxx)::cxxOnlyProperty`) and filters
them out when processing interface sections.

Changelog:
[Internal]

Reviewed By: cortinico

Differential Revision: D95191148

fbshipit-source-id: 69d2f35d5aabd8e7567d254dc9b4686b4da2eb89
2026-03-05 07:21:42 -08:00
Dawid Małecki 97430c8165 Include definitions behind __cplusplus macro (#55902)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55902

Includes definitions behind the `__cplusplus` macro to also be visible in the API snapshot.

Changelog:
[Internal]

Reviewed By: cortinico

Differential Revision: D95189538

fbshipit-source-id: 35a632b83b6d6c4f330ac80b52b4ee203f692748
2026-03-05 07:21:42 -08:00
Dawid Małecki f2ea073857 Normalize pointer and reference spacing in parser output (#55901)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55901

Fixes inconsistent spacing around pointer (`*`) and reference (`&`, `&&`) symbols in the parser output.

Doxygen outputs types with a space before `*` and `&` (e.g., `NSString *`), which is inconsistent. This diff adds `normalize_pointer_spacing()` to standardize the output:

- `NSString *` → `NSString*`
- `int &` → `int&`
- `T &&` → `T&&`
- For function arguments: `NSString *name` → `NSString* name`

## Changes

1. Added `normalize_pointer_spacing()` function in `text_resolution.py`
2. Applied normalization in `resolve_ref_text_name()` and `resolve_linked_text_name()`
3. Applied normalization to block property argsstrings in `builders.py`
4. Updated all affected snapshot files to use normalized spacing

Changelog:
[Internal]

Reviewed By: cortinico

Differential Revision: D95078214

fbshipit-source-id: 1a21361565fd7915a3a597ac729cecc2cfe99961
2026-03-05 07:21:42 -08:00
Dawid Małecki 6558d0d374 Add doxygen input filter to strip block comments (#55888)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55888

Adds a doxygen input filter (`input_filters/doxygen_strip_comments.py`) that strips block comments from source files before doxygen parses them.

This prevents doxygen from incorrectly parsing Objective-C code examples (like `interface`, `protocol`) within documentation comments as actual code declarations. For example, a doc comment containing:

```
/**
 * Example:
 *   interface RCT_EXTERN_MODULE(MyModule, NSObject)
 *   end
 */
```

Was being parsed by doxygen as an actual interface declaration, resulting in malformed output like `interface RCT_EXTERN_MODULE {}` in the API snapshot.

The filter preserves line numbers by replacing comment content with the equivalent number of newlines, ensuring error messages remain accurate.

Changelog:
[Internal]

Reviewed By: cortinico

Differential Revision: D94538938

fbshipit-source-id: 4abbb9ed80cc1ca8eb8f128a4f06a0f4d2bc70d3
2026-03-05 07:21:42 -08:00
Dawid Małecki a6d29d0d38 Set more predefined macros in the doxygen config. (#55900)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55900

Doxygen incorrectly parses macros like `NS_DESIGNATED_INITIALIZER`,  `RCT_EXTERN`, `RCT_DEPRECATED`, `RCT_EXTERN_MODULE`, `API_AVAILABLE`. Setting them them as predefined empty string solves the issue.

Changelog:
[Internal]

Reviewed By: cipolleschi

Differential Revision: D94534964

fbshipit-source-id: 57a084e58479d079d43b234e3882346c5c443a69
2026-03-05 07:21:42 -08:00
Dawid Małecki d680d7001e Remove __deprecated_msg from the snapshot (#55780)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55780

Set predefined `__deprecated_msg` to empty string in the `.doxygen.config.template` as doxygen has problem with parsing and produces malformed xml.

Changelog:
[Internal]

Reviewed By: cortinico

Differential Revision: D94517576

fbshipit-source-id: eaaf0f66feacb47f725c34a5c93201f5103b92bb
2026-03-05 07:21:42 -08:00
Dawid Małecki 47ef0e173f Fix parsing of Objective-C block properties (#55776)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55776

Doxygen splits block property types across `<type>` and `<argsstring>` elements. For example:

```objc
property (nonatomic, copy) void (^eventInterceptor)(NSString *eventName, NSDictionary *event, NSNumber *reactTag);
```

Produces XML like:
```xml
<type>void(^</type>
<name>eventInterceptor</name>
<argsstring>)(NSString *eventName, NSDictionary *event, NSNumber *reactTag)</argsstring>
```

This caused the parser to output incomplete types. The fix detects when the property type ends with `(^` and combines it with the property name and argsstring:
```
property (copy) void(^eventInterceptor)(NSString *eventName, NSDictionary *event, NSNumber *reactTag);
```

Changelog:
[Internal]

Reviewed By: cipolleschi

Differential Revision: D94366205

fbshipit-source-id: 2d741401f63916284d453f1112ae0f349234308e
2026-03-05 07:21:42 -08:00
Dawid Małecki d473d9b598 Fix parsing of Objective-C interface generic inheritance (#55775)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55775

Doxygen incorrectly parses Objective-C interface declarations with protocol conformance. For example:

```objc
interface RCTAppearance : RCTEventEmitter <RCTBridgeModule>
```

Doxygen splits this into **two separate base classes** in the XML:
```xml
<basecompoundref>RCTEventEmitter</basecompoundref>
<basecompoundref>&lt;RCTBridgeModule&gt;</basecompoundref>
```

This caused the parser to output:
```
interface RCTAppearance : public RCTEventEmitter, public <RCTBridgeModule> {
```

Instead of the expected:
```
interface RCTAppearance : public RCTEventEmitter <RCTBridgeModule> {
```

The fix detects when a "base class" name starts and ends with `<...>` (indicating it's a protocol conformance) and combines it with the preceding actual base class name.

Also for multiple generics like:
```
interface RCTAlertManager : NSObject <RCTBridgeModule, RCTInvalidating>

end
```

The output should be
```
interface RCTAlertManager : public NSObject <RCTBridgeModule, RCTInvalidating>
end
```

Changelog:
[Internal]

Reviewed By: cipolleschi

Differential Revision: D94351731

fbshipit-source-id: 05ee2729c7a60800e9350193ef04ee6e2b125522
2026-03-05 07:21:42 -08:00
Fabrizio Cucci 4c69379224 Boot latest available iOS simulator instead of hardcoded iPhone 16 Pro (#55932)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55932

Changelog: [Internal]

When no simulator is already booted, dynamically discover the latest
available iOS runtime and boot the first iPhone device under it, instead
of hardcoding "iPhone 16 Pro". This uses `xcrun simctl list devices
iPhone available -j` to query available devices and picks the last iOS
runtime alphabetically (i.e. the newest).

Also moved the `bootSimulatorIfNeeded` call before the `xcodebuild`
invocation on the local build path, since `xcodebuild -destination
"generic/platform=iOS Simulator"` can itself trigger a new simulator
boot.

Reviewed By: cipolleschi

Differential Revision: D95371266

fbshipit-source-id: 0f4e2a476c971e774b6461edbecba4623f6befa6
2026-03-05 06:38:08 -08:00