Skip to content

Fix parsing of Objective-C block properties#55776

Closed
coado wants to merge 2 commits intofacebook:mainfrom
coado:export-D94366205
Closed

Fix parsing of Objective-C block properties#55776
coado wants to merge 2 commits intofacebook:mainfrom
coado:export-D94366205

Conversation

@coado
Copy link
Contributor

@coado coado commented Feb 26, 2026

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

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

Produces XML like:

<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

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

meta-codesync bot commented Feb 26, 2026

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

coado added a commit to coado/react-native that referenced this pull request Mar 3, 2026
Summary:
Pull Request resolved: facebook#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);
```

Reviewed By: cipolleschi

Differential Revision: D94366205
@coado coado force-pushed the export-D94366205 branch from 191086e to cff2f95 Compare March 3, 2026 15:03
coado added a commit to coado/react-native that referenced this pull request Mar 4, 2026
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);
```

Reviewed By: cipolleschi

Differential Revision: D94366205
@coado coado force-pushed the export-D94366205 branch from cff2f95 to acfbf91 Compare March 4, 2026 11:14
coado added a commit to coado/react-native that referenced this pull request Mar 4, 2026
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);
```

Reviewed By: cipolleschi

Differential Revision: D94366205
coado added a commit to coado/react-native that referenced this pull request Mar 4, 2026
Summary:
Pull Request resolved: facebook#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);
```

Reviewed By: cipolleschi

Differential Revision: D94366205
@coado coado force-pushed the export-D94366205 branch from acfbf91 to 10b2810 Compare March 4, 2026 11:17
coado added a commit to coado/react-native that referenced this pull request Mar 4, 2026
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);
```

Reviewed By: cipolleschi

Differential Revision: D94366205
coado added a commit to coado/react-native that referenced this pull request Mar 4, 2026
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);
```

Changelog:
[Internal]

Reviewed By: cipolleschi

Differential Revision: D94366205
coado added a commit to coado/react-native that referenced this pull request Mar 4, 2026
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);
```

Changelog:
[Internal]

Reviewed By: cipolleschi

Differential Revision: D94366205
coado added a commit to coado/react-native that referenced this pull request Mar 5, 2026
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);
```

Changelog:
[Internal]

Reviewed By: cipolleschi

Differential Revision: D94366205
coado added a commit to coado/react-native that referenced this pull request Mar 5, 2026
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);
```

Changelog:
[Internal]

Reviewed By: cipolleschi

Differential Revision: D94366205
coado added 2 commits March 5, 2026 02:21
)

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.


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
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);
```

Changelog:
[Internal]

Reviewed By: cipolleschi

Differential Revision: D94366205
@coado coado force-pushed the export-D94366205 branch from 10b2810 to 7e745ba Compare March 5, 2026 10:22
coado added a commit to coado/react-native that referenced this pull request Mar 5, 2026
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);
```

Changelog:
[Internal]

Reviewed By: cipolleschi

Differential Revision: D94366205
coado added a commit to coado/react-native that referenced this pull request Mar 5, 2026
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);
```

Changelog:
[Internal]

Reviewed By: cipolleschi

Differential Revision: D94366205
coado added a commit to coado/react-native that referenced this pull request Mar 5, 2026
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);
```

Changelog:
[Internal]

Reviewed By: cipolleschi

Differential Revision: D94366205
@meta-codesync meta-codesync bot closed this in 47ef0e1 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 47ef0e1.

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