Gate legacy view manager interop behind RCT_REMOVE_LEGACY_COMPONENT_INTEROP (#57071)#57071
Open
christophpurrer wants to merge 1 commit into
Open
Gate legacy view manager interop behind RCT_REMOVE_LEGACY_COMPONENT_INTEROP (#57071)#57071christophpurrer wants to merge 1 commit into
RCT_REMOVE_LEGACY_COMPONENT_INTEROP (#57071)#57071christophpurrer wants to merge 1 commit into
Conversation
|
@christophpurrer has exported this pull request. If you are a Meta employee, you can view the originating Diff in D107440358. |
RCT_REMOVE_LEGACY_COMPONENT_INTEROPRCT_REMOVE_LEGACY_COMPONENT_INTEROP (#57071)
4bb4f47 to
0b1972a
Compare
christophpurrer
added a commit
to christophpurrer/react-native-macos
that referenced
this pull request
Jun 3, 2026
…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
…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
0b1972a to
3d4d097
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Wraps the iOS legacy
RCTViewManager↔ Fabric component interop layer in#ifndef RCT_REMOVE_LEGACY_COMPONENT_INTEROPso 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}: HideRCTFabricInteropLayerEnabled/RCTEnableFabricInteropLayerAPI and the backingfabricInteropLayerEnabledstatic when the flag is defined.React/Fabric/Mounting/RCTComponentViewFactory.mm: Gate the#importofRCTLegacyViewManagerInteropComponentView.hand the legacy interop fallback branch in_registerComponentIfPossible:.Default behavior is unchanged because
RCT_REMOVE_LEGACY_COMPONENT_INTEROPis not defined unless the new constraint is selected.Changelog:
[General][Added] Gate legacy view manager interop behind
RCT_REMOVE_LEGACY_COMPONENT_INTEROPDifferential Revision: D107440358