Skip to content

Commit 94566e2

Browse files
j-piaseckimeta-codesync[bot]
authored andcommitted
Cover react/renderer/observers/events:events with Stable API guards (#58121)
Summary: Pull Request resolved: #58121 Classifies `react/renderer/observers/events:events` as a private target under the C++ stable API three-tier visibility model. Adds `#include <react/cxxstableapi/PrivateGuard.h>` to the module's only exported header (`EventPerformanceLogger.h`), and wires the guard dependency into BUCK and CMake. On iOS the module ships as the `React-Fabric/observers/events` subspec, and the parent `React-Fabric` spec already depends on `React-cxxstableapi` from an earlier migration, so no podspec change is needed. `Scheduler.h` is a "for frameworks" header that still includes `EventPerformanceLogger.h`, so the module is not cleanly private until that include is replaced with a forward declaration. That change is in review separately (D116909093) and can land in either order relative to this one, since the guards are inert on their own. The guards are inert unless a consumer defines `RN_STRICT_API`, so there is no behavior change. Changelog: [Internal] Reviewed By: christophpurrer Differential Revision: D117320589 fbshipit-source-id: 4e17fb4d25b1a51b2c06391d77cbe071b01ac3ab
1 parent 60b08c6 commit 94566e2

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

packages/react-native/ReactCommon/react/renderer/observers/events/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ add_library(react_renderer_observers_events OBJECT ${react_renderer_observers_ev
1313

1414
target_include_directories(react_renderer_observers_events PUBLIC ${REACT_COMMON_DIR})
1515
target_link_libraries(react_renderer_observers_events
16+
react_cxxstableapi
1617
react_debug
1718
react_performance_timeline
1819
react_timing

packages/react-native/ReactCommon/react/renderer/observers/events/EventPerformanceLogger.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
#include <react/performance/timeline/PerformanceEntryReporter.h>
1113
#include <react/renderer/core/EventLogger.h>
1214
#include <react/renderer/runtimescheduler/RuntimeSchedulerEventTimingDelegate.h>

0 commit comments

Comments
 (0)