Skip to content

Drop legacy export macros when both interops are removed (#60203) - #60203

Open
christophpurrer wants to merge 1 commit into
react:mainfrom
christophpurrer:export-D133675552
Open

christophpurrer wants to merge 1 commit into
react:mainfrom
christophpurrer:export-D133675552

Conversation

@christophpurrer

@christophpurrer christophpurrer commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

Consumers who define both RCT_REMOVE_LEGACY_MODULE_INTEROP and RCT_REMOVE_LEGACY_COMPONENT_INTEROP now get the legacy RCT_EXPORT_METHOD family and RCT_EXTERN_* macros compiled out of RCTBridgeModule.h, so remaining legacy modules fail at compile time. RCT_EXPORT_MODULE stays available for TurboModules. Core modules keep plain method declarations under the flags, and in-repo legacy fixtures are compiled out.

Changelog:
[iOS][Added] - Compile out legacy RCT_EXPORT_METHOD and RCT_EXTERN_* macros when both RCT_REMOVE_LEGACY_MODULE_INTEROP and RCT_REMOVE_LEGACY_COMPONENT_INTEROP are set

Reviewed By: shwanton

Differential Revision: D133675552

@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 Nov 21, 2026
@meta-codesync

meta-codesync Bot commented Nov 21, 2026

Copy link
Copy Markdown

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

Summary:

Consumers who define both `RCT_REMOVE_LEGACY_MODULE_INTEROP` and `RCT_REMOVE_LEGACY_COMPONENT_INTEROP` now get the legacy `RCT_EXPORT_METHOD` family and `RCT_EXTERN_*` macros compiled out of `RCTBridgeModule.h`, so remaining legacy modules fail at compile time. `RCT_EXPORT_MODULE` stays available for TurboModules. Core modules keep plain method declarations under the flags, and in-repo legacy fixtures are compiled out.

Changelog:
[iOS][Added] - Compile out legacy `RCT_EXPORT_METHOD` and `RCT_EXTERN_*` macros when both `RCT_REMOVE_LEGACY_MODULE_INTEROP` and `RCT_REMOVE_LEGACY_COMPONENT_INTEROP` are set

Reviewed By: shwanton

Differential Revision: D133675552
@meta-codesync meta-codesync Bot changed the title Drop legacy export macros when both interops are removed Drop legacy export macros when both interops are removed (#60203) Dec 2, 2026
christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Dec 2, 2026
Summary:

Consumers who define both `RCT_REMOVE_LEGACY_MODULE_INTEROP` and `RCT_REMOVE_LEGACY_COMPONENT_INTEROP` now get the legacy `RCT_EXPORT_METHOD` family and `RCT_EXTERN_*` macros compiled out of `RCTBridgeModule.h`, so remaining legacy modules fail at compile time. `RCT_EXPORT_MODULE` stays available for TurboModules. Core modules keep plain method declarations under the flags, and in-repo legacy fixtures are compiled out.

Changelog:
[iOS][Added] - Compile out legacy `RCT_EXPORT_METHOD` and `RCT_EXTERN_*` macros when both `RCT_REMOVE_LEGACY_MODULE_INTEROP` and `RCT_REMOVE_LEGACY_COMPONENT_INTEROP` are set

Reviewed By: shwanton

Differential Revision: D133675552

@shwanton shwanton left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

This branch has not been deployed

No deployments
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. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants