Skip to content

Commit d0226f5

Browse files
j-piaseckifacebook-github-bot
authored andcommitted
Reach public ReactCommon modules through umbrellas from iOS platform headers (#58885)
Summary: Exported iOS headers in `React/Fabric` (`RCTViewComponentView.h`, `RCTComponentViewProtocol.h`, `RCTTouchableComponentViewProtocol.h`, `RCTComponentViewFactory.h`, `RCTComponentViewRegistry.h`, `RCTConversions.h`, `RCTMountingManager.h`, `RCTScheduler.h`, `RCTSurfacePresenter.h`, `RCTSurfacePresenterBridgeAdapter.h`, `AppleEventBeat.h`, `Utils/PlatformRunLoopObserver.h`, `Utils/RCTLinearGradient.h`, `Utils/RCTRadialGradient.h`) and `RCTHost.h` included fine-grained headers of public ReactCommon modules. Under `RN_STRICT_API` those hit the modules' public guard in any app or library that imports them — `RCTViewComponentView.h` is the base class of most third-party Fabric components — so they now include the module umbrellas (`<React/RendererCore.h>`, `<React/View.h>`, `<React/Graphics.h>`, `<React/ComponentRegistry.h>`, `<React/Utils.h>`, `<React/Timing.h>`) instead. Includes of "for frameworks" headers are unchanged. The guards are inert without that flag. Changelog: [Internal] Differential Revision: D123610706
1 parent 8d8b8f3 commit d0226f5

15 files changed

Lines changed: 24 additions & 37 deletions

‎packages/react-native/React/Fabric/AppleEventBeat.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313

1414
#import <QuartzCore/QuartzCore.h>
1515

16+
#include <React/RendererCore.h>
17+
#include <React/Utils.h>
1618
#include <ReactCommon/RuntimeExecutor.h>
17-
#include <react/renderer/core/EventBeat.h>
18-
#include <react/utils/RunLoopObserver.h>
1919

2020
@class RCTEventBeatFlusherLayer;
2121

‎packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,9 @@
1010
#import <React/RCTComponentViewProtocol.h>
1111
#import <React/RCTConstants.h>
1212
#import <React/RCTTouchableComponentViewProtocol.h>
13+
#import <React/RendererCore.h>
1314
#import <React/UIView+ComponentViewProtocol.h>
14-
#import <react/renderer/components/view/ViewEventEmitter.h>
15-
#import <react/renderer/components/view/ViewProps.h>
16-
#import <react/renderer/core/EventEmitter.h>
17-
#import <react/renderer/core/LayoutMetrics.h>
18-
#import <react/renderer/core/Props.h>
15+
#import <React/View.h>
1916

2017
NS_ASSUME_NONNULL_BEGIN
2118

‎packages/react-native/React/Fabric/Mounting/RCTComponentViewFactory.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

88
#import <UIKit/UIKit.h>
99

10+
#import <React/ComponentRegistry.h>
1011
#import <React/RCTComponentViewDescriptor.h>
1112
#import <React/RCTComponentViewProtocol.h>
1213
#import <jsi/jsi.h>
13-
#import <react/renderer/componentregistry/ComponentDescriptorRegistry.h>
1414

1515
NS_ASSUME_NONNULL_BEGIN
1616

‎packages/react-native/React/Fabric/Mounting/RCTComponentViewProtocol.h‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@
77

88
#import <UIKit/UIKit.h>
99

10-
#import <react/renderer/componentregistry/ComponentDescriptorProvider.h>
11-
#import <react/renderer/core/EventEmitter.h>
12-
#import <react/renderer/core/LayoutMetrics.h>
13-
#import <react/renderer/core/Props.h>
14-
#import <react/renderer/core/State.h>
10+
#import <React/ComponentRegistry.h>
11+
#import <React/RendererCore.h>
1512

1613
NS_ASSUME_NONNULL_BEGIN
1714

‎packages/react-native/React/Fabric/Mounting/RCTComponentViewRegistry.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#import <React/RCTComponentViewDescriptor.h>
1111
#import <React/RCTComponentViewFactory.h>
1212
#import <React/RCTComponentViewProtocol.h>
13-
#import <react/renderer/core/ReactPrimitives.h>
13+
#import <React/RendererCore.h>
1414

1515
NS_ASSUME_NONNULL_BEGIN
1616

‎packages/react-native/React/Fabric/Mounting/RCTMountingManager.h‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@
99

1010
#import <React/RCTMountingManagerDelegate.h>
1111
#import <React/RCTPrimitives.h>
12-
#import <react/renderer/core/ComponentDescriptor.h>
13-
#import <react/renderer/core/RawProps.h>
14-
#import <react/renderer/core/ReactPrimitives.h>
12+
#import <React/RendererCore.h>
13+
#import <React/Utils.h>
1514
#import <react/renderer/mounting/MountingCoordinator.h>
1615
#import <react/renderer/mounting/ShadowView.h>
17-
#import <react/utils/ContextContainer.h>
1816

1917
NS_ASSUME_NONNULL_BEGIN
2018

‎packages/react-native/React/Fabric/RCTConversions.h‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@
77

88
#import <UIKit/UIKit.h>
99

10-
#import <react/renderer/components/view/AccessibilityPrimitives.h>
11-
#import <react/renderer/components/view/primitives.h>
12-
#import <react/renderer/core/LayoutPrimitives.h>
13-
#import <react/renderer/graphics/Color.h>
10+
#import <React/Graphics.h>
11+
#import <React/RendererCore.h>
12+
#import <React/Timing.h>
13+
#import <React/View.h>
1414
#import <react/renderer/graphics/RCTPlatformColorUtils.h>
15-
#import <react/renderer/graphics/Transform.h>
16-
#import <react/timing/primitives.h>
1715

1816
NS_ASSUME_NONNULL_BEGIN
1917

‎packages/react-native/React/Fabric/RCTScheduler.h‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,13 @@
88
#import <UIKit/UIKit.h>
99
#import <memory>
1010

11-
#import <react/renderer/componentregistry/ComponentDescriptorFactory.h>
12-
#import <react/renderer/core/ComponentDescriptor.h>
13-
#import <react/renderer/core/EventListener.h>
14-
#import <react/renderer/core/LayoutConstraints.h>
15-
#import <react/renderer/core/LayoutContext.h>
11+
#import <React/ComponentRegistry.h>
12+
#import <React/RendererCore.h>
13+
#import <React/Utils.h>
1614
#import <react/renderer/mounting/MountingCoordinator.h>
1715
#import <react/renderer/scheduler/SchedulerToolbox.h>
1816
#import <react/renderer/scheduler/SurfaceHandler.h>
1917
#import <react/renderer/uimanager/UIManager.h>
20-
#import <react/utils/ContextContainer.h>
2118

2219
NS_ASSUME_NONNULL_BEGIN
2320

‎packages/react-native/React/Fabric/RCTSurfacePresenter.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
#import <React/RCTPrimitives.h>
1111
#import <React/RCTSurfacePresenterStub.h>
1212
#import <React/RCTSurfaceStage.h>
13+
#import <React/Utils.h>
1314
#import <ReactCommon/RuntimeExecutor.h>
1415
#import <react/renderer/scheduler/SurfaceHandler.h>
15-
#import <react/utils/ContextContainer.h>
1616

1717
NS_ASSUME_NONNULL_BEGIN
1818

‎packages/react-native/React/Fabric/RCTSurfacePresenterBridgeAdapter.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
*/
77

88
#import <Foundation/Foundation.h>
9+
#import <React/Utils.h>
910
#import <ReactCommon/RuntimeExecutor.h>
1011
#import <UIKit/UIKit.h>
11-
#import <react/utils/ContextContainer.h>
1212

1313
NS_ASSUME_NONNULL_BEGIN
1414

0 commit comments

Comments
 (0)