Skip to content

Commit 562fe34

Browse files
christophpurrermeta-codesync[bot]
authored andcommitted
Remove Fabric and TurboModule dead config (#58434)
Summary: Pull Request resolved: #58434 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 Reviewed By: javache Differential Revision: D119380472 fbshipit-source-id: 19c130c3dda5c1cd6d541f4e726d8041b515c05c
1 parent 2771618 commit 562fe34

7 files changed

Lines changed: 0 additions & 26 deletions

File tree

packages/react-native/Libraries/AppDelegate/RCTAppDelegate.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ NS_ASSUME_NONNULL_BEGIN
4747
* - (UIViewController *)createRootViewController;
4848
* - (void)setRootView:(UIView *)rootView toRootViewController:(UIViewController *)rootViewController;
4949
* New Architecture:
50-
* - (BOOL)turboModuleEnabled;
51-
* - (BOOL)fabricEnabled;
5250
* - (NSDictionary *)prepareInitialProps
5351
* - (Class)getModuleClassFromName:(const char *)name
5452
* - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name

packages/react-native/Libraries/AppDelegate/RCTDefaultReactNativeFactoryDelegate.mm

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -116,16 +116,6 @@ - (BOOL)newArchEnabled
116116
return YES;
117117
}
118118

119-
- (BOOL)fabricEnabled
120-
{
121-
return YES;
122-
}
123-
124-
- (BOOL)turboModuleEnabled
125-
{
126-
return YES;
127-
}
128-
129119
- (Class)getModuleClassFromName:(const char *)name
130120
{
131121
return nullptr;

packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,6 @@ typedef void (^RCTLoadSourceForBridgeBlock)(RCTBridge *bridge, RCTSourceLoadBloc
4343
#pragma mark - RCTRootViewFactory Configuration
4444
@interface RCTRootViewFactoryConfiguration : NSObject
4545

46-
/// This property controls whether the App will use the Fabric renderer of the New Architecture or not.
47-
@property (nonatomic, assign, readonly) BOOL fabricEnabled;
48-
49-
/// This method controls whether the `turboModules` feature of the New Architecture is turned on or off
50-
@property (nonatomic, assign, readonly) BOOL turboModuleEnabled;
51-
5246
/// Return the bundle URL for the main bundle.
5347
@property (nonatomic, nonnull) RCTBundleURLBlock bundleURLBlock;
5448

packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.mm

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ - (instancetype)initWithBundleURLBlock:(RCTBundleURLBlock)bundleURLBlock
4646
{
4747
if (self = [super init]) {
4848
_bundleURLBlock = bundleURLBlock;
49-
_fabricEnabled = YES;
50-
_turboModuleEnabled = YES;
5149
}
5250
return self;
5351
}

scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,8 +1693,6 @@ interface RCTRootViewFactoryConfiguration : public NSObject {
16931693
public @property (assign) RCTLoadSourceForBridgeBlock loadSourceForBridge;
16941694
public @property (assign) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress;
16951695
public @property (assign) RCTSourceURLForBridgeBlock sourceURLForBridge;
1696-
public @property (assign, readonly) BOOL fabricEnabled;
1697-
public @property (assign, readonly) BOOL turboModuleEnabled;
16981696
public @property (weak) id<RCTJSRuntimeConfiguratorProtocol> jsRuntimeConfiguratorDelegate;
16991697
public virtual instancetype initWithBundleURL:newArchEnabled:(NSURL* bundleURL, BOOL newArchEnabled);
17001698
public virtual instancetype initWithBundleURLBlock:newArchEnabled:(RCTBundleURLBlock bundleURLBlock, BOOL newArchEnabled);

scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1692,8 +1692,6 @@ interface RCTRootViewFactoryConfiguration : public NSObject {
16921692
public @property (assign) RCTLoadSourceForBridgeBlock loadSourceForBridge;
16931693
public @property (assign) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress;
16941694
public @property (assign) RCTSourceURLForBridgeBlock sourceURLForBridge;
1695-
public @property (assign, readonly) BOOL fabricEnabled;
1696-
public @property (assign, readonly) BOOL turboModuleEnabled;
16971695
public @property (weak) id<RCTJSRuntimeConfiguratorProtocol> jsRuntimeConfiguratorDelegate;
16981696
public virtual instancetype initWithBundleURL:newArchEnabled:(NSURL* bundleURL, BOOL newArchEnabled);
16991697
public virtual instancetype initWithBundleURLBlock:newArchEnabled:(RCTBundleURLBlock bundleURLBlock, BOOL newArchEnabled);

scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,8 +1693,6 @@ interface RCTRootViewFactoryConfiguration : public NSObject {
16931693
public @property (assign) RCTLoadSourceForBridgeBlock loadSourceForBridge;
16941694
public @property (assign) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress;
16951695
public @property (assign) RCTSourceURLForBridgeBlock sourceURLForBridge;
1696-
public @property (assign, readonly) BOOL fabricEnabled;
1697-
public @property (assign, readonly) BOOL turboModuleEnabled;
16981696
public @property (weak) id<RCTJSRuntimeConfiguratorProtocol> jsRuntimeConfiguratorDelegate;
16991697
public virtual instancetype initWithBundleURL:newArchEnabled:(NSURL* bundleURL, BOOL newArchEnabled);
17001698
public virtual instancetype initWithBundleURLBlock:newArchEnabled:(RCTBundleURLBlock bundleURLBlock, BOOL newArchEnabled);

0 commit comments

Comments
 (0)