Skip to content

Commit

Permalink
Enable enableUnifiedSyncLane (facebook#27646)
Browse files Browse the repository at this point in the history
<!--
  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
  • Loading branch information
tyao1 authored and AndyPengc12 committed Apr 15, 2024
1 parent b637c3b commit d7c6fb9
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/shared/ReactFeatureFlags.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export const enableUseRefAccessWarning = false;
// Enables time slicing for updates that aren't wrapped in startTransition.
export const forceConcurrentByDefaultForTesting = false;

export const enableUnifiedSyncLane = __EXPERIMENTAL__;
export const enableUnifiedSyncLane = true;

// Adds an opt-in to time slicing for updates that aren't wrapped in startTransition.
export const allowConcurrentByDefault = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import typeof * as DynamicFlagsType from 'ReactNativeInternalFeatureFlags';

export const enableUseRefAccessWarning = __VARIANT__;
export const enableDeferRootSchedulingToMicrotask = __VARIANT__;
export const enableUnifiedSyncLane = __VARIANT__;
export const alwaysThrottleRetries = __VARIANT__;
export const useMicrotasksForSchedulingInFabric = __VARIANT__;
export const passChildrenWhenCloningPersistedNodes = __VARIANT__;
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/forks/ReactFeatureFlags.native-fb.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import * as dynamicFlags from 'ReactNativeInternalFeatureFlags';
export const {
enableUseRefAccessWarning,
enableDeferRootSchedulingToMicrotask,
enableUnifiedSyncLane,
alwaysThrottleRetries,
useMicrotasksForSchedulingInFabric,
passChildrenWhenCloningPersistedNodes,
Expand Down Expand Up @@ -72,7 +73,6 @@ export const disableSchedulerTimeoutInWorkLoop = false;
export const enableLazyContextPropagation = false;
export const enableLegacyHidden = true;
export const forceConcurrentByDefaultForTesting = false;
export const enableUnifiedSyncLane = false;
export const allowConcurrentByDefault = true;
export const enableCustomElementPropertySupport = false;

Expand Down
2 changes: 1 addition & 1 deletion packages/shared/forks/ReactFeatureFlags.native-oss.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const disableSchedulerTimeoutInWorkLoop = false;
export const enableLazyContextPropagation = false;
export const enableLegacyHidden = false;
export const forceConcurrentByDefaultForTesting = false;
export const enableUnifiedSyncLane = false;
export const enableUnifiedSyncLane = true;
export const allowConcurrentByDefault = false;
export const enableCustomElementPropertySupport = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const disableSchedulerTimeoutInWorkLoop = false;
export const enableLazyContextPropagation = false;
export const enableLegacyHidden = false;
export const forceConcurrentByDefaultForTesting = false;
export const enableUnifiedSyncLane = false;
export const enableUnifiedSyncLane = true;
export const allowConcurrentByDefault = true;

export const consoleManagedByDevToolsDuringStrictMode = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const disableSchedulerTimeoutInWorkLoop = false;
export const enableLazyContextPropagation = false;
export const enableLegacyHidden = false;
export const forceConcurrentByDefaultForTesting = false;
export const enableUnifiedSyncLane = false;
export const enableUnifiedSyncLane = true;
export const allowConcurrentByDefault = true;
export const enableCustomElementPropertySupport = false;

Expand Down
1 change: 1 addition & 0 deletions scripts/flow/xplat.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
declare module 'ReactNativeInternalFeatureFlags' {
declare export var enableUseRefAccessWarning: boolean;
declare export var enableDeferRootSchedulingToMicrotask: boolean;
declare export var enableUnifiedSyncLane: boolean;
declare export var alwaysThrottleRetries: boolean;
declare export var useMicrotasksForSchedulingInFabric: boolean;
declare export var passChildrenWhenCloningPersistedNodes: boolean;
Expand Down

0 comments on commit d7c6fb9

Please sign in to comment.