From 4e1d386dfebac457d27eaad389f66b7a2c2141c8 Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Fri, 11 Sep 2026 17:47:17 -0700 Subject: [PATCH] Remove Fabric and TurboModule dead config (#58434) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: Follow-up to D116318829, addressing rubennorte's review comment. Fabric and TurboModules shipped before bridgeless and are always on, so the toggles for them were hardcoded and read nowhere. Android, `DefaultNewArchitectureEntryPoint` — now only selects the release channel and loads the SO: - removed `fabricEnabled`, `turboModulesEnabled`, `concurrentReactEnabled` - removed the deprecated `load(turboModulesEnabled)` and `load(turboModulesEnabled, fabricEnabled)` overloads - removed `isConfigurationValid`, and with it `DefaultNewArchitectureEntryPointTest` (every test targeted it) - updated the 8 in-repo call sites that passed `fabricEnabled` into the deprecated 3-arg `DefaultReactActivityDelegate` constructor, which discarded it iOS: - removed `fabricEnabled` / `turboModuleEnabled` from `RCTRootViewFactoryConfiguration` - removed the corresponding `RCTDefaultReactNativeFactoryDelegate` stubs and the `RCTAppDelegate.h` doc references `ReactAndroid.api` and the `ReactApple*Cxx.api` snapshots are regenerated. One call site is not updated here: `users/zh/zhaogang/benchmarks/SimpleRN/android/app/src/main/java/com/simplern/MainActivity.kt` still imports `DefaultNewArchitectureEntryPoint.fabricEnabled`. It is a personal benchmark app under `users/` that is not materialized in this working copy, so it could not be edited. Changelog: [General][Breaking] - Remove the `fabricEnabled` / `turboModulesEnabled` / `concurrentReactEnabled` accessors and remaining deprecated `load` overloads from `DefaultNewArchitectureEntryPoint`, and the `fabricEnabled` / `turboModuleEnabled` properties from `RCTRootViewFactoryConfiguration`; Fabric and TurboModules are always enabled https://www.internalfb.com/agent-home?session_id=dmh-2bfbb113-43fc-4bc4-819d-874c5101a1c8 Differential Revision: D119380472 --- .../Libraries/AppDelegate/RCTAppDelegate.h | 2 -- .../RCTDefaultReactNativeFactoryDelegate.mm | 10 ---------- .../Libraries/AppDelegate/RCTRootViewFactory.h | 6 ------ .../Libraries/AppDelegate/RCTRootViewFactory.mm | 2 -- scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api | 2 -- scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api | 2 -- scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api | 2 -- 7 files changed, 26 deletions(-) diff --git a/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.h b/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.h index 4a4eb3fa1756..1dc6adb18c64 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.h +++ b/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.h @@ -47,8 +47,6 @@ NS_ASSUME_NONNULL_BEGIN * - (UIViewController *)createRootViewController; * - (void)setRootView:(UIView *)rootView toRootViewController:(UIViewController *)rootViewController; * New Architecture: - * - (BOOL)turboModuleEnabled; - * - (BOOL)fabricEnabled; * - (NSDictionary *)prepareInitialProps * - (Class)getModuleClassFromName:(const char *)name * - (std::shared_ptr)getTurboModule:(const std::string &)name diff --git a/packages/react-native/Libraries/AppDelegate/RCTDefaultReactNativeFactoryDelegate.mm b/packages/react-native/Libraries/AppDelegate/RCTDefaultReactNativeFactoryDelegate.mm index e502a42a0262..d94631a23d82 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTDefaultReactNativeFactoryDelegate.mm +++ b/packages/react-native/Libraries/AppDelegate/RCTDefaultReactNativeFactoryDelegate.mm @@ -116,16 +116,6 @@ - (BOOL)newArchEnabled return YES; } -- (BOOL)fabricEnabled -{ - return YES; -} - -- (BOOL)turboModuleEnabled -{ - return YES; -} - - (Class)getModuleClassFromName:(const char *)name { return nullptr; diff --git a/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h b/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h index 67517de0700b..000963c81e1a 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h +++ b/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h @@ -43,12 +43,6 @@ typedef void (^RCTLoadSourceForBridgeBlock)(RCTBridge *bridge, RCTSourceLoadBloc #pragma mark - RCTRootViewFactory Configuration @interface RCTRootViewFactoryConfiguration : NSObject -/// This property controls whether the App will use the Fabric renderer of the New Architecture or not. -@property (nonatomic, assign, readonly) BOOL fabricEnabled; - -/// This method controls whether the `turboModules` feature of the New Architecture is turned on or off -@property (nonatomic, assign, readonly) BOOL turboModuleEnabled; - /// Return the bundle URL for the main bundle. @property (nonatomic, nonnull) RCTBundleURLBlock bundleURLBlock; diff --git a/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.mm b/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.mm index 0c15c230aacb..f6569b69ede3 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.mm +++ b/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.mm @@ -46,8 +46,6 @@ - (instancetype)initWithBundleURLBlock:(RCTBundleURLBlock)bundleURLBlock { if (self = [super init]) { _bundleURLBlock = bundleURLBlock; - _fabricEnabled = YES; - _turboModuleEnabled = YES; } return self; } diff --git a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api index 4cb8f69152e0..f87beedbb67e 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api @@ -1693,8 +1693,6 @@ interface RCTRootViewFactoryConfiguration : public NSObject { public @property (assign) RCTLoadSourceForBridgeBlock loadSourceForBridge; public @property (assign) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress; public @property (assign) RCTSourceURLForBridgeBlock sourceURLForBridge; - public @property (assign, readonly) BOOL fabricEnabled; - public @property (assign, readonly) BOOL turboModuleEnabled; public @property (weak) id jsRuntimeConfiguratorDelegate; public virtual instancetype initWithBundleURL:newArchEnabled:(NSURL* bundleURL, BOOL newArchEnabled); public virtual instancetype initWithBundleURLBlock:newArchEnabled:(RCTBundleURLBlock bundleURLBlock, BOOL newArchEnabled); diff --git a/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api index efcf207217fd..03d25f39e452 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api @@ -1692,8 +1692,6 @@ interface RCTRootViewFactoryConfiguration : public NSObject { public @property (assign) RCTLoadSourceForBridgeBlock loadSourceForBridge; public @property (assign) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress; public @property (assign) RCTSourceURLForBridgeBlock sourceURLForBridge; - public @property (assign, readonly) BOOL fabricEnabled; - public @property (assign, readonly) BOOL turboModuleEnabled; public @property (weak) id jsRuntimeConfiguratorDelegate; public virtual instancetype initWithBundleURL:newArchEnabled:(NSURL* bundleURL, BOOL newArchEnabled); public virtual instancetype initWithBundleURLBlock:newArchEnabled:(RCTBundleURLBlock bundleURLBlock, BOOL newArchEnabled); diff --git a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api index fe198bfd356b..1a3b9fcda354 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api @@ -1693,8 +1693,6 @@ interface RCTRootViewFactoryConfiguration : public NSObject { public @property (assign) RCTLoadSourceForBridgeBlock loadSourceForBridge; public @property (assign) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress; public @property (assign) RCTSourceURLForBridgeBlock sourceURLForBridge; - public @property (assign, readonly) BOOL fabricEnabled; - public @property (assign, readonly) BOOL turboModuleEnabled; public @property (weak) id jsRuntimeConfiguratorDelegate; public virtual instancetype initWithBundleURL:newArchEnabled:(NSURL* bundleURL, BOOL newArchEnabled); public virtual instancetype initWithBundleURLBlock:newArchEnabled:(RCTBundleURLBlock bundleURLBlock, BOOL newArchEnabled);