Skip to content

Commit 87cd1c0

Browse files
javachefacebook-github-bot
authored andcommitted
Add rncore stub headers for backwards-compat (#52083)
Summary: Pull Request resolved: #52083 These headers were removed in D55037569 but we may have some targets still depending on them. Add redirection headers with warnings to help users migrate without this being a breaking change. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D76810433 fbshipit-source-id: 43cddcc69eefbcff0c0140e165fb893bee493c79
1 parent 3ea4f15 commit 87cd1c0

7 files changed

Lines changed: 76 additions & 1 deletion

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ vendor/
139139
/packages/react-native/React/FBReactNativeSpec/
140140
/packages/react-native-codegen/lib
141141
/packages/react-native-codegen/tmp/
142-
/packages/react-native/ReactCommon/react/renderer/components/rncore/
143142
/packages/rn-tester/NativeModuleExample/ScreenshotManagerSpec*
144143
/**/RCTThirdPartyFabricComponentsProvider.*
145144

packages/react-native/ReactCommon/React-FabricComponents.podspec

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@ Pod::Spec.new do |s|
129129
sss.exclude_files = "react/renderer/components/unimplementedview/tests"
130130
sss.header_dir = "react/renderer/components/unimplementedview"
131131
end
132+
133+
# Legacy header paths for backwards compat
134+
ss.subspec "rncore" do |sss|
135+
sss.source_files = "react/renderer/components/rncore/**/*.h"
136+
sss.header_dir = "react/renderer/components/rncore"
137+
end
132138
end
133139

134140
s.subspec "textlayoutmanager" do |ss|
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
#include <react/renderer/components/FBReactNativeSpec/States.h>
9+
10+
#warning \
11+
"[DEPRECATION] `react/renderer/components/rncore/States.h` is deprecated and will be \
12+
removed in the future. If this warning appears due to a library, please open an issue \
13+
in that library, and ask for an update. Please, replace the `rncore` imports with \
14+
`FBReactNativeSpec` or remove them entirely.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
#include <react/renderer/components/FBReactNativeSpec/EventEmitters.h>
9+
10+
#warning \
11+
"[DEPRECATION] `react/renderer/components/rncore/EventEmitters.h` is deprecated \
12+
and will be removed in the future. If this warning appears due to a library, \
13+
please open an issue in that library, and ask for an update. Please, replace \
14+
the `rncore` imports with `FBReactNativeSpec` or remove them entirely.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
#include <react/renderer/components/FBReactNativeSpec/Props.h>
9+
10+
#warning \
11+
"[DEPRECATION] `react/renderer/components/rncore/Props.h` is deprecated and will \
12+
be removed in the future. If this warning appears due to a library, please open \
13+
an issue in that library, and ask for an update. Please, replace the `rncore` \
14+
imports with `FBReactNativeSpec` or remove them entirely.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
#include <react/renderer/components/FBReactNativeSpec/ShadowNodes.h>
9+
10+
#warning \
11+
"[DEPRECATION] `react/renderer/components/rncore/ShadowNodes.h` is deprecated and \
12+
will be removed in the future. If this warning appears due to a library, please \
13+
open an issue in that library, and ask for an update. Please, replace the `rncore` \
14+
imports with `FBReactNativeSpec` or remove them entirely.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
#include <react/renderer/components/FBReactNativeSpec/States.h>
9+
10+
#warning \
11+
"[DEPRECATION] `react/renderer/components/rncore/States.h` is deprecated and will be \
12+
removed in the future. If this warning appears due to a library, please open an \
13+
issue in that library, and ask for an update. Please, replace the `rncore` imports \
14+
with `FBReactNativeSpec` or remove them entirely.

0 commit comments

Comments
 (0)