Skip to content

Commit c70163b

Browse files
j-piaseckifacebook-github-bot
authored andcommitted
Cover react/renderer/animations with guards (#58185)
Summary: Classifies `react/renderer/animations:animations` as a "for frameworks" target under the C++ stable API three-tier visibility model. Adds `#include <react/cxxstableapi/FrameworksGuard.h>` to the module's six exported headers (`LayoutAnimationCallbackWrapper.h`, `LayoutAnimationDriver.h`, `LayoutAnimationKeyFrameManager.h`, `conversions.h`, `primitives.h`, `utils.h`), 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: D117863703
1 parent a862ba7 commit c70163b

7 files changed

Lines changed: 13 additions & 0 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ target_link_libraries(react_renderer_animations
1818
glog
1919
glog_init
2020
jsi
21+
react_cxxstableapi
2122
react_debug
2223
react_renderer_componentregistry
2324
react_renderer_core

packages/react-native/ReactCommon/react/renderer/animations/LayoutAnimationCallbackWrapper.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 <jsi/jsi.h>
1113
#include <memory>
1214

packages/react-native/ReactCommon/react/renderer/animations/LayoutAnimationDriver.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/animations/LayoutAnimationKeyFrameManager.h>
1113
#include <react/renderer/core/ReactPrimitives.h>
1214
#include <react/renderer/mounting/ShadowViewMutation.h>

packages/react-native/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.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 <ReactCommon/RuntimeExecutor.h>
1113
#include <react/renderer/animations/LayoutAnimationCallbackWrapper.h>
1214
#include <react/renderer/animations/primitives.h>

packages/react-native/ReactCommon/react/renderer/animations/conversions.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 <glog/logging.h>
1113
#include <react/renderer/animations/primitives.h>
1214

packages/react-native/ReactCommon/react/renderer/animations/primitives.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/animations/LayoutAnimationCallbackWrapper.h>
1113
#include <react/renderer/core/ReactPrimitives.h>
1214
#include <react/renderer/graphics/Float.h>

packages/react-native/ReactCommon/react/renderer/animations/utils.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/animations/primitives.h>
1113
#include <react/renderer/graphics/Float.h>
1214
#include <react/renderer/mounting/ShadowViewMutation.h>

0 commit comments

Comments
 (0)