Skip to content

Set more predefined macros in the doxygen config.#55900

Closed
coado wants to merge 4 commits intofacebook:mainfrom
coado:export-D94534964
Closed

Set more predefined macros in the doxygen config.#55900
coado wants to merge 4 commits intofacebook:mainfrom
coado:export-D94534964

Conversation

@coado
Copy link
Contributor

@coado coado commented Mar 4, 2026

Summary:
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

@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 Mar 4, 2026
@facebook-github-bot facebook-github-bot added p: Software Mansion Partner: Software Mansion Partner p: Facebook Partner: Facebook labels Mar 4, 2026
@meta-codesync
Copy link

meta-codesync bot commented Mar 4, 2026

@coado has exported this pull request. If you are a Meta employee, you can view the originating Diff in D94534964.

@coado coado force-pushed the export-D94534964 branch from 5eeff32 to d4e470d Compare March 4, 2026 14:35
coado added a commit to coado/react-native that referenced this pull request Mar 4, 2026
Summary:

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
@coado coado force-pushed the export-D94534964 branch from d4e470d to 4025a82 Compare March 4, 2026 14:56
coado added a commit to coado/react-native that referenced this pull request Mar 4, 2026
Summary:
Pull Request resolved: facebook#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
Dawid Małecki added 3 commits March 5, 2026 01:49
Summary:
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.

Differential Revision: D94351731
Summary:
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);
```

Differential Revision: D94366205

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

Differential Revision: D94517576
@coado coado force-pushed the export-D94534964 branch from 4025a82 to b809776 Compare March 5, 2026 10:18
coado added a commit to coado/react-native that referenced this pull request Mar 5, 2026
Summary:

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
coado added a commit to coado/react-native that referenced this pull request Mar 5, 2026
Summary:
Pull Request resolved: facebook#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
@coado coado force-pushed the export-D94534964 branch 2 times, most recently from 0c52d12 to b5da513 Compare March 5, 2026 10:24
coado added a commit to coado/react-native that referenced this pull request Mar 5, 2026
Summary:

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
coado added a commit to coado/react-native that referenced this pull request Mar 5, 2026
Summary:

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
Summary:
Pull Request resolved: facebook#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
@coado coado force-pushed the export-D94534964 branch from b5da513 to 93d4500 Compare March 5, 2026 10:35
@meta-codesync meta-codesync bot closed this in a6d29d0 Mar 5, 2026
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Mar 5, 2026
@meta-codesync
Copy link

meta-codesync bot commented Mar 5, 2026

This pull request has been merged in a6d29d0.

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. fb-exported Merged This PR has been merged. 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.

2 participants