Skip to content

Commit

Permalink
Clean up enableUnifiedSyncLane flag (#30062)
Browse files Browse the repository at this point in the history
`enableUnifiedSyncLane` now passes everywhere. Let's clean it up

Implemented with #27646

Flag enabled with #27646,
#28269,
#29052

DiffTrain build for [c21bcd6](c21bcd6)
  • Loading branch information
jackpope committed Jun 24, 2024
1 parent 174a36c commit ae90e9f
Show file tree
Hide file tree
Showing 34 changed files with 158 additions and 260 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0b724e9e9c6469983f73631edb2e6abcc9c1193b
c21bcd627b6a8f31548edfc149dd3b879fea6558
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION_TRANSFORMS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0b724e9e9c6469983f73631edb2e6abcc9c1193b
c21bcd627b6a8f31548edfc149dd3b879fea6558
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -1987,7 +1987,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-www-classic-0b724e9e9c-20240621";
exports.version = "19.0.0-www-classic-c21bcd627b-20240624";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
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 @@ -1967,7 +1967,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-www-modern-0b724e9e9c-20240621";
exports.version = "19.0.0-www-modern-c21bcd627b-20240624";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -665,4 +665,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-classic-0b724e9e9c-20240621";
exports.version = "19.0.0-www-classic-c21bcd627b-20240624";
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -665,4 +665,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-modern-0b724e9e9c-20240621";
exports.version = "19.0.0-www-modern-c21bcd627b-20240624";
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-profiling.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-classic-0b724e9e9c-20240621";
exports.version = "19.0.0-www-classic-c21bcd627b-20240624";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-profiling.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-modern-0b724e9e9c-20240621";
exports.version = "19.0.0-www-modern-c21bcd627b-20240624";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
17 changes: 6 additions & 11 deletions compiled/facebook-www/ReactART-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -940,10 +940,8 @@ __DEV__ &&
}
}
function getHighestPriorityLanes(lanes) {
if (enableUnifiedSyncLane) {
var pendingSyncLanes = lanes & SyncUpdateLanes;
if (0 !== pendingSyncLanes) return pendingSyncLanes;
}
var pendingSyncLanes = lanes & SyncUpdateLanes;
if (0 !== pendingSyncLanes) return pendingSyncLanes;
switch (lanes & -lanes) {
case SyncHydrationLane:
return SyncHydrationLane;
Expand Down Expand Up @@ -7323,7 +7321,7 @@ __DEV__ &&
JSCompiler_temp = workInProgressRoot;
if (null !== JSCompiler_temp) {
nextProps = renderLanes & -renderLanes;
if (enableUnifiedSyncLane && 0 !== (nextProps & SyncUpdateLanes))
if (0 !== (nextProps & SyncUpdateLanes))
nextProps = SyncHydrationLane;
else
switch (nextProps) {
Expand Down Expand Up @@ -14857,7 +14855,6 @@ __DEV__ &&
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
enableLazyContextPropagation =
dynamicFeatureFlags.enableLazyContextPropagation,
enableUnifiedSyncLane = dynamicFeatureFlags.enableUnifiedSyncLane,
enableRetryLaneExpiration = dynamicFeatureFlags.enableRetryLaneExpiration,
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
enableDeferRootSchedulingToMicrotask =
Expand Down Expand Up @@ -14962,9 +14959,7 @@ __DEV__ &&
InputContinuousLane = 8,
DefaultHydrationLane = 16,
DefaultLane = 32,
SyncUpdateLanes = enableUnifiedSyncLane
? SyncLane | InputContinuousLane | DefaultLane
: SyncLane,
SyncUpdateLanes = SyncLane | InputContinuousLane | DefaultLane,
TransitionHydrationLane = 64,
TransitionLanes = 4194176,
RetryLanes = 62914560,
Expand Down Expand Up @@ -16934,14 +16929,14 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-classic-0b724e9e9c-20240621"
reconcilerVersion: "19.0.0-www-classic-c21bcd627b-20240624"
});
})({
findFiberByHostInstance: function () {
return null;
},
bundleType: 1,
version: "19.0.0-www-classic-0b724e9e9c-20240621",
version: "19.0.0-www-classic-c21bcd627b-20240624",
rendererPackageName: "react-art"
});
var ClippingRectangle = TYPES.CLIPPING_RECTANGLE,
Expand Down
17 changes: 6 additions & 11 deletions compiled/facebook-www/ReactART-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -937,10 +937,8 @@ __DEV__ &&
}
}
function getHighestPriorityLanes(lanes) {
if (enableUnifiedSyncLane) {
var pendingSyncLanes = lanes & SyncUpdateLanes;
if (0 !== pendingSyncLanes) return pendingSyncLanes;
}
var pendingSyncLanes = lanes & SyncUpdateLanes;
if (0 !== pendingSyncLanes) return pendingSyncLanes;
switch (lanes & -lanes) {
case SyncHydrationLane:
return SyncHydrationLane;
Expand Down Expand Up @@ -7088,7 +7086,7 @@ __DEV__ &&
JSCompiler_temp = workInProgressRoot;
if (null !== JSCompiler_temp) {
nextProps = renderLanes & -renderLanes;
if (enableUnifiedSyncLane && 0 !== (nextProps & SyncUpdateLanes))
if (0 !== (nextProps & SyncUpdateLanes))
nextProps = SyncHydrationLane;
else
switch (nextProps) {
Expand Down Expand Up @@ -14294,7 +14292,6 @@ __DEV__ &&
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
enableLazyContextPropagation =
dynamicFeatureFlags.enableLazyContextPropagation,
enableUnifiedSyncLane = dynamicFeatureFlags.enableUnifiedSyncLane,
enableRetryLaneExpiration = dynamicFeatureFlags.enableRetryLaneExpiration,
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
enableDeferRootSchedulingToMicrotask =
Expand Down Expand Up @@ -14398,9 +14395,7 @@ __DEV__ &&
InputContinuousLane = 8,
DefaultHydrationLane = 16,
DefaultLane = 32,
SyncUpdateLanes = enableUnifiedSyncLane
? SyncLane | InputContinuousLane | DefaultLane
: SyncLane,
SyncUpdateLanes = SyncLane | InputContinuousLane | DefaultLane,
TransitionHydrationLane = 64,
TransitionLanes = 4194176,
RetryLanes = 62914560,
Expand Down Expand Up @@ -16364,14 +16359,14 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-modern-0b724e9e9c-20240621"
reconcilerVersion: "19.0.0-www-modern-c21bcd627b-20240624"
});
})({
findFiberByHostInstance: function () {
return null;
},
bundleType: 1,
version: "19.0.0-www-modern-0b724e9e9c-20240621",
version: "19.0.0-www-modern-c21bcd627b-20240624",
rendererPackageName: "react-art"
});
var ClippingRectangle = TYPES.CLIPPING_RECTANGLE,
Expand Down
19 changes: 7 additions & 12 deletions compiled/facebook-www/ReactART-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ var dynamicFeatureFlags = require("ReactFeatureFlags"),
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
enableLazyContextPropagation =
dynamicFeatureFlags.enableLazyContextPropagation,
enableUnifiedSyncLane = dynamicFeatureFlags.enableUnifiedSyncLane,
enableRetryLaneExpiration = dynamicFeatureFlags.enableRetryLaneExpiration,
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
enableDeferRootSchedulingToMicrotask =
Expand Down Expand Up @@ -599,14 +598,11 @@ function clz32Fallback(x) {
x >>>= 0;
return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;
}
var SyncUpdateLanes = enableUnifiedSyncLane ? 42 : 2,
nextTransitionLane = 128,
var nextTransitionLane = 128,
nextRetryLane = 4194304;
function getHighestPriorityLanes(lanes) {
if (enableUnifiedSyncLane) {
var pendingSyncLanes = lanes & SyncUpdateLanes;
if (0 !== pendingSyncLanes) return pendingSyncLanes;
}
var pendingSyncLanes = lanes & 42;
if (0 !== pendingSyncLanes) return pendingSyncLanes;
switch (lanes & -lanes) {
case 1:
return 1;
Expand Down Expand Up @@ -5164,8 +5160,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
JSCompiler_temp = workInProgressRoot;
if (null !== JSCompiler_temp) {
nextProps = renderLanes & -renderLanes;
if (enableUnifiedSyncLane && 0 !== (nextProps & SyncUpdateLanes))
nextProps = 1;
if (0 !== (nextProps & 42)) nextProps = 1;
else
switch (nextProps) {
case 2:
Expand Down Expand Up @@ -9970,7 +9965,7 @@ function commitRootImpl(
remainingLanes = root.pendingLanes;
(enableInfiniteRenderLoopDetection &&
(didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) ||
(0 !== (lanes & 4194218) && 0 !== (remainingLanes & SyncUpdateLanes))
(0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42))
? root === rootWithNestedUpdates
? nestedUpdateCount++
: ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
Expand Down Expand Up @@ -10709,7 +10704,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "19.0.0-www-classic-0b724e9e9c-20240621",
version: "19.0.0-www-classic-c21bcd627b-20240624",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1386 = {
Expand Down Expand Up @@ -10740,7 +10735,7 @@ var internals$jscomp$inline_1386 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-classic-0b724e9e9c-20240621"
reconcilerVersion: "19.0.0-www-classic-c21bcd627b-20240624"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1387 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
19 changes: 7 additions & 12 deletions compiled/facebook-www/ReactART-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ var dynamicFeatureFlags = require("ReactFeatureFlags"),
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
enableLazyContextPropagation =
dynamicFeatureFlags.enableLazyContextPropagation,
enableUnifiedSyncLane = dynamicFeatureFlags.enableUnifiedSyncLane,
enableRetryLaneExpiration = dynamicFeatureFlags.enableRetryLaneExpiration,
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
enableDeferRootSchedulingToMicrotask =
Expand Down Expand Up @@ -473,14 +472,11 @@ function clz32Fallback(x) {
x >>>= 0;
return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;
}
var SyncUpdateLanes = enableUnifiedSyncLane ? 42 : 2,
nextTransitionLane = 128,
var nextTransitionLane = 128,
nextRetryLane = 4194304;
function getHighestPriorityLanes(lanes) {
if (enableUnifiedSyncLane) {
var pendingSyncLanes = lanes & SyncUpdateLanes;
if (0 !== pendingSyncLanes) return pendingSyncLanes;
}
var pendingSyncLanes = lanes & 42;
if (0 !== pendingSyncLanes) return pendingSyncLanes;
switch (lanes & -lanes) {
case 1:
return 1;
Expand Down Expand Up @@ -4837,8 +4833,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
JSCompiler_temp = workInProgressRoot;
if (null !== JSCompiler_temp) {
nextProps = renderLanes & -renderLanes;
if (enableUnifiedSyncLane && 0 !== (nextProps & SyncUpdateLanes))
nextProps = 1;
if (0 !== (nextProps & 42)) nextProps = 1;
else
switch (nextProps) {
case 2:
Expand Down Expand Up @@ -9469,7 +9464,7 @@ function commitRootImpl(
remainingLanes = root.pendingLanes;
(enableInfiniteRenderLoopDetection &&
(didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) ||
(0 !== (lanes & 4194218) && 0 !== (remainingLanes & SyncUpdateLanes))
(0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42))
? root === rootWithNestedUpdates
? nestedUpdateCount++
: ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
Expand Down Expand Up @@ -10162,7 +10157,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "19.0.0-www-modern-0b724e9e9c-20240621",
version: "19.0.0-www-modern-c21bcd627b-20240624",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1372 = {
Expand Down Expand Up @@ -10193,7 +10188,7 @@ var internals$jscomp$inline_1372 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-0b724e9e9c-20240621"
reconcilerVersion: "19.0.0-www-modern-c21bcd627b-20240624"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1373 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
26 changes: 9 additions & 17 deletions compiled/facebook-www/ReactDOM-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -950,10 +950,8 @@ __DEV__ &&
}
}
function getHighestPriorityLanes(lanes) {
if (enableUnifiedSyncLane) {
var pendingSyncLanes = lanes & SyncUpdateLanes;
if (0 !== pendingSyncLanes) return pendingSyncLanes;
}
var pendingSyncLanes = lanes & SyncUpdateLanes;
if (0 !== pendingSyncLanes) return pendingSyncLanes;
switch (lanes & -lanes) {
case SyncHydrationLane:
return SyncHydrationLane;
Expand Down Expand Up @@ -9338,10 +9336,7 @@ __DEV__ &&
JSCompiler_object_inline_digest_2433 = workInProgressRoot;
if (null !== JSCompiler_object_inline_digest_2433) {
JSCompiler_object_inline_stack_2434 = renderLanes & -renderLanes;
if (
enableUnifiedSyncLane &&
0 !== (JSCompiler_object_inline_stack_2434 & SyncUpdateLanes)
)
if (0 !== (JSCompiler_object_inline_stack_2434 & SyncUpdateLanes))
JSCompiler_object_inline_stack_2434 = SyncHydrationLane;
else
switch (JSCompiler_object_inline_stack_2434) {
Expand Down Expand Up @@ -23798,7 +23793,6 @@ __DEV__ &&
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
enableLazyContextPropagation =
dynamicFeatureFlags.enableLazyContextPropagation,
enableUnifiedSyncLane = dynamicFeatureFlags.enableUnifiedSyncLane,
enableRetryLaneExpiration = dynamicFeatureFlags.enableRetryLaneExpiration,
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
enableDeferRootSchedulingToMicrotask =
Expand Down Expand Up @@ -23893,9 +23887,7 @@ __DEV__ &&
InputContinuousLane = 8,
DefaultHydrationLane = 16,
DefaultLane = 32,
SyncUpdateLanes = enableUnifiedSyncLane
? SyncLane | InputContinuousLane | DefaultLane
: SyncLane,
SyncUpdateLanes = SyncLane | InputContinuousLane | DefaultLane,
TransitionHydrationLane = 64,
TransitionLanes = 4194176,
RetryLanes = 62914560,
Expand Down Expand Up @@ -27373,11 +27365,11 @@ __DEV__ &&
: flushSyncErrorInBuildsThatSupportLegacyMode;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-www-classic-0b724e9e9c-20240621" !== isomorphicReactPackageVersion)
if ("19.0.0-www-classic-c21bcd627b-20240624" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.0.0-www-classic-0b724e9e9c-20240621\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.0.0-www-classic-c21bcd627b-20240624\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -27443,12 +27435,12 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-classic-0b724e9e9c-20240621"
reconcilerVersion: "19.0.0-www-classic-c21bcd627b-20240624"
});
})({
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 1,
version: "19.0.0-www-classic-0b724e9e9c-20240621",
version: "19.0.0-www-classic-c21bcd627b-20240624",
rendererPackageName: "react-dom"
}) &&
canUseDOM &&
Expand Down Expand Up @@ -28091,7 +28083,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-0b724e9e9c-20240621";
exports.version = "19.0.0-www-classic-c21bcd627b-20240624";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
Loading

0 comments on commit ae90e9f

Please sign in to comment.