From 50fdc9da2a1e70aa52f0bc295778644707e5b462 Mon Sep 17 00:00:00 2001 From: Richard Howell Date: Tue, 14 Apr 2026 13:49:15 -0700 Subject: [PATCH] don't include duplicate RCTDefines.h Summary: RCTDefines.h belongs to two modules at once, which is causing include issues. Make it only part of the RCTDefines target and modify includes to find it correctly. Reviewed By: javache Differential Revision: D100817032 --- packages/react-native/React/Base/RCTBundleURLProvider.h | 3 ++- .../react-native/React/Base/Surface/RCTSurfaceRootView.mm | 2 +- packages/react-native/React/Base/Surface/RCTSurfaceView.mm | 3 ++- .../Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm | 4 +++- packages/react-native/React/Modules/RCTUIManager.mm | 2 +- packages/react-native/React/Profiler/RCTProfile.m | 2 +- .../react-native/React/Profiler/RCTProfileTrampoline-arm.S | 2 +- .../react-native/React/Profiler/RCTProfileTrampoline-arm64.S | 2 +- .../react-native/React/Profiler/RCTProfileTrampoline-i386.S | 2 +- .../react-native/React/Profiler/RCTProfileTrampoline-x86_64.S | 2 +- 10 files changed, 14 insertions(+), 10 deletions(-) diff --git a/packages/react-native/React/Base/RCTBundleURLProvider.h b/packages/react-native/React/Base/RCTBundleURLProvider.h index f29b6118128d..2d7dc5065374 100644 --- a/packages/react-native/React/Base/RCTBundleURLProvider.h +++ b/packages/react-native/React/Base/RCTBundleURLProvider.h @@ -7,8 +7,9 @@ #import +#import + #import "RCTBundleManager.h" -#import "RCTDefines.h" RCT_EXTERN NSString *_Nonnull const RCTBundleURLProviderUpdatedNotification; RCT_EXTERN const NSUInteger kRCTBundleURLProviderDefaultPort; diff --git a/packages/react-native/React/Base/Surface/RCTSurfaceRootView.mm b/packages/react-native/React/Base/Surface/RCTSurfaceRootView.mm index 9682dc5901cc..c58fcb141ce6 100644 --- a/packages/react-native/React/Base/Surface/RCTSurfaceRootView.mm +++ b/packages/react-native/React/Base/Surface/RCTSurfaceRootView.mm @@ -7,7 +7,7 @@ #import "RCTSurfaceRootView.h" -#import "RCTDefines.h" +#import @implementation RCTSurfaceRootView diff --git a/packages/react-native/React/Base/Surface/RCTSurfaceView.mm b/packages/react-native/React/Base/Surface/RCTSurfaceView.mm index e022df1e86de..334f7671068a 100644 --- a/packages/react-native/React/Base/Surface/RCTSurfaceView.mm +++ b/packages/react-native/React/Base/Surface/RCTSurfaceView.mm @@ -8,7 +8,8 @@ #import "RCTSurfaceView.h" #import "RCTSurfaceView+Internal.h" -#import "RCTDefines.h" +#import + #import "RCTSurface.h" #import "RCTSurfaceProtocol.h" #import "RCTSurfaceRootView.h" diff --git a/packages/react-native/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm b/packages/react-native/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm index 511e398a8bb7..0bd67027bc08 100644 --- a/packages/react-native/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm +++ b/packages/react-native/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm @@ -6,8 +6,10 @@ */ #import "RCTSurfaceHostingView.h" + +#import + #import "RCTConstants.h" -#import "RCTDefines.h" #import "RCTSurface.h" #import "RCTSurfaceDelegate.h" #import "RCTSurfaceView.h" diff --git a/packages/react-native/React/Modules/RCTUIManager.mm b/packages/react-native/React/Modules/RCTUIManager.mm index 79d15605cafc..3ba6449f53ef 100644 --- a/packages/react-native/React/Modules/RCTUIManager.mm +++ b/packages/react-native/React/Modules/RCTUIManager.mm @@ -8,6 +8,7 @@ #import "RCTUIManager.h" #import +#import #import #import @@ -17,7 +18,6 @@ #import "RCTComponent.h" #import "RCTComponentData.h" #import "RCTConvert.h" -#import "RCTDefines.h" #import "RCTEventDispatcherProtocol.h" #import "RCTLayoutAnimation.h" #import "RCTLayoutAnimationGroup.h" diff --git a/packages/react-native/React/Profiler/RCTProfile.m b/packages/react-native/React/Profiler/RCTProfile.m index b23f8ce56c90..32ed153edbf4 100644 --- a/packages/react-native/React/Profiler/RCTProfile.m +++ b/packages/react-native/React/Profiler/RCTProfile.m @@ -13,13 +13,13 @@ #import #import +#import #import #import "RCTAssert.h" #import "RCTBridge+Private.h" #import "RCTBridge.h" #import "RCTComponentData.h" -#import "RCTDefines.h" #import "RCTLog.h" #import "RCTModuleData.h" #import "RCTReloadCommand.h" diff --git a/packages/react-native/React/Profiler/RCTProfileTrampoline-arm.S b/packages/react-native/React/Profiler/RCTProfileTrampoline-arm.S index 32d17e04d5f7..c7b8e414c1d0 100644 --- a/packages/react-native/React/Profiler/RCTProfileTrampoline-arm.S +++ b/packages/react-native/React/Profiler/RCTProfileTrampoline-arm.S @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -#include "RCTDefines.h" +#include #include "RCTMacros.h" #if RCT_PROFILE && defined(__arm__) diff --git a/packages/react-native/React/Profiler/RCTProfileTrampoline-arm64.S b/packages/react-native/React/Profiler/RCTProfileTrampoline-arm64.S index 87650f498aff..1e04fb00801f 100644 --- a/packages/react-native/React/Profiler/RCTProfileTrampoline-arm64.S +++ b/packages/react-native/React/Profiler/RCTProfileTrampoline-arm64.S @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -#include "RCTDefines.h" +#include #include "RCTMacros.h" #if RCT_PROFILE && defined(__arm64__) diff --git a/packages/react-native/React/Profiler/RCTProfileTrampoline-i386.S b/packages/react-native/React/Profiler/RCTProfileTrampoline-i386.S index 2f0e1837f585..8d3fdce28f7f 100644 --- a/packages/react-native/React/Profiler/RCTProfileTrampoline-i386.S +++ b/packages/react-native/React/Profiler/RCTProfileTrampoline-i386.S @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -#include "RCTDefines.h" +#include #include "RCTMacros.h" #if RCT_PROFILE && defined(__i386__) diff --git a/packages/react-native/React/Profiler/RCTProfileTrampoline-x86_64.S b/packages/react-native/React/Profiler/RCTProfileTrampoline-x86_64.S index 246a810d6752..d5bcb50d4e6e 100644 --- a/packages/react-native/React/Profiler/RCTProfileTrampoline-x86_64.S +++ b/packages/react-native/React/Profiler/RCTProfileTrampoline-x86_64.S @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -#include "RCTDefines.h" +#include #include "RCTMacros.h" #if RCT_PROFILE && defined(__x86_64__)