-
Notifications
You must be signed in to change notification settings - Fork 47.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unify feature flags between fb and oss for React Native renderer #28269
unify feature flags between fb and oss for React Native renderer #28269
Conversation
Comparing: bfdc12c...329f58d Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show |
d1a0f59
to
5813b3d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The right fix for these depends on the flag.
These are good:
enableUnifiedSyncLane
debugRenderPhaseSideEffectsForStrictMode
These need to land at FB
The right fix for these to to land them at FB, not change them in OSS.
allowConcurrentByDefault
: RN OSS shouldn't use concurrent by default. This is only on in RN FB because landing it breaks relay tests. We should fix the relay tests and turn this off at FB.alwaysThrottleRetries
- do we have a plan to land this? What was the regression and was it FB specific? RN OSS isn't using suspense so I think we should leave this on.enableDeferRootSchedulingToMicrotask
- we should land this at FB and keep the OSS one on.
These are experimental, should stay enabled in Fb build
These are experimental and should stay on in the FB builds so we can catch any unintentional regressions. If the changes are limited to only when the API is used, then keeping this on internally is harmless. But if there are, and we miss them, turning it on later could be difficult
enableCPUSuspense
enableCacheElement
Can't turn on 19 features
These are 19 features that will break paper, so we need to decide what to do here. Turning it off at FB doesn't seem like the right move, since FB is on 19 already. We should roll the feature out to RN OSS in 19:
disableModulePatternComponents
enableUseDeferredValueInitialArg
Not sure about these
enableLegacyHidden
: what does this do? Is it a breaking change to turn it off?enableUseMemoCacheHook
: we have not decided whether we're including this in the 19 release in OSS yet. It's only experimental in React, so we shouldn't ship it to RN OSS yet.
4e81bba
to
8c6b970
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks for doing this!
8c6b970
to
c00f61f
Compare
c00f61f
to
329f58d
Compare
### React upstream changes - facebook/react#28333 - facebook/react#28334 - facebook/react#28378 - facebook/react#28377 - facebook/react#28376 - facebook/react#28338 - facebook/react#28331 - facebook/react#28336 - facebook/react#28320 - facebook/react#28317 - facebook/react#28375 - facebook/react#28367 - facebook/react#28380 - facebook/react#28368 - facebook/react#28343 - facebook/react#28355 - facebook/react#28374 - facebook/react#28362 - facebook/react#28344 - facebook/react#28339 - facebook/react#28353 - facebook/react#28346 - facebook/react#25790 - facebook/react#28352 - facebook/react#28326 - facebook/react#27688 - facebook/react#28329 - facebook/react#28332 - facebook/react#28340 - facebook/react#28327 - facebook/react#28325 - facebook/react#28324 - facebook/react#28309 - facebook/react#28310 - facebook/react#28307 - facebook/react#28306 - facebook/react#28315 - facebook/react#28318 - facebook/react#28226 - facebook/react#28308 - facebook/react#27563 - facebook/react#28297 - facebook/react#28286 - facebook/react#28284 - facebook/react#28275 - facebook/react#28145 - facebook/react#28301 - facebook/react#28224 - facebook/react#28152 - facebook/react#28296 - facebook/react#28294 - facebook/react#28279 - facebook/react#28273 - facebook/react#28269 - facebook/react#28376 - facebook/react#28338 - facebook/react#28331 - facebook/react#28336 - facebook/react#28320 - facebook/react#28317 - facebook/react#28375 - facebook/react#28367 - facebook/react#28380 - facebook/react#28368 - facebook/react#28343 - facebook/react#28355 - facebook/react#28374 - facebook/react#28362 - facebook/react#28344 - facebook/react#28339 - facebook/react#28353 - facebook/react#28346 - facebook/react#25790 - facebook/react#28352 - facebook/react#28326 - facebook/react#27688 - facebook/react#28329 - facebook/react#28332 - facebook/react#28340 - facebook/react#28327 - facebook/react#28325 - facebook/react#28324 - facebook/react#28309 - facebook/react#28310 - facebook/react#28307 - facebook/react#28306 - facebook/react#28315 - facebook/react#28318 - facebook/react#28226 - facebook/react#28308 - facebook/react#27563 - facebook/react#28297 - facebook/react#28286 - facebook/react#28284 - facebook/react#28275 - facebook/react#28145 - facebook/react#28301 - facebook/react#28224 - facebook/react#28152 - facebook/react#28296 - facebook/react#28294 - facebook/react#28279 - facebook/react#28273 - facebook/react#28269 Closes NEXT-2542 Disable ppr test for strict mode for now, @acdlite will check it and we'll sync again
…ebook#28269) # Affected flags: ### alwaysThrottleRetries In RN OSS changed from `true` to `false`. This is what FB build uses. This flag was a root cause for big perf regression internally. ### enableDeferRootSchedulingToMicrotask In RN OSS build changed from `true` to `false`. This is what FB build uses. ### debugRenderPhaseSideEffectsForStrictMode Changed from true to __DEV__ in FB and OSS build. The flag is only used in debug builds and was previously `false` in RN OSS builds ### enableUnifiedSyncLane Changed from `__VARIANT__` to `true` in FB build. This is what OSS build uses. This flag is shipped internally. cc @tyao1 ### enableLegacyHidden In RN FB changed from `true` to `false`. This is what OSS uses. ### allowConcurrentByDefault In RN FB changed from `true` to `false`. I ran `yarn flags --diff rn rn-fb` to get the difference between feature flags and unify them. ## Before ``` yarn run v1.22.19 $ node ./scripts/flags/flags.js --diff rn rn-fb ┌───────────────────────────────────────────────┬────────┬───────┐ │ (index) │ RN OSS │ RN FB │ ├───────────────────────────────────────────────┼────────┼───────┤ │ allowConcurrentByDefault │ '❌' │ '✅' │ │ debugRenderPhaseSideEffectsForStrictMode │ '❌' │ '✅' │ │ disableModulePatternComponents │ '❌' │ '✅' │ │ enableCPUSuspense │ '❌' │ '✅' │ │ enableCacheElement │ '❌' │ '✅' │ │ enableGetInspectorDataForInstanceInProduction │ '❌' │ '✅' │ │ enableLegacyHidden │ '❌' │ '✅' │ │ enableSchedulingProfiler │ '❌' │ '📊' │ │ enableUseDeferredValueInitialArg │ '❌' │ '✅' │ │ enableUseMemoCacheHook │ '❌' │ '✅' │ │ enableUseRefAccessWarning │ '❌' │ '🧪' │ │ passChildrenWhenCloningPersistedNodes │ '❌' │ '🧪' │ │ useMicrotasksForSchedulingInFabric │ '❌' │ '🧪' │ │ alwaysThrottleRetries │ '✅' │ '🧪' │ │ enableDeferRootSchedulingToMicrotask │ '✅' │ '🧪' │ │ enableUnifiedSyncLane │ '✅' │ '🧪' │ └───────────────────────────────────────────────┴────────┴───────┘ ``` ## After ``` yarn run v1.22.19 $ node ./scripts/flags/flags.js --diff rn rn-fb ┌───────────────────────────────────────────────┬────────┬───────┐ │ (index) │ RN OSS │ RN FB │ ├───────────────────────────────────────────────┼────────┼───────┤ │ alwaysThrottleRetries │ '❌' │ '🧪' │ │ disableModulePatternComponents │ '❌' │ '✅' │ │ enableCPUSuspense │ '❌' │ '✅' │ │ enableCacheElement │ '❌' │ '✅' │ │ enableDeferRootSchedulingToMicrotask │ '❌' │ '🧪' │ │ enableGetInspectorDataForInstanceInProduction │ '❌' │ '✅' │ │ enableSchedulingProfiler │ '❌' │ '📊' │ │ enableUseDeferredValueInitialArg │ '❌' │ '✅' │ │ enableUseMemoCacheHook │ '❌' │ '✅' │ │ enableUseRefAccessWarning │ '❌' │ '🧪' │ │ passChildrenWhenCloningPersistedNodes │ '❌' │ '🧪' │ │ useMicrotasksForSchedulingInFabric │ '❌' │ '🧪' │ └───────────────────────────────────────────────┴────────┴───────┘ ```
) # Affected flags: ### alwaysThrottleRetries In RN OSS changed from `true` to `false`. This is what FB build uses. This flag was a root cause for big perf regression internally. ### enableDeferRootSchedulingToMicrotask In RN OSS build changed from `true` to `false`. This is what FB build uses. ### debugRenderPhaseSideEffectsForStrictMode Changed from true to __DEV__ in FB and OSS build. The flag is only used in debug builds and was previously `false` in RN OSS builds ### enableUnifiedSyncLane Changed from `__VARIANT__` to `true` in FB build. This is what OSS build uses. This flag is shipped internally. cc @tyao1 ### enableLegacyHidden In RN FB changed from `true` to `false`. This is what OSS uses. ### allowConcurrentByDefault In RN FB changed from `true` to `false`. I ran `yarn flags --diff rn rn-fb` to get the difference between feature flags and unify them. ## Before ``` yarn run v1.22.19 $ node ./scripts/flags/flags.js --diff rn rn-fb ┌───────────────────────────────────────────────┬────────┬───────┐ │ (index) │ RN OSS │ RN FB │ ├───────────────────────────────────────────────┼────────┼───────┤ │ allowConcurrentByDefault │ '❌' │ '✅' │ │ debugRenderPhaseSideEffectsForStrictMode │ '❌' │ '✅' │ │ disableModulePatternComponents │ '❌' │ '✅' │ │ enableCPUSuspense │ '❌' │ '✅' │ │ enableCacheElement │ '❌' │ '✅' │ │ enableGetInspectorDataForInstanceInProduction │ '❌' │ '✅' │ │ enableLegacyHidden │ '❌' │ '✅' │ │ enableSchedulingProfiler │ '❌' │ '📊' │ │ enableUseDeferredValueInitialArg │ '❌' │ '✅' │ │ enableUseMemoCacheHook │ '❌' │ '✅' │ │ enableUseRefAccessWarning │ '❌' │ '🧪' │ │ passChildrenWhenCloningPersistedNodes │ '❌' │ '🧪' │ │ useMicrotasksForSchedulingInFabric │ '❌' │ '🧪' │ │ alwaysThrottleRetries │ '✅' │ '🧪' │ │ enableDeferRootSchedulingToMicrotask │ '✅' │ '🧪' │ │ enableUnifiedSyncLane │ '✅' │ '🧪' │ └───────────────────────────────────────────────┴────────┴───────┘ ``` ## After ``` yarn run v1.22.19 $ node ./scripts/flags/flags.js --diff rn rn-fb ┌───────────────────────────────────────────────┬────────┬───────┐ │ (index) │ RN OSS │ RN FB │ ├───────────────────────────────────────────────┼────────┼───────┤ │ alwaysThrottleRetries │ '❌' │ '🧪' │ │ disableModulePatternComponents │ '❌' │ '✅' │ │ enableCPUSuspense │ '❌' │ '✅' │ │ enableCacheElement │ '❌' │ '✅' │ │ enableDeferRootSchedulingToMicrotask │ '❌' │ '🧪' │ │ enableGetInspectorDataForInstanceInProduction │ '❌' │ '✅' │ │ enableSchedulingProfiler │ '❌' │ '📊' │ │ enableUseDeferredValueInitialArg │ '❌' │ '✅' │ │ enableUseMemoCacheHook │ '❌' │ '✅' │ │ enableUseRefAccessWarning │ '❌' │ '🧪' │ │ passChildrenWhenCloningPersistedNodes │ '❌' │ '🧪' │ │ useMicrotasksForSchedulingInFabric │ '❌' │ '🧪' │ └───────────────────────────────────────────────┴────────┴───────┘ ``` DiffTrain build for commit 36b078c.
Affected flags:
alwaysThrottleRetries
In RN OSS changed from
true
tofalse
. This is what FB build uses. This flag was a root cause for big perf regression internally.enableDeferRootSchedulingToMicrotask
In RN OSS build changed from
true
tofalse
. This is what FB build uses.debugRenderPhaseSideEffectsForStrictMode
Changed from true to DEV in FB and OSS build. The flag is only used in debug builds and was previously
false
in RN OSS buildsenableUnifiedSyncLane
Changed from
__VARIANT__
totrue
in FB build. This is what OSS build uses. This flag is shipped internally. cc @tyao1enableLegacyHidden
In RN FB changed from
true
tofalse
. This is what OSS uses.allowConcurrentByDefault
In RN FB changed from
true
tofalse
.I ran
yarn flags --diff rn rn-fb
to get the difference between feature flags and unify them.Before
After