Skip to content

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

Merged
meta-codesync[bot] merged 1 commit into
react:mainfrom
christophpurrer:export-D133675552
Dec 3, 2026
Merged

meta-codesync[bot] merged 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

Signed-off-by: Christoph Purrer chpurrer@meta.com

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.

@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
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.

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
@christophpurrer
christophpurrer force-pushed the export-D133675552 branch 2 times, most recently from 08a0977 to 2f3e06b Compare December 2, 2026 21:07
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
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
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
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

Signed-off-by: Christoph Purrer <chpurrer@meta.com>

Reviewed By: shwanton

Differential Revision: D133675552
@meta-codesync
meta-codesync Bot merged commit c972632 into react:main Dec 3, 2026
101 of 105 checks passed
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @christophpurrer in c972632

When will my fix make it into a release? | How to file a pick request?

@react-native-bot react-native-bot added the Merged This PR has been merged. label Dec 3, 2026
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. Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants