Skip to content

Remove useTurboModules() overrides from downstream consumers#56899

Open
mdvacca wants to merge 10 commits into
facebook:mainfrom
mdvacca:export-D105718206
Open

Remove useTurboModules() overrides from downstream consumers#56899
mdvacca wants to merge 10 commits into
facebook:mainfrom
mdvacca:export-D105718206

Conversation

@mdvacca
Copy link
Copy Markdown
Contributor

@mdvacca mdvacca commented May 19, 2026

Summary:
The useTurboModules() virtual method is going to be removed from ReactNativeFeatureFlagsDefaults and its default already flipped to true. This diff removes the now-stale useTurboModules() override methods from downstream ReactNativeFeatureFlagsDefaults subclasses so they compile cleanly once the parent method is gone.

Also drops the now-unused enableFabric_ and enableTurboModule_ private fields from the Catalyst wrapper override (FBCWFeatureFlagsSetup.mm) — they were only referenced by the conditional useTurboModules override removed here.

Updates fbobjc/Apps/Instagram/Airwave/CLAUDE.md to drop useTurboModules from the Airwave override doc, matching the override file.

Behavior is unchanged because every override returned true (the value the runtime always takes at this point) and the underlying default is now true as well.

Changelog:
[Internal]

Differential Revision: D105718206

mdvacca added 10 commits May 19, 2026 11:06
Summary:
The `ReactNativeNewArchitectureFeatureFlags.enableFabricRenderer()` flag is being deleted; it always returns true on the canary release stage. The default initializer of `ReactDelegate.isFabricEnabled` reads the flag — change it to `true` directly.

The field itself is preserved because it can be set by the deprecated `(activity, reactNativeHost, appKey, launchOptions, fabricEnabled)` constructor that lets callers override the default.

Behavior is unchanged.

Changelog:
[Internal]

Differential Revision: D105231216
…lags

Summary:
The `enableFabricRenderer()` flag is being removed entirely; it was always set to true in the canary release stage. All callers of `ReactNativeNewArchitectureFeatureFlags.enableFabricRenderer()` were inlined in earlier diffs.

This diff:
- Removes the wrapper method `ReactNativeNewArchitectureFeatureFlags.enableFabricRenderer()`.
- Removes the `override fun enableFabricRenderer(): Boolean = true` from `ReactNativeNewArchitectureFeatureFlagsDefaults`.

Both classes are non-`generated`, so they are edited directly. The next diff will remove the underlying `ReactNativeFeatureFlags.enableFabricRenderer()` API by regenerating the codegen output.

Behavior is unchanged.

Changelog:
[Internal]

Differential Revision: D105231777
Summary:
The `enableFabricRenderer()` virtual method is being removed from `ReactNativeFeatureFlagsDefaults`. This diff removes the now-stale `enableFabricRenderer() override` methods from downstream `ReactNativeFeatureFlagsDefaults` subclasses so they compile cleanly once the parent method is gone.

Also removes the now-unused `enableFabric` parameter from `createFBReactModuleDefaultsFeatureFlagsProvider` and its single caller.

Behavior is unchanged because every override returned `true` (the value the runtime always took at this point) and no other code path depends on the flag.

Changelog:
[Internal]

Differential Revision: D105347594
Summary:
The `enableFabricRenderer` feature flag has been removed; it was always set to true on the canary release stage and there are no remaining callers (all inlined in earlier diffs of this stack).

This diff:
- Removes the `enableFabricRenderer` entry from `ReactNativeFeatureFlags.config.js`.
- Updates the description of `enableBridgelessArchitecture` (which referenced `enableFabricRenderer`).
- Regenerates the codegen output: the 7 Kotlin `generated` files in `ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/`, the C++ headers and implementations under `ReactCommon/react/featureflags/` and `ReactCommon/react/nativemodule/featureflags/`, the JNI bridge under `ReactAndroid/src/main/jni/react/featureflags/`, and the JS modules under `src/private/featureflags/`.

The flag is in the `com.facebook.react.internal.featureflags` package and is excluded from `ReactAndroid.api` tracking; no API metadata regeneration is needed.

Behavior is unchanged.

Changelog:
[Android][Removed] - Remove `enableFabricRenderer` feature flag — Fabric is now always enabled

Differential Revision: D105232652
Summary:
The `useTurboModules` flag is being deleted; it always returns true on the canary release stage. The DEBUG-gated assertion in `ReactHostImpl.getOrCreateStartTask()` is therefore tautological — remove it.

The `enableBridgelessArchitecture` assertion immediately above stays.

Behavior is unchanged.

Changelog:
[Internal]

Differential Revision: D105718211
Summary:
The `useTurboModules` flag is being deleted; it always returns true on the canary release stage. The iterator in `BaseReactPackage.getNativeModuleIterator()` filters out TurboModules when the flag is on — drop the flag check and always filter.

Also drop the now-unused `ReactNativeNewArchitectureFeatureFlags` import.

Behavior is unchanged.

Changelog:
[Internal]

Differential Revision: D105718204
…ntryPoint.loadWithFeatureFlags

Summary:
The `useTurboModules` flag is being deleted; it always returns true on the canary release stage. The internal `DefaultNewArchitectureEntryPoint.loadWithFeatureFlags()` reads `featureFlags.useTurboModules()` into `privateTurboModulesEnabled` — replace the read with a literal `true`.

This matches the existing treatment of `fabricEnabled` and `concurrentReactEnabled`, which are already always `true`.

Behavior is unchanged.

Changelog:
[Internal]

Differential Revision: D105718209
Summary:
The `useTurboModules()` flag is being removed entirely; it was always set to true in the canary release stage. All callers of `ReactNativeNewArchitectureFeatureFlags.useTurboModules()` were inlined in earlier diffs.

This diff:
- Removes the wrapper method `ReactNativeNewArchitectureFeatureFlags.useTurboModules()`.
- Removes the `override fun useTurboModules(): Boolean = true` from `ReactNativeNewArchitectureFeatureFlagsDefaults`.

Both classes are non-`generated`, so they are edited directly. A follow-up diff will flip the underlying `ReactNativeFeatureFlags.useTurboModules()` default to `true` and ultimately remove the API by regenerating the codegen output.

Behavior is unchanged.

Changelog:
[Internal]

Differential Revision: D105718202
Summary:
TurboModules have been the only supported NativeModule execution mode for all in-prod apps for a while; every internal override hardcodes `useTurboModules()` to `true`. Flip the underlying default in `ReactNativeFeatureFlags.config.js` from `false` to `true` so that any consumer that does not explicitly override the flag also gets the modern behavior.

Generated files updated by `js1 featureflags --update`:
- `ReactNativeFeatureFlagsDefaults.kt` (Kotlin default)
- `ReactNativeFeatureFlagsDefaults.h` (C++ default)
- `ReactNativeFeatureFlags.js` (JS default)

No interface or accessor signatures changed.

Changelog:
[General][Changed] - The default value of the `useTurboModules` ReactNativeFeatureFlags flag is now `true`

Differential Revision: D105718212
Summary:
The `useTurboModules()` virtual method is going to be removed from `ReactNativeFeatureFlagsDefaults` and its default already flipped to `true`. This diff removes the now-stale `useTurboModules() override` methods from downstream `ReactNativeFeatureFlagsDefaults` subclasses so they compile cleanly once the parent method is gone.

Also drops the now-unused `enableFabric_` and `enableTurboModule_` private fields from the Catalyst wrapper override (`FBCWFeatureFlagsSetup.mm`) — they were only referenced by the conditional `useTurboModules` override removed here.

Updates `fbobjc/Apps/Instagram/Airwave/CLAUDE.md` to drop `useTurboModules` from the Airwave override doc, matching the override file.

Behavior is unchanged because every override returned `true` (the value the runtime always takes at this point) and the underlying default is now `true` as well.

Changelog:
[Internal]

Differential Revision: D105718206
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 19, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented May 19, 2026

@mdvacca has exported this pull request. If you are a Meta employee, you can view the originating Diff in D105718206.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant