@samitouri / QOS-React-2 / commits / 52d542ad6d

Enable enableUnifiedSyncLane (#27646)

<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. Before submitting a pull request, please make sure the following is done: 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`. 6. If you need a debugger, run `yarn test --debug --watch TestName`, open `chrome://inspect`, and press "Inspect". 7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). 8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. 9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`). 10. If you haven't already, complete the CLA. Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html --> ## Summary <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> The flag has been tested internally on WWW, should be good to set to true for OSS. Added a dynamic flag for fb RN. ## How did you test this change? <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. How exactly did you verify that your PR solves the issue you wanted to solve? If you leave this empty, your PR will very likely be closed. --> yarn test

Tianyu Yao committed Nov 7, 2023 at 16:45 UTC 52d542ad6d410008c495084f511247f43387055f
7 files changed +7 -5
packages/shared/ReactFeatureFlags.js
+1 -1
@@ -151,7 +151,7 @@ export const enableUseRefAccessWarning = false;
151 // Enables time slicing for updates that aren't wrapped in startTransition.
152 export const forceConcurrentByDefaultForTesting = false;
153
154 -export const enableUnifiedSyncLane = __EXPERIMENTAL__;
154 +export const enableUnifiedSyncLane = true;
155
156 // Adds an opt-in to time slicing for updates that aren't wrapped in startTransition.
157 export const allowConcurrentByDefault = false;
packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js
+1
@@ -22,6 +22,7 @@ import typeof * as DynamicFlagsType from 'ReactNativeInternalFeatureFlags';
22
23 export const enableUseRefAccessWarning = __VARIANT__;
24 export const enableDeferRootSchedulingToMicrotask = __VARIANT__;
25 +export const enableUnifiedSyncLane = __VARIANT__;
26 export const alwaysThrottleRetries = __VARIANT__;
27 export const useMicrotasksForSchedulingInFabric = __VARIANT__;
28 export const passChildrenWhenCloningPersistedNodes = __VARIANT__;
packages/shared/forks/ReactFeatureFlags.native-fb.js
+1 -1
@@ -20,6 +20,7 @@ import * as dynamicFlags from 'ReactNativeInternalFeatureFlags';
20 export const {
21 enableUseRefAccessWarning,
22 enableDeferRootSchedulingToMicrotask,
23 + enableUnifiedSyncLane,
24 alwaysThrottleRetries,
25 useMicrotasksForSchedulingInFabric,
26 passChildrenWhenCloningPersistedNodes,
@@ -72,7 +73,6 @@ export const disableSchedulerTimeoutInWorkLoop = false;
73 export const enableLazyContextPropagation = false;
74 export const enableLegacyHidden = true;
75 export const forceConcurrentByDefaultForTesting = false;
75 -export const enableUnifiedSyncLane = false;
76 export const allowConcurrentByDefault = true;
77 export const enableCustomElementPropertySupport = false;
78
packages/shared/forks/ReactFeatureFlags.native-oss.js
+1 -1
@@ -57,7 +57,7 @@ export const disableSchedulerTimeoutInWorkLoop = false;
57 export const enableLazyContextPropagation = false;
58 export const enableLegacyHidden = false;
59 export const forceConcurrentByDefaultForTesting = false;
60 -export const enableUnifiedSyncLane = false;
60 +export const enableUnifiedSyncLane = true;
61 export const allowConcurrentByDefault = false;
62 export const enableCustomElementPropertySupport = false;
63
packages/shared/forks/ReactFeatureFlags.test-renderer.native.js
+1 -1
@@ -56,7 +56,7 @@ export const disableSchedulerTimeoutInWorkLoop = false;
56 export const enableLazyContextPropagation = false;
57 export const enableLegacyHidden = false;
58 export const forceConcurrentByDefaultForTesting = false;
59 -export const enableUnifiedSyncLane = false;
59 +export const enableUnifiedSyncLane = true;
60 export const allowConcurrentByDefault = true;
61
62 export const consoleManagedByDevToolsDuringStrictMode = false;
packages/shared/forks/ReactFeatureFlags.test-renderer.www.js
+1 -1
@@ -57,7 +57,7 @@ export const disableSchedulerTimeoutInWorkLoop = false;
57 export const enableLazyContextPropagation = false;
58 export const enableLegacyHidden = false;
59 export const forceConcurrentByDefaultForTesting = false;
60 -export const enableUnifiedSyncLane = false;
60 +export const enableUnifiedSyncLane = true;
61 export const allowConcurrentByDefault = true;
62 export const enableCustomElementPropertySupport = false;
63
scripts/flow/xplat.js
+1
@@ -10,6 +10,7 @@
10 declare module 'ReactNativeInternalFeatureFlags' {
11 declare export var enableUseRefAccessWarning: boolean;
12 declare export var enableDeferRootSchedulingToMicrotask: boolean;
13 + declare export var enableUnifiedSyncLane: boolean;
14 declare export var alwaysThrottleRetries: boolean;
15 declare export var useMicrotasksForSchedulingInFabric: boolean;
16 declare export var passChildrenWhenCloningPersistedNodes: boolean;