Skip to content

Commit

Permalink
Clean up enableSyncDefaultUpdates flag a bit (#26858)
Browse files Browse the repository at this point in the history
## Overview

Does a few things:
- Renames `enableSyncDefaultUpdates` to
`forceConcurrentByDefaultForTesting`
- Changes the way it's used so it's dead-code eliminated separate from
`allowConcurrentByDefault`
- Deletes a bunch of the gated code

The gates that are deleted are unnecessary now. We were keeping them
when we originally thought we would come back to being concurrent by
default. But we've shifted and now sync-by default is the desired
behavior long term, so there's no need to keep all these forked tests
around.

I'll follow up to delete more of the forked behavior if possible.
Ideally we wouldn't need this flag even if we're still using
`allowConcurrentByDefault`.

DiffTrain build for [018c58c](018c58c)
  • Loading branch information
rickhanlonii committed Jun 1, 2023
1 parent ea7881e commit 9908c7d
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 32 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ae31d2ea3c3f9f0a87ff2c6193484d5d8786bc5f
018c58c9c65452cff25aaf1f38f78a9b90d8e5c1
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (
}
"use strict";

var ReactVersion = "18.3.0-www-modern-335642a1";
var ReactVersion = "18.3.0-www-modern-d087d75f";

// ATTENTION
// When adding new symbols to this file,
Expand Down
4 changes: 1 addition & 3 deletions compiled/facebook-www/ReactART-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
return self;
}

var ReactVersion = "18.3.0-www-classic-9ecb0062";
var ReactVersion = "18.3.0-www-classic-603b8e54";

var LegacyRoot = 0;
var ConcurrentRoot = 1;
Expand Down Expand Up @@ -28023,8 +28023,6 @@ function createHostRootFiber(
}

if (
// We only use this flag for our repo tests to check both behaviors.
// TODO: Flip this flag and rename it something like "forceConcurrentByDefaultForTesting"
// Only for internal experiments.
concurrentUpdatesByDefaultOverride
) {
Expand Down
4 changes: 1 addition & 3 deletions compiled/facebook-www/ReactART-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
return self;
}

var ReactVersion = "18.3.0-www-modern-335642a1";
var ReactVersion = "18.3.0-www-modern-d087d75f";

var LegacyRoot = 0;
var ConcurrentRoot = 1;
Expand Down Expand Up @@ -27683,8 +27683,6 @@ function createHostRootFiber(
}

if (
// We only use this flag for our repo tests to check both behaviors.
// TODO: Flip this flag and rename it something like "forceConcurrentByDefaultForTesting"
// Only for internal experiments.
concurrentUpdatesByDefaultOverride
) {
Expand Down
4 changes: 1 addition & 3 deletions compiled/facebook-www/ReactDOM-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -33640,8 +33640,6 @@ function createHostRootFiber(
}

if (
// We only use this flag for our repo tests to check both behaviors.
// TODO: Flip this flag and rename it something like "forceConcurrentByDefaultForTesting"
// Only for internal experiments.
concurrentUpdatesByDefaultOverride
) {
Expand Down Expand Up @@ -34196,7 +34194,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-www-classic-ea4ca273";
var ReactVersion = "18.3.0-www-classic-531a5c2f";

function createPortal$1(
children,
Expand Down
4 changes: 1 addition & 3 deletions compiled/facebook-www/ReactDOM-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -33485,8 +33485,6 @@ function createHostRootFiber(
}

if (
// We only use this flag for our repo tests to check both behaviors.
// TODO: Flip this flag and rename it something like "forceConcurrentByDefaultForTesting"
// Only for internal experiments.
concurrentUpdatesByDefaultOverride
) {
Expand Down Expand Up @@ -34041,7 +34039,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-www-modern-e59407a6";
var ReactVersion = "18.3.0-www-modern-7cf6b354";

function createPortal$1(
children,
Expand Down
6 changes: 3 additions & 3 deletions compiled/facebook-www/ReactDOM-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -16652,7 +16652,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1827 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-9ecb0062",
version: "18.3.0-www-classic-603b8e54",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2201 = {
Expand Down Expand Up @@ -16682,7 +16682,7 @@ var internals$jscomp$inline_2201 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-classic-9ecb0062"
reconcilerVersion: "18.3.0-www-classic-603b8e54"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2202 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -16925,4 +16925,4 @@ exports.unstable_renderSubtreeIntoContainer = function (
);
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-www-classic-9ecb0062";
exports.version = "18.3.0-www-classic-603b8e54";
4 changes: 1 addition & 3 deletions compiled/facebook-www/ReactDOMTesting-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -34257,8 +34257,6 @@ function createHostRootFiber(
}

if (
// We only use this flag for our repo tests to check both behaviors.
// TODO: Flip this flag and rename it something like "forceConcurrentByDefaultForTesting"
// Only for internal experiments.
concurrentUpdatesByDefaultOverride
) {
Expand Down Expand Up @@ -34813,7 +34811,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-www-classic-e7fd2804";
var ReactVersion = "18.3.0-www-classic-db5b17c5";

function createPortal$1(
children,
Expand Down
4 changes: 1 addition & 3 deletions compiled/facebook-www/ReactDOMTesting-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -34102,8 +34102,6 @@ function createHostRootFiber(
}

if (
// We only use this flag for our repo tests to check both behaviors.
// TODO: Flip this flag and rename it something like "forceConcurrentByDefaultForTesting"
// Only for internal experiments.
concurrentUpdatesByDefaultOverride
) {
Expand Down Expand Up @@ -34658,7 +34656,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-www-modern-380d0892";
var ReactVersion = "18.3.0-www-modern-427e8396";

function createPortal$1(
children,
Expand Down
6 changes: 3 additions & 3 deletions compiled/facebook-www/ReactDOMTesting-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -16563,7 +16563,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1815 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-335642a1",
version: "18.3.0-www-modern-d087d75f",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2199 = {
Expand Down Expand Up @@ -16594,7 +16594,7 @@ var internals$jscomp$inline_2199 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-modern-335642a1"
reconcilerVersion: "18.3.0-www-modern-d087d75f"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2200 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -16916,4 +16916,4 @@ exports.unstable_createEventHandle = function (type, options) {
return eventHandle;
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-www-modern-335642a1";
exports.version = "18.3.0-www-modern-d087d75f";
4 changes: 1 addition & 3 deletions compiled/facebook-www/ReactTestRenderer-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -24142,8 +24142,6 @@ function createHostRootFiber(
}

if (
// We only use this flag for our repo tests to check both behaviors.
// TODO: Flip this flag and rename it something like "forceConcurrentByDefaultForTesting"
// Only for internal experiments.
concurrentUpdatesByDefaultOverride
) {
Expand Down Expand Up @@ -24561,7 +24559,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-www-classic-dce737e6";
var ReactVersion = "18.3.0-www-classic-13112241";

// Might add PROFILE later.

Expand Down
4 changes: 1 addition & 3 deletions compiled/facebook-www/ReactTestRenderer-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -24142,8 +24142,6 @@ function createHostRootFiber(
}

if (
// We only use this flag for our repo tests to check both behaviors.
// TODO: Flip this flag and rename it something like "forceConcurrentByDefaultForTesting"
// Only for internal experiments.
concurrentUpdatesByDefaultOverride
) {
Expand Down Expand Up @@ -24561,7 +24559,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-www-modern-dce737e6";
var ReactVersion = "18.3.0-www-modern-13112241";

// Might add PROFILE later.

Expand Down

0 comments on commit 9908c7d

Please sign in to comment.