Skip to content

Commit 0de2563

Browse files
j-piaseckifacebook-github-bot
authored andcommitted
Cover react/nativemodule/microtasks:microtasks with Stable API guards (#58027)
Summary: Classifies `react/nativemodule/microtasks:microtasks` as a private target under the C++ stable API three-tier visibility model. Adds `#include <react/cxxstableapi/PrivateGuard.h>` to the module's only header, `NativeMicrotasks.h`, and declares the guard dependency in BUCK, CMake, and the podspec. Consumers that opt into `RN_STRICT_API` now get a hard error if they include it directly, with no escape hatch; without that flag the guard is inert, so no existing build changes behaviour. Changelog: [Internal] Differential Revision: D116612641
1 parent 5a29c68 commit 0de2563

3 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎packages/react-native/ReactCommon/react/nativemodule/microtasks/CMakeLists.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ target_include_directories(react_nativemodule_microtasks PUBLIC ${REACT_COMMON_D
1616
target_link_libraries(react_nativemodule_microtasks
1717
react_codegen_rncore
1818
react_cxxreact
19+
react_cxxstableapi
1920
)
2021
target_compile_reactnative_options(react_nativemodule_microtasks PRIVATE)
2122
target_compile_options(react_nativemodule_microtasks PRIVATE -Wpedantic)

‎packages/react-native/ReactCommon/react/nativemodule/microtasks/NativeMicrotasks.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/microtasks/React-microtasksnativemodule.podspec‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Pod::Spec.new do |s|
4848
add_rncore_dependency(s)
4949

5050
s.dependency "ReactCommon/turbomodule/core"
51+
s.dependency "React-cxxstableapi"
5152
add_dependency(s, "React-RCTFBReactNativeSpec")
5253

5354
mark_as_react_native_build(s)

0 commit comments

Comments
 (0)