Skip to content

Commit cefbe18

Browse files
j-piaseckifacebook-github-bot
authored andcommitted
Use umbrellas instead of direct includes in nativemodule/core module (#58711)
Summary: Changelog: [Internal] Part of the C++ stable API migration to umbrella includes. The `nativemodule/core` headers included other public modules through their fine-grained, `UmbrellaGuard`-protected headers. They now include those modules' umbrellas instead: `<React/CallInvoker.h>`, `<React/Bridging.h>` and `<React/RuntimeExecutor.h>`. This matters most for the iOS `RCTTurboModule*.h` headers, which are exported, have no guard, and are not reached through `<React/NativeModuleCore.h>`. Includes of the module's own headers and all `.cpp`/`.mm` files are unchanged. No functional change. Differential Revision: D122123056
1 parent a266b88 commit cefbe18

9 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/CxxTurboModuleUtils.h‎

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

1010
#include <react/cxxstableapi/UmbrellaGuard.h>
1111

12-
#include <ReactCommon/CallInvoker.h>
12+
#include <React/CallInvoker.h>
1313
#include <ReactCommon/TurboModule.h>
1414
#include <functional>
1515
#include <memory>

‎packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
#include <jsi/jsi.h>
1717

18-
#include <ReactCommon/CallInvoker.h>
19-
#include <react/bridging/EventEmitter.h>
18+
#include <React/Bridging.h>
19+
#include <React/CallInvoker.h>
2020

2121
namespace facebook::react {
2222

‎packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
#include <string>
1313

14+
#include <React/Bridging.h>
1415
#include <jsi/jsi.h>
15-
#include <react/bridging/LongLivedObject.h>
1616

1717
#include <ReactCommon/TurboModule.h>
1818

‎packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleUtils.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
#include <react/cxxstableapi/UmbrellaGuard.h>
1111

12+
#include <React/Bridging.h>
1213
#include <jsi/jsi.h>
13-
#include <react/bridging/LongLivedObject.h>
1414
#include <cassert>
1515
#include <functional>
1616
#include <string>

‎packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleWithJSIBindings.h‎

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

1010
#include <react/cxxstableapi/UmbrellaGuard.h>
1111

12-
#include <ReactCommon/CallInvoker.h>
12+
#include <React/CallInvoker.h>
1313
#include <jsi/jsi.h>
1414

1515
namespace facebook::react {

‎packages/react-native/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
#include <string>
1313

14-
#include <ReactCommon/CallInvoker.h>
14+
#include <React/Bridging.h>
15+
#include <React/CallInvoker.h>
1516
#include <ReactCommon/TurboModule.h>
1617
#include <jsi/jsi.h>
17-
#include <react/bridging/CallbackWrapper.h>
1818
#include <react/jni/JCallback.h>
1919

2020
namespace facebook::react {

‎packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#import <React/RCTBridge.h>
1313
#import <React/RCTBridgeModule.h>
1414
#import <React/RCTModuleMethod.h>
15-
#import <ReactCommon/CallInvoker.h>
15+
#import <React/CallInvoker.h>
1616
#import <ReactCommon/TurboModule.h>
1717
#import <functional>
1818
#import <memory>

‎packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#import <React/RCTBridgeModuleDecorator.h>
1313
#import <React/RCTDefines.h>
1414
#import <React/RCTTurboModuleRegistry.h>
15-
#import <ReactCommon/RuntimeExecutor.h>
15+
#import <React/RuntimeExecutor.h>
1616
#import <ReactCommon/TurboModuleBinding.h>
1717

1818
#import "RCTTurboModule.h"

‎packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleWithJSIBindings.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#import <Foundation/Foundation.h>
99

1010
#ifdef __cplusplus
11-
#include <ReactCommon/CallInvoker.h>
11+
#include <React/CallInvoker.h>
1212
#include <jsi/jsi.h>
1313
#endif
1414

0 commit comments

Comments
 (0)