From a6df56e22e59e4712bdb3912778a13274b774029 Mon Sep 17 00:00:00 2001 From: Richard Howell Date: Thu, 16 Apr 2026 08:08:54 -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. Changelog: [Internal] Reviewed By: ksying, javache Differential Revision: D100817032 fbshipit-source-id: a665271c941114f4c9cbc10ccaac2d750aebabf1 --- 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 f29b6118128..2d7dc506537 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 9682dc5901c..c58fcb141ce 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 e022df1e86d..334f7671068 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 511e398a8bb..0bd67027bc0 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 79d15605caf..3ba6449f53e 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 b23f8ce56c9..32ed153edbf 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 32d17e04d5f..c7b8e414c1d 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 87650f498af..1e04fb00801 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 2f0e1837f58..8d3fdce28f7 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 246a810d675..d5bcb50d4e6 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__)