Delete ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture wrapper method#57001
Open
mdvacca wants to merge 3 commits into
Open
Delete ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture wrapper method#57001mdvacca wants to merge 3 commits into
ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture wrapper method#57001mdvacca wants to merge 3 commits into
Conversation
…le call sites (facebook#56999) Summary: Second in a stack that collapses Android-side branches on `ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture()` under the standing assumption that on Android the flag is always `true`. The underlying generated `ReactNativeFeatureFlags.enableBridgelessArchitecture()` is untouched. Scope of this commit — ReactAndroid simple call sites: - `DevSupportManagerBase` — drop the flag from the AND chain that gates `PerfMonitorOverlayManager` creation. - `HeadlessJsTaskService.reactContext` getter and `createReactContextAndScheduleTask` — keep the `reactHost` branches; drop the `reactInstanceManager` fallbacks. - `ViewManager.getNativeProps` — drop the flag from the AND with `UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE`. - `ReactImageView` — delete the `warnImageSource` helper and its two call sites. The helper existed only to emit a debug warning that was already gated off in bridgeless mode. - `ReactEditText.onConfigurationChanged` — drop the flag from the AND with `enableFontScaleChangesUpdatingLayout`. - `ReactHostImpl.getOrCreateStartTask` — drop the always-true debug assertion. - `DefaultNewArchitectureEntryPoint.loadWithFeatureFlags` — set `privateBridgelessEnabled = true` directly (was reading from the provider). - `ReactPackageTurboModuleManagerDelegate.shouldEnableLegacyModuleInterop` — drop the flag from the AND with `useTurboModuleInterop`. No public API surfaces change. `arc f` auto-removed the now-unused `ReactNativeNewArchitectureFeatureFlags` imports in the affected files. Subsequent diffs in the stack will handle: `ReactDelegate` + deprecated constructors + `reactNativeHost` field; wrapper method + lint detector. Changelog: [Internal] Reviewed By: christophpurrer Differential Revision: D106719839
…yDelegate` / `ReactActivity` / `ReactFragment` (facebook#57000) Summary: Third in a stack that collapses Android-side branches on `ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture()` under the standing assumption that on Android the flag is always `true`. The underlying generated `ReactNativeFeatureFlags.enableBridgelessArchitecture()` is untouched. This is the cascade cleanup: with every lifecycle method in `ReactDelegate` always taking the `ReactHost` path, the fields, constructors, and helper methods that exist only to support the `ReactNativeHost`/`ReactInstanceManager` (bridge) path are now dead. Removed from `ReactDelegate`: - The deprecated 4-arg `(Activity, ReactNativeHost?, String?, Bundle?)` constructor - The deprecated 5-arg `(Activity, ReactNativeHost?, String?, Bundle?, Boolean)` constructor - `getReactInstanceManager()` (was reading through the removed `ReactNativeHost`) - `createRootView()` (only the legacy `loadApp` branch called it) - `isFabricEnabled` (only `createRootView` read it) - `internalReactRootView` field and the corresponding `reactRootView` setter (the property is now a `val` returning `reactSurface?.view`) - The private `reactNativeHost` field Every public lifecycle method (`onHostResume`, `onUserLeaveHint`, `onHostPause`, `onHostDestroy`, `onBackPressed`, `onNewIntent`, `onActivityResult`, `onWindowFocusChanged`, `onConfigurationChanged`, `onKeyDown`, `onKeyLongPress`, `reload`, `loadApp`, `unloadApp`, `currentReactContext`) collapses to the `ReactHost`-only path. Removed from `ReactActivityDelegate`: - `getReactNativeHost()` and `getReactInstanceManager()` (both deprecated, fed the dead `ReactDelegate` machinery) - `setReactRootView(ReactRootView)` (matched the removed `ReactDelegate.reactRootView` setter) - The non-bridgeless branch in `onCreate` (the anonymous-subclass override of `createRootView` goes with it) - The non-bridgeless branch in `onRequestPermissionsResult` Removed from `ReactActivity`: - `getReactNativeHost()` and `getReactInstanceManager()` (matched the delegate removals) Removed from `ReactFragment`: - The `reactNativeHost` property - The non-bridgeless branch in `onCreate` (the `ARG_FABRIC_ENABLED` argument is now ignored; the constant + Builder API remain for backward compatibility) `ReactAndroid.api` regenerated to reflect the 12 removed public/protected methods. `arc f` auto-removed the now-unused `ReactNativeNewArchitectureFeatureFlags` imports. Subsequent diff in the stack will handle the wrapper method + lint detector. Changelog: [Android][Breaking] - Remove deprecated `ReactDelegate(Activity, ReactNativeHost, String, Bundle)` and `ReactDelegate(Activity, ReactNativeHost, String, Bundle, boolean)` constructors. Use the `ReactHost` constructor instead. [Android][Breaking] - Remove `ReactDelegate.getReactInstanceManager()`, `ReactDelegate.createRootView()`, `ReactDelegate.isFabricEnabled`, and the `ReactDelegate.reactRootView` setter. [Android][Breaking] - Remove `ReactActivityDelegate.getReactNativeHost()`, `ReactActivityDelegate.getReactInstanceManager()`, and `ReactActivityDelegate.setReactRootView(ReactRootView)`. Use `getReactHost()` and `setReactSurface(ReactSurface)` instead. [Android][Breaking] - Remove `ReactActivity.getReactNativeHost()` and `ReactActivity.getReactInstanceManager()`. Use `getReactHost()` instead. [Android][Breaking] - Remove `ReactFragment.reactNativeHost` property. Use `reactHost` instead. Reviewed By: christophpurrer Differential Revision: D106719840
…ecture` wrapper method Summary: Final cleanup in the stack. All Android call sites of the wrapper have moved to the bridgeless-only path in the earlier diffs of this stack, so the wrapper method is unused and can be deleted. The surrounding `ReactNativeNewArchitectureFeatureFlags` object stays — `useFabricInterop()` and `useTurboModuleInterop()` still live there. Also: - Drop the `"enableBridgelessArchitecture"` entry from `UseReactNativeNewArchitectureFeatureFlagDetector` — the wrapper for that flag no longer exists, so the lint rule is moot for it. - Update the detector's tests to exercise `useFabricInterop` (still tracked by the detector) instead of `enableBridgelessArchitecture`. The underlying generated `ReactNativeFeatureFlags.enableBridgelessArchitecture()` is untouched. `ReactAndroid.api` is unchanged because the wrapper lives in an `internal` package which is excluded from public API tracking. Changelog: [Internal] Differential Revision: D106719841
|
@mdvacca has exported this pull request. If you are a Meta employee, you can view the originating Diff in D106719841. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Final cleanup in the stack. All Android call sites of the wrapper have moved to the bridgeless-only path in the earlier diffs of this stack, so the wrapper method is unused and can be deleted. The surrounding
ReactNativeNewArchitectureFeatureFlagsobject stays —useFabricInterop()anduseTurboModuleInterop()still live there.Also:
"enableBridgelessArchitecture"entry fromUseReactNativeNewArchitectureFeatureFlagDetector— the wrapper for that flag no longer exists, so the lint rule is moot for it.useFabricInterop(still tracked by the detector) instead ofenableBridgelessArchitecture.The underlying generated
ReactNativeFeatureFlags.enableBridgelessArchitecture()is untouched.ReactAndroid.apiis unchanged because the wrapper lives in aninternalpackage which is excluded from public API tracking.Changelog: [Internal]
Differential Revision: D106719841