Skip to content

Gate shared C++ + Java/Kotlin legacy view manager interop behind RCT_REMOVE_LEGACY_COMPONENT_INTEROP#57073

Open
christophpurrer wants to merge 2 commits into
facebook:mainfrom
christophpurrer:export-D107477086
Open

Gate shared C++ + Java/Kotlin legacy view manager interop behind RCT_REMOVE_LEGACY_COMPONENT_INTEROP#57073
christophpurrer wants to merge 2 commits into
facebook:mainfrom
christophpurrer:export-D107477086

Conversation

@christophpurrer
Copy link
Copy Markdown
Contributor

Summary:
Changelog:
[General][Added] Gate shared C++ and Android Java/Kotlin legacy view manager interop behind RCT_REMOVE_LEGACY_COMPONENT_INTEROP

Differential Revision: D107477086

…INTEROP` (facebook#57071)

Summary:

Wraps the iOS legacy `RCTViewManager` ↔ Fabric component interop layer in `#ifndef RCT_REMOVE_LEGACY_COMPONENT_INTEROP` so that apps which opt into compile it out entirely. This enables dead-code elimination of the Paper view manager interop surface for apps that have fully migrated their custom views to Fabric Component Views.

Changes:

iOS (Objective-C / C++):
- `React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.{h,mm}`: Compile the entire translation unit only when the flag is undefined.
- `React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.{h,mm}`: Compile the entire translation unit only when the flag is undefined.
- `ReactCommon/.../platform/ios/.../RCTLegacyViewManagerInteropCoordinator.{h,mm}`: Compile the entire translation unit only when the flag is undefined.
- `ReactCommon/.../platform/ios/.../LegacyViewManagerInteropComponentDescriptor.mm`: Compile the entire translation unit only when the flag is undefined.
- `React/Base/RCTBridge.{h,mm}`: Hide `RCTFabricInteropLayerEnabled` / `RCTEnableFabricInteropLayer` API and the backing `fabricInteropLayerEnabled` static when the flag is defined.
- `React/Fabric/Mounting/RCTComponentViewFactory.mm`: Gate the `#import` of `RCTLegacyViewManagerInteropComponentView.h` and the legacy interop fallback branch in `_registerComponentIfPossible:`.

Default behavior is unchanged because `RCT_REMOVE_LEGACY_COMPONENT_INTEROP` is not defined unless the new constraint is selected.

Changelog:
[General][Added] Gate legacy view manager interop behind `RCT_REMOVE_LEGACY_COMPONENT_INTEROP`

Differential Revision: D107440358
…_REMOVE_LEGACY_COMPONENT_INTEROP`

Summary:
Changelog:
[General][Added] Gate shared C++ and Android Java/Kotlin legacy view manager interop behind `RCT_REMOVE_LEGACY_COMPONENT_INTEROP`

Differential Revision: D107477086
@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 Jun 4, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Jun 4, 2026

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant