Skip to content

Commit c148be6

Browse files
j-piaseckimeta-codesync[bot]
authored andcommitted
Cover idlecallbacks with Stable API guards (#58139)
Summary: Pull Request resolved: #58139 Classifies `react/nativemodule/idlecallbacks:idlecallbacks` as a private target under the C++ stable API three-tier visibility model. Adds `#include <react/cxxstableapi/PrivateGuard.h>` to the module's single exported header (`NativeIdleCallbacks.h`), and wires the guard dependency into BUCK, CMake, and the podspec. The podspec needs no `USE_FRAMEWORKS` header search path edit: its existing `$(PODS_TARGET_SRCROOT)/../../..` already resolves to `ReactCommon`, so `<react/cxxstableapi/...>` is on the path. The guards are inert unless a consumer defines `RN_STRICT_API`, so there is no behavior change. Changelog: [Internal] Reviewed By: cortinico Differential Revision: D117333873 fbshipit-source-id: d5d51baa78f4568c3445de12144dfd419660165d
1 parent 16f8889 commit c148be6

3 files changed

Lines changed: 4 additions & 0 deletions

File tree

packages/react-native/ReactCommon/react/nativemodule/idlecallbacks/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ target_include_directories(react_nativemodule_idlecallbacks PUBLIC ${REACT_COMMO
1515
target_link_libraries(react_nativemodule_idlecallbacks
1616
react_codegen_rncore
1717
react_cxxreact
18+
react_cxxstableapi
1819
react_renderer_runtimescheduler
1920
)
2021
target_compile_reactnative_options(react_nativemodule_idlecallbacks PRIVATE)

packages/react-native/ReactCommon/react/nativemodule/idlecallbacks/NativeIdleCallbacks.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
#pragma once
99

10+
#include <react/cxxstableapi/PrivateGuard.h>
11+
1012
#if __has_include("FBReactNativeSpecJSI.h") // CocoaPod headers on Apple
1113
#include "FBReactNativeSpecJSI.h"
1214
#else

packages/react-native/ReactCommon/react/nativemodule/idlecallbacks/React-idlecallbacksnativemodule.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Pod::Spec.new do |s|
5050
s.dependency "ReactCommon/turbomodule/core"
5151
s.dependency "React-bridging"
5252
s.dependency "React-runtimescheduler"
53+
s.dependency "React-cxxstableapi"
5354
add_dependency(s, "React-RCTFBReactNativeSpec")
5455
add_dependency(s, "React-runtimeexecutor", :additional_framework_paths => ["platform/ios"])
5556

0 commit comments

Comments
 (0)