Skip to content

Commit 477e14a

Browse files
j-piaseckimeta-codesync[bot]
authored andcommitted
Cover react/renderer/telemetry with guards (#58301)
Summary: Pull Request resolved: #58301 Classifies `react/renderer/telemetry:telemetry` as a "for frameworks" target under the C++ stable API three-tier visibility model. Adds `#include <react/cxxstableapi/FrameworksGuard.h>` to the module's 2 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] Reviewed By: rubennorte Differential Revision: D118612692 fbshipit-source-id: ef8f9ab90699f272d0592d56dd68550ae3b6f84f
1 parent d9ad3f0 commit 477e14a

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ target_link_libraries(react_renderer_telemetry
1717
folly_runtime
1818
glog
1919
glog_init
20+
react_cxxstableapi
2021
react_debug
2122
react_renderer_core
2223
react_renderer_debug

packages/react-native/ReactCommon/react/renderer/telemetry/SurfaceTelemetry.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 <vector>
1113

1214
#include <react/renderer/telemetry/TransactionTelemetry.h>

packages/react-native/ReactCommon/react/renderer/telemetry/TransactionTelemetry.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 <cstdint>
1214
#include <functional>

0 commit comments

Comments
 (0)