Skip to content

Commit 029e118

Browse files
j-piaseckifacebook-github-bot
authored andcommitted
Cover react/renderer/mounting with guards
Summary: Classifies `react/renderer/mounting:mounting` as a "for frameworks" target under the C++ stable API three-tier visibility model. Adds `#include <react/cxxstableapi/FrameworksGuard.h>` to the module's 15 non-test headers, and wires the guard dependency into BUCK and CMake. No CocoaPods change is needed: the module ships as a subspec of `React-Fabric`, whose parent spec already declares `React-cxxstableapi` and calls `mark_as_react_native_build`. Consumers that opt into `RN_STRICT_API` now get a warning if they include these headers directly, which they can acknowledge with `RN_ALLOW_FRAMEWORKS`; without that flag the guards are inert, so no existing build changes behaviour. Changelog: [Internal] Differential Revision: D118612708
1 parent e0921e9 commit 029e118

19 files changed

Lines changed: 37 additions & 0 deletions

packages/react-native/ReactCommon/react/renderer/mounting/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ target_link_libraries(react_renderer_mounting
2323
glog_init
2424
jsi
2525
jsinspector_tracing
26+
react_cxxstableapi
2627
react_debug
2728
react_renderer_core
2829
react_renderer_debug

packages/react-native/ReactCommon/react/renderer/mounting/Differentiator.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/FrameworksGuard.h>
11+
1012
#include <react/renderer/core/ShadowNode.h>
1113
#include <react/renderer/mounting/ShadowViewMutation.h>
1214

packages/react-native/ReactCommon/react/renderer/mounting/MountingCoordinator.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/FrameworksGuard.h>
11+
1012
#include <chrono>
1113
#include <condition_variable>
1214
#include <optional>

packages/react-native/ReactCommon/react/renderer/mounting/MountingOverrideDelegate.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
#include <react/cxxstableapi/FrameworksGuard.h>
9+
810
#include <react/renderer/mounting/MountingTransaction.h>
911

1012
#pragma once

packages/react-native/ReactCommon/react/renderer/mounting/MountingTransaction.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/FrameworksGuard.h>
11+
1012
#include <react/renderer/mounting/ShadowViewMutation.h>
1113
#include <react/renderer/telemetry/SurfaceTelemetry.h>
1214
#include <react/renderer/telemetry/TransactionTelemetry.h>

packages/react-native/ReactCommon/react/renderer/mounting/ShadowTree.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/FrameworksGuard.h>
11+
1012
#include <memory>
1113
#include <mutex>
1214
#include <shared_mutex>

packages/react-native/ReactCommon/react/renderer/mounting/ShadowTreeDelegate.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/FrameworksGuard.h>
11+
1012
#include <react/renderer/mounting/MountingCoordinator.h>
1113

1214
namespace facebook::react {

packages/react-native/ReactCommon/react/renderer/mounting/ShadowTreeRegistry.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/FrameworksGuard.h>
11+
1012
#include <shared_mutex>
1113
#include <unordered_map>
1214

packages/react-native/ReactCommon/react/renderer/mounting/ShadowTreeRevision.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/FrameworksGuard.h>
11+
1012
#include <react/renderer/components/root/RootShadowNode.h>
1113
#include <react/renderer/mounting/MountingOverrideDelegate.h>
1214
#include <react/renderer/mounting/MountingTransaction.h>

packages/react-native/ReactCommon/react/renderer/mounting/ShadowView.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/FrameworksGuard.h>
11+
1012
#include <react/renderer/core/EventEmitter.h>
1113
#include <react/renderer/core/LayoutMetrics.h>
1214
#include <react/renderer/core/Props.h>

0 commit comments

Comments
 (0)