From a30077979dd9d69a850fc4bb96131b30a1ee67b8 Mon Sep 17 00:00:00 2001 From: Jakub Piasecki Date: Wed, 30 Sep 2026 01:21:12 -0700 Subject: [PATCH] Include umbrella headers from jsinspector-modern (#58707) Summary: `jsinspector-modern` headers included three public-tier headers directly: `react/timing/primitives.h`, `react/utils/OnScopeExit.h` and `ReactCommon/RuntimeExecutor.h`. These are protected by `UmbrellaGuard.h`, so any consumer that defined `RN_STRICT_API` and included one of the affected jsinspector headers (e.g. `RuntimeTarget.h`, `HostTarget.h`, `ReactCdp.h`) hit a hard `#error`, even with `RN_ALLOW_FRAMEWORKS` defined. Switch to the module umbrellas ``, `` and ``, and declare the `react/timing` dependency that was previously used without being declared (BUCK, CMake, CocoaPods). Changelog: [Internal] Differential Revision: D122118482 --- packages/react-native/Package.swift | 2 +- .../react-native/ReactCommon/jsinspector-modern/CMakeLists.txt | 1 + .../ReactCommon/jsinspector-modern/HostTargetTraceRecording.h | 2 +- .../ReactCommon/jsinspector-modern/React-jsinspector.podspec | 1 + .../react-native/ReactCommon/jsinspector-modern/RuntimeTarget.h | 2 +- .../ReactCommon/jsinspector-modern/ScopedExecutor.h | 2 +- .../react-native/ReactCommon/jsinspector-modern/TracingAgent.h | 2 +- 7 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/react-native/Package.swift b/packages/react-native/Package.swift index 0aeb2dff39c2..4999bc1acbc3 100644 --- a/packages/react-native/Package.swift +++ b/packages/react-native/Package.swift @@ -194,7 +194,7 @@ let reactJsInspector = RNTarget( name: .reactJsInspector, path: "ReactCommon/jsinspector-modern", excludedPaths: ["tracing", "network", "tests"], - dependencies: [.reactNativeDependencies, .reactFeatureFlags, .jsi, .reactJsInspectorTracing, .reactJsInspectorNetwork, .reactRuntimeExecutor, .reactPerfLogger], + dependencies: [.reactNativeDependencies, .reactFeatureFlags, .jsi, .reactJsInspectorTracing, .reactJsInspectorNetwork, .reactRuntimeExecutor, .reactPerfLogger, .reactUtils], defines: [ CXXSetting.define("REACT_NATIVE_DEBUGGER_ENABLED", to: "1", .when(configuration: BuildConfiguration.debug)), CXXSetting.define("REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY", to: "1", .when(configuration: BuildConfiguration.debug)), diff --git a/packages/react-native/ReactCommon/jsinspector-modern/CMakeLists.txt b/packages/react-native/ReactCommon/jsinspector-modern/CMakeLists.txt index 9c79c490f427..633affc8f89a 100644 --- a/packages/react-native/ReactCommon/jsinspector-modern/CMakeLists.txt +++ b/packages/react-native/ReactCommon/jsinspector-modern/CMakeLists.txt @@ -25,6 +25,7 @@ target_link_libraries(jsinspector jsinspector_tracing react_cxxstableapi react_featureflags + react_timing runtimeexecutor reactperflogger react_utils diff --git a/packages/react-native/ReactCommon/jsinspector-modern/HostTargetTraceRecording.h b/packages/react-native/ReactCommon/jsinspector-modern/HostTargetTraceRecording.h index 76a2925995a3..b341811e822f 100644 --- a/packages/react-native/ReactCommon/jsinspector-modern/HostTargetTraceRecording.h +++ b/packages/react-native/ReactCommon/jsinspector-modern/HostTargetTraceRecording.h @@ -13,12 +13,12 @@ #include "HostTarget.h" #include "InstanceTarget.h" +#include #include #include #include #include #include -#include #include #include diff --git a/packages/react-native/ReactCommon/jsinspector-modern/React-jsinspector.podspec b/packages/react-native/ReactCommon/jsinspector-modern/React-jsinspector.podspec index b24d597d10c9..f29a39d7cc3a 100644 --- a/packages/react-native/ReactCommon/jsinspector-modern/React-jsinspector.podspec +++ b/packages/react-native/ReactCommon/jsinspector-modern/React-jsinspector.podspec @@ -55,6 +55,7 @@ Pod::Spec.new do |s| add_dependency(s, "React-jsinspectortracing", :framework_name => 'jsinspector_moderntracing') s.dependency "React-perflogger", version s.dependency "React-cxxstableapi" + s.dependency "React-timing" add_dependency(s, "React-oscompat") add_dependency(s, "React-utils", :additional_framework_paths => ["react/utils/platform/ios"]) if use_hermes() diff --git a/packages/react-native/ReactCommon/jsinspector-modern/RuntimeTarget.h b/packages/react-native/ReactCommon/jsinspector-modern/RuntimeTarget.h index 0c8607a97f73..63b6a8442f8f 100644 --- a/packages/react-native/ReactCommon/jsinspector-modern/RuntimeTarget.h +++ b/packages/react-native/ReactCommon/jsinspector-modern/RuntimeTarget.h @@ -18,7 +18,7 @@ #include "StackTrace.h" #include "WeakList.h" -#include +#include #include #include diff --git a/packages/react-native/ReactCommon/jsinspector-modern/ScopedExecutor.h b/packages/react-native/ReactCommon/jsinspector-modern/ScopedExecutor.h index c80007c03c0f..df7ada2500c4 100644 --- a/packages/react-native/ReactCommon/jsinspector-modern/ScopedExecutor.h +++ b/packages/react-native/ReactCommon/jsinspector-modern/ScopedExecutor.h @@ -9,7 +9,7 @@ #include -#include +#include #include #include #include diff --git a/packages/react-native/ReactCommon/jsinspector-modern/TracingAgent.h b/packages/react-native/ReactCommon/jsinspector-modern/TracingAgent.h index ec6b77aecfb7..c58c6cf48e5a 100644 --- a/packages/react-native/ReactCommon/jsinspector-modern/TracingAgent.h +++ b/packages/react-native/ReactCommon/jsinspector-modern/TracingAgent.h @@ -12,10 +12,10 @@ #include "HostTarget.h" #include "InspectorInterfaces.h" +#include #include #include #include -#include namespace facebook::react::jsinspector_modern {