From adc0aec7a50aec66014e95b44371f9d9f29db45d Mon Sep 17 00:00:00 2001 From: Jakub Piasecki Date: Wed, 26 Aug 2026 00:25:24 -0700 Subject: [PATCH 1/2] Cover `jsiexecutor` with Stable API guards (#58133) Summary: Classifies `jsiexecutor:jsiexecutor` as a private target under the C++ stable API three-tier visibility model. Adds `#include ` to both exported headers (`JSIExecutor.h` and `JSINativeModules.h`), and wires the guard dependency into BUCK, CMake and the podspec. The podspec needs no `USE_FRAMEWORKS` header search path edit: it already sets `HEADER_SEARCH_PATHS` to `"$(PODS_TARGET_SRCROOT)/.."` unconditionally, and that resolves to `ReactCommon`. The guards are inert unless a consumer defines `RN_STRICT_API`, so there is no behavior change. Changelog: [Internal] Differential Revision: D117330790 --- packages/react-native/ReactCommon/jsiexecutor/CMakeLists.txt | 1 + .../ReactCommon/jsiexecutor/React-jsiexecutor.podspec | 1 + .../react-native/ReactCommon/jsiexecutor/jsireact/JSIExecutor.h | 2 ++ .../ReactCommon/jsiexecutor/jsireact/JSINativeModules.h | 2 ++ 4 files changed, 6 insertions(+) diff --git a/packages/react-native/ReactCommon/jsiexecutor/CMakeLists.txt b/packages/react-native/ReactCommon/jsiexecutor/CMakeLists.txt index 4ba0d44f3f26..dace77cb6623 100644 --- a/packages/react-native/ReactCommon/jsiexecutor/CMakeLists.txt +++ b/packages/react-native/ReactCommon/jsiexecutor/CMakeLists.txt @@ -17,6 +17,7 @@ target_include_directories(jsireact PUBLIC .) target_link_libraries(jsireact react_cxxreact + react_cxxstableapi reactperflogger folly_runtime glog diff --git a/packages/react-native/ReactCommon/jsiexecutor/React-jsiexecutor.podspec b/packages/react-native/ReactCommon/jsiexecutor/React-jsiexecutor.podspec index 6ceb245318d1..871c9752a668 100644 --- a/packages/react-native/ReactCommon/jsiexecutor/React-jsiexecutor.podspec +++ b/packages/react-native/ReactCommon/jsiexecutor/React-jsiexecutor.podspec @@ -35,6 +35,7 @@ Pod::Spec.new do |s| s.dependency "React-jsi" s.dependency "React-jsitooling" s.dependency "React-perflogger" + s.dependency "React-cxxstableapi" add_dependency(s, "React-debug") add_dependency(s, "React-runtimeexecutor", :additional_framework_paths => ["platform/ios"]) add_dependency(s, "React-jsinspector", :framework_name => 'jsinspector_modern') diff --git a/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSIExecutor.h b/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSIExecutor.h index b1a09bd61414..f39d3a3d155e 100644 --- a/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSIExecutor.h +++ b/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSIExecutor.h @@ -7,6 +7,8 @@ #pragma once +#include + #include #include #include diff --git a/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSINativeModules.h b/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSINativeModules.h index c23f183a1463..a5d035c4f331 100644 --- a/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSINativeModules.h +++ b/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSINativeModules.h @@ -7,6 +7,8 @@ #pragma once +#include + #ifndef RCT_REMOVE_LEGACY_ARCH #include From 2f86a3bee52f137e625114d411fc9ba0d13e987c Mon Sep 17 00:00:00 2001 From: Jakub Piasecki Date: Wed, 26 Aug 2026 00:25:24 -0700 Subject: [PATCH 2/2] Forward declare JSExecutorFactory in RCTAppSetupUtils (#58134) Summary: `RCTAppSetupUtils.h` is a public header - every app's AppDelegate imports it as `` - but it imported `` while naming nothing from it. The only symbol it needs out of that include chain is `JSExecutorFactory`, the return type of `RCTAppSetupDefaultJsExecutorFactory`, which is declared in ``. Both `jsiexecutor:jsiexecutor` and `cxxreact:bridge` are private targets under the three-tier C++ stable API visibility model. The type is forward declared alongside the existing `RuntimeScheduler` forward declaration - `std::unique_ptr` needs only an incomplete type in a declaration - and `` moves to the implementation file. Code that relied on reaching `JSIExecutor` or `JSExecutorFactory` through this header should import `` or `` directly. Changelog: [iOS][Changed] - `RCTAppSetupUtils.h` no longer transitively imports `JSIExecutor.h` or `JSExecutor.h` Differential Revision: D117330792 --- .../react-native/Libraries/AppDelegate/RCTAppSetupUtils.h | 4 ++-- .../react-native/Libraries/AppDelegate/RCTAppSetupUtils.mm | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.h b/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.h index d76708c2f957..6de5a8e8e00c 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.h +++ b/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.h @@ -18,14 +18,14 @@ #endif #import -#import @protocol RCTDependencyProvider; // Forward declaration to decrease compilation coupling namespace facebook::react { +class JSExecutorFactory; class RuntimeScheduler; -} +} // namespace facebook::react RCT_EXTERN NSArray *RCTAppSetupUnstableModulesRequiringMainQueueSetup( id dependencyProvider); diff --git a/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.mm b/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.mm index ae3ae256a8c1..d5aabd85ea1c 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.mm +++ b/packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.mm @@ -7,6 +7,7 @@ #import "RCTAppSetupUtils.h" +#import #import #import