Remove deprecated rncore.h header (#59228)

Summary:
Pull Request resolved: https://github.com/react/react-native/pull/59228

`rncore.h` is a deprecated forwarding shim left from renaming the core codegen
module to `FBReactNativeSpec`. It only includes `FBReactNativeSpec.h`, aliases
`rncore_ModuleProvider` to `FBReactNativeSpec_ModuleProvider`, and emits a
`#warning` asking callers to migrate. Nothing in the repository includes it any
more, so delete the header, drop it from the Android JNI target's exported
headers, and point the last stale mention in the default app setup comment at
the supported symbol.

Changelog:
[Android][Breaking] - Remove deprecated `rncore.h`; include `FBReactNativeSpec.h` and call `FBReactNativeSpec_ModuleProvider` instead

Differential Revision: D126393806

fbshipit-source-id: f19f54eb769b1f86f5e7bfedfd8f34881fe103c0
This commit is contained in:
Pieter De Baets authored and meta-codesync[bot] committed 2026-10-20 07:39:48 -07:00
1 parent 935b952810
commit d63648bac6
6 files changed
+1 -25

No files matched your search

@@ -88,7 +88,7 @@ std::shared_ptr<TurboModule> javaModuleProvider(
// if (module != nullptr) {
// return module;
// }
// return rncore_ModuleProvider(name, params);
// return FBReactNativeSpec_ModuleProvider(name, params);
// We link app local modules if available
#ifdef REACT_NATIVE_APP_MODULE_PROVIDER
@@ -1,20 +0,0 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <FBReactNativeSpec.h>
#warning \
"[DEPRECATION] `rncore.h` is deprecated and will be removed in the future. \
If this warning appears due to a library, please open an issue in that library, and ask for an update. \
Please, replace the `#include <rncore.h>` statements with `#include <FBReactNativeSpec.h>` \
and update calls of `rncore_ModuleProvider` with `FBReactNativeSpec_ModuleProvider`."
namespace facebook::react {
constexpr auto rncore_ModuleProvider = FBReactNativeSpec_ModuleProvider;
}
@@ -375,7 +375,6 @@ struct facebook::hermes::ISetEventLoopControl : public facebook::jsi::ICast {
const char facebook::react::ViewComponentName[];
const facebook::react::EventTag facebook::react::EMPTY_EVENT_TAG;
constexpr auto facebook::react::rncore_ModuleProvider;
constexpr facebook::react::ReactNativeVersionType facebook::react::ReactNativeVersion;
constexpr facebook::react::Tag facebook::react::kNoTag;
constexpr uint32_t facebook::react::INITIAL_BUCKETS_SIZE;
@@ -386,7 +386,6 @@ const char facebook::react::TextComponentName[];
const char facebook::react::ViewComponentName[];
const facebook::react::EventTag facebook::react::EMPTY_EVENT_TAG;
constexpr auto facebook::react::kSimpleThreadSafeCacheSizeCap;
constexpr auto facebook::react::rncore_ModuleProvider;
constexpr char facebook::react::LayoutConformanceShadowNodeComponentName[];
constexpr char* const facebook::react::TextLayoutManagerKey;
constexpr facebook::react::ReactNativeVersionType facebook::react::ReactNativeVersion;
@@ -375,7 +375,6 @@ struct facebook::hermes::ISetEventLoopControl : public facebook::jsi::ICast {
const char facebook::react::ViewComponentName[];
const facebook::react::EventTag facebook::react::EMPTY_EVENT_TAG;
constexpr auto facebook::react::rncore_ModuleProvider;
constexpr facebook::react::ReactNativeVersionType facebook::react::ReactNativeVersion;
constexpr facebook::react::Tag facebook::react::kNoTag;
constexpr uint32_t facebook::react::INITIAL_BUCKETS_SIZE;
@@ -375,7 +375,6 @@ struct facebook::hermes::ISetEventLoopControl : public facebook::jsi::ICast {
const char facebook::react::ViewComponentName[];
const facebook::react::EventTag facebook::react::EMPTY_EVENT_TAG;
constexpr auto facebook::react::rncore_ModuleProvider;
constexpr facebook::react::ReactNativeVersionType facebook::react::ReactNativeVersion;
constexpr facebook::react::Tag facebook::react::kNoTag;
constexpr uint32_t facebook::react::INITIAL_BUCKETS_SIZE;