Skip to content

Commit 5464221

Browse files
j-piaseckimeta-codesync[bot]
authored andcommitted
Cover cxxreact:bridge with Stable API guards (#58404)
Summary: Pull Request resolved: #58404 Classifies `cxxreact:bridge` as a private target under the three-tier C++ stable API visibility model. Consumers that opt into `RN_STRICT_API` now get an error if they include its headers directly; without that flag the guards are inert, so no existing build changes behaviour. `ReactNativeVersion.h` is a generated file, so its guard also goes into `scripts/releases/templates/ReactNativeVersion.h-template.js`; without that the next version stamp would rewrite the header and silently drop the guard from every release and nightly artifact. Changelog: [Internal] Reviewed By: javache Differential Revision: D119163927 fbshipit-source-id: 9d436770753079448173e3bcb8d4d5e9c13ae8e3
1 parent ad3ed6e commit 5464221

13 files changed

Lines changed: 28 additions & 0 deletions

File tree

‎packages/react-native/ReactCommon/cxxreact/CxxNativeModule.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
#ifndef RCT_REMOVE_LEGACY_ARCH
1113

1214
#include <cxxreact/CxxModule.h>

‎packages/react-native/ReactCommon/cxxreact/Instance.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
#ifndef RCT_REMOVE_LEGACY_ARCH
1113

1214
#include <condition_variable>

‎packages/react-native/ReactCommon/cxxreact/JSExecutor.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 <memory>
1113
#include <string>
1214

‎packages/react-native/ReactCommon/cxxreact/JSModulesUnbundle.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
#ifndef RCT_REMOVE_LEGACY_ARCH
1113

1214
#include <cstdint>

‎packages/react-native/ReactCommon/cxxreact/MethodCall.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
#ifndef RCT_REMOVE_LEGACY_ARCH
1113

1214
#include <map>

‎packages/react-native/ReactCommon/cxxreact/ModuleRegistry.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
#ifndef RCT_REMOVE_LEGACY_ARCH
1113

1214
#include <memory>

‎packages/react-native/ReactCommon/cxxreact/NativeModule.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 <string>
1113
#include <vector>
1214

‎packages/react-native/ReactCommon/cxxreact/NativeToJsBridge.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
#ifndef RCT_REMOVE_LEGACY_ARCH
1113

1214
#include <atomic>

‎packages/react-native/ReactCommon/cxxreact/RAMBundleRegistry.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
#ifndef RCT_REMOVE_LEGACY_ARCH
1113

1214
#include <cstdint>

‎packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
#pragma once
1111

12+
#include <react/cxxstableapi/PrivateGuard.h>
13+
1214
#include <cstdint>
1315
#include <string_view>
1416

0 commit comments

Comments
 (0)