From c9182e71f70d933207d005dfddefb5cc93178b28 Mon Sep 17 00:00:00 2001 From: Jakub Piasecki Date: Tue, 1 Sep 2026 01:20:10 -0700 Subject: [PATCH] Cover `jsitooling` with guards (#58262) Summary: Classifies `jsitooling:jsitooling` as a for-frameworks target under the C++ stable API three-tier visibility model. Adds `#include ` to the module's three exported headers (`JSRuntimeBindings.h`, `JSRuntimeFactory.h`, `JSRuntimeFactoryCAPI.h`), and wires the guard dependency into BUCK, CMake and CocoaPods. Changelog: [Internal] Differential Revision: D118118424 --- .../react-native/ReactCommon/jsitooling/CMakeLists.txt | 3 ++- .../ReactCommon/jsitooling/React-jsitooling.podspec | 8 ++++++++ .../jsitooling/react/runtime/JSRuntimeBindings.h | 2 ++ .../jsitooling/react/runtime/JSRuntimeFactory.h | 2 ++ .../jsitooling/react/runtime/JSRuntimeFactoryCAPI.h | 2 ++ 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/react-native/ReactCommon/jsitooling/CMakeLists.txt b/packages/react-native/ReactCommon/jsitooling/CMakeLists.txt index 565f832b39df..b8024cf8b78e 100644 --- a/packages/react-native/ReactCommon/jsitooling/CMakeLists.txt +++ b/packages/react-native/ReactCommon/jsitooling/CMakeLists.txt @@ -20,7 +20,8 @@ target_link_libraries(jsitooling react_cxxreact folly_runtime glog - jsi) + jsi + react_cxxstableapi) target_compile_reactnative_options(jsitooling PRIVATE) target_compile_options(jsitooling PRIVATE -Wpedantic) diff --git a/packages/react-native/ReactCommon/jsitooling/React-jsitooling.podspec b/packages/react-native/ReactCommon/jsitooling/React-jsitooling.podspec index 12d77fbab6ba..e75909fe0c4c 100644 --- a/packages/react-native/ReactCommon/jsitooling/React-jsitooling.podspec +++ b/packages/react-native/ReactCommon/jsitooling/React-jsitooling.podspec @@ -16,6 +16,12 @@ else source[:tag] = "v#{version}" end +header_search_paths = [] + +if ENV['USE_FRAMEWORKS'] + header_search_paths << "\"$(PODS_TARGET_SRCROOT)/..\"" # ReactCommon, for +end + Pod::Spec.new do |s| s.name = "React-jsitooling" s.version = version @@ -31,12 +37,14 @@ Pod::Spec.new do |s| resolve_use_frameworks(s, header_mappings_dir: "./", module_name: "JSITooling") s.pod_target_xcconfig = { + "HEADER_SEARCH_PATHS" => header_search_paths.join(' '), "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(), "DEFINES_MODULE" => "YES", } s.dependency "React-cxxreact", version s.dependency "React-jsi", version + 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/jsitooling/react/runtime/JSRuntimeBindings.h b/packages/react-native/ReactCommon/jsitooling/react/runtime/JSRuntimeBindings.h index 720ef82ed853..c80ce9a0c9b7 100644 --- a/packages/react-native/ReactCommon/jsitooling/react/runtime/JSRuntimeBindings.h +++ b/packages/react-native/ReactCommon/jsitooling/react/runtime/JSRuntimeBindings.h @@ -7,6 +7,8 @@ #pragma once +#include + #include #include diff --git a/packages/react-native/ReactCommon/jsitooling/react/runtime/JSRuntimeFactory.h b/packages/react-native/ReactCommon/jsitooling/react/runtime/JSRuntimeFactory.h index 22759cb33bb3..a52b11bd55ae 100644 --- a/packages/react-native/ReactCommon/jsitooling/react/runtime/JSRuntimeFactory.h +++ b/packages/react-native/ReactCommon/jsitooling/react/runtime/JSRuntimeFactory.h @@ -7,6 +7,8 @@ #pragma once +#include + #ifdef __cplusplus #include diff --git a/packages/react-native/ReactCommon/jsitooling/react/runtime/JSRuntimeFactoryCAPI.h b/packages/react-native/ReactCommon/jsitooling/react/runtime/JSRuntimeFactoryCAPI.h index 41d8204bd041..b3976558f808 100644 --- a/packages/react-native/ReactCommon/jsitooling/react/runtime/JSRuntimeFactoryCAPI.h +++ b/packages/react-native/ReactCommon/jsitooling/react/runtime/JSRuntimeFactoryCAPI.h @@ -7,6 +7,8 @@ #pragma once +#include + #ifdef __cplusplus extern "C" { #endif