Skip to content

Commit ae90e9f

Browse files
committed
Clean up enableUnifiedSyncLane flag (#30062)
`enableUnifiedSyncLane` now passes everywhere. Let's clean it up Implemented with #27646 Flag enabled with #27646, #28269, #29052 DiffTrain build for [c21bcd6](c21bcd6)
1 parent 174a36c commit ae90e9f

34 files changed

+158
-260
lines changed

compiled/facebook-www/REVISION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0b724e9e9c6469983f73631edb2e6abcc9c1193b
1+
c21bcd627b6a8f31548edfc149dd3b879fea6558
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0b724e9e9c6469983f73631edb2e6abcc9c1193b
1+
c21bcd627b6a8f31548edfc149dd3b879fea6558

compiled/facebook-www/React-dev.classic.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1987,7 +1987,7 @@ __DEV__ &&
19871987
exports.useTransition = function () {
19881988
return resolveDispatcher().useTransition();
19891989
};
1990-
exports.version = "19.0.0-www-classic-0b724e9e9c-20240621";
1990+
exports.version = "19.0.0-www-classic-c21bcd627b-20240624";
19911991
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
19921992
"function" ===
19931993
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-dev.modern.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1967,7 +1967,7 @@ __DEV__ &&
19671967
exports.useTransition = function () {
19681968
return resolveDispatcher().useTransition();
19691969
};
1970-
exports.version = "19.0.0-www-modern-0b724e9e9c-20240621";
1970+
exports.version = "19.0.0-www-modern-c21bcd627b-20240624";
19711971
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
19721972
"function" ===
19731973
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-prod.classic.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -665,4 +665,4 @@ exports.useSyncExternalStore = function (
665665
exports.useTransition = function () {
666666
return ReactSharedInternals.H.useTransition();
667667
};
668-
exports.version = "19.0.0-www-classic-0b724e9e9c-20240621";
668+
exports.version = "19.0.0-www-classic-c21bcd627b-20240624";

compiled/facebook-www/React-prod.modern.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -665,4 +665,4 @@ exports.useSyncExternalStore = function (
665665
exports.useTransition = function () {
666666
return ReactSharedInternals.H.useTransition();
667667
};
668-
exports.version = "19.0.0-www-modern-0b724e9e9c-20240621";
668+
exports.version = "19.0.0-www-modern-c21bcd627b-20240624";

compiled/facebook-www/React-profiling.classic.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ exports.useSyncExternalStore = function (
669669
exports.useTransition = function () {
670670
return ReactSharedInternals.H.useTransition();
671671
};
672-
exports.version = "19.0.0-www-classic-0b724e9e9c-20240621";
672+
exports.version = "19.0.0-www-classic-c21bcd627b-20240624";
673673
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
674674
"function" ===
675675
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-profiling.modern.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ exports.useSyncExternalStore = function (
669669
exports.useTransition = function () {
670670
return ReactSharedInternals.H.useTransition();
671671
};
672-
exports.version = "19.0.0-www-modern-0b724e9e9c-20240621";
672+
exports.version = "19.0.0-www-modern-c21bcd627b-20240624";
673673
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
674674
"function" ===
675675
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.classic.js

+6-11
Original file line numberDiff line numberDiff line change
@@ -940,10 +940,8 @@ __DEV__ &&
940940
}
941941
}
942942
function getHighestPriorityLanes(lanes) {
943-
if (enableUnifiedSyncLane) {
944-
var pendingSyncLanes = lanes & SyncUpdateLanes;
945-
if (0 !== pendingSyncLanes) return pendingSyncLanes;
946-
}
943+
var pendingSyncLanes = lanes & SyncUpdateLanes;
944+
if (0 !== pendingSyncLanes) return pendingSyncLanes;
947945
switch (lanes & -lanes) {
948946
case SyncHydrationLane:
949947
return SyncHydrationLane;
@@ -7323,7 +7321,7 @@ __DEV__ &&
73237321
JSCompiler_temp = workInProgressRoot;
73247322
if (null !== JSCompiler_temp) {
73257323
nextProps = renderLanes & -renderLanes;
7326-
if (enableUnifiedSyncLane && 0 !== (nextProps & SyncUpdateLanes))
7324+
if (0 !== (nextProps & SyncUpdateLanes))
73277325
nextProps = SyncHydrationLane;
73287326
else
73297327
switch (nextProps) {
@@ -14857,7 +14855,6 @@ __DEV__ &&
1485714855
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
1485814856
enableLazyContextPropagation =
1485914857
dynamicFeatureFlags.enableLazyContextPropagation,
14860-
enableUnifiedSyncLane = dynamicFeatureFlags.enableUnifiedSyncLane,
1486114858
enableRetryLaneExpiration = dynamicFeatureFlags.enableRetryLaneExpiration,
1486214859
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
1486314860
enableDeferRootSchedulingToMicrotask =
@@ -14962,9 +14959,7 @@ __DEV__ &&
1496214959
InputContinuousLane = 8,
1496314960
DefaultHydrationLane = 16,
1496414961
DefaultLane = 32,
14965-
SyncUpdateLanes = enableUnifiedSyncLane
14966-
? SyncLane | InputContinuousLane | DefaultLane
14967-
: SyncLane,
14962+
SyncUpdateLanes = SyncLane | InputContinuousLane | DefaultLane,
1496814963
TransitionHydrationLane = 64,
1496914964
TransitionLanes = 4194176,
1497014965
RetryLanes = 62914560,
@@ -16934,14 +16929,14 @@ __DEV__ &&
1693416929
scheduleRoot: scheduleRoot,
1693516930
setRefreshHandler: setRefreshHandler,
1693616931
getCurrentFiber: getCurrentFiberForDevTools,
16937-
reconcilerVersion: "19.0.0-www-classic-0b724e9e9c-20240621"
16932+
reconcilerVersion: "19.0.0-www-classic-c21bcd627b-20240624"
1693816933
});
1693916934
})({
1694016935
findFiberByHostInstance: function () {
1694116936
return null;
1694216937
},
1694316938
bundleType: 1,
16944-
version: "19.0.0-www-classic-0b724e9e9c-20240621",
16939+
version: "19.0.0-www-classic-c21bcd627b-20240624",
1694516940
rendererPackageName: "react-art"
1694616941
});
1694716942
var ClippingRectangle = TYPES.CLIPPING_RECTANGLE,

compiled/facebook-www/ReactART-dev.modern.js

+6-11
Original file line numberDiff line numberDiff line change
@@ -937,10 +937,8 @@ __DEV__ &&
937937
}
938938
}
939939
function getHighestPriorityLanes(lanes) {
940-
if (enableUnifiedSyncLane) {
941-
var pendingSyncLanes = lanes & SyncUpdateLanes;
942-
if (0 !== pendingSyncLanes) return pendingSyncLanes;
943-
}
940+
var pendingSyncLanes = lanes & SyncUpdateLanes;
941+
if (0 !== pendingSyncLanes) return pendingSyncLanes;
944942
switch (lanes & -lanes) {
945943
case SyncHydrationLane:
946944
return SyncHydrationLane;
@@ -7088,7 +7086,7 @@ __DEV__ &&
70887086
JSCompiler_temp = workInProgressRoot;
70897087
if (null !== JSCompiler_temp) {
70907088
nextProps = renderLanes & -renderLanes;
7091-
if (enableUnifiedSyncLane && 0 !== (nextProps & SyncUpdateLanes))
7089+
if (0 !== (nextProps & SyncUpdateLanes))
70927090
nextProps = SyncHydrationLane;
70937091
else
70947092
switch (nextProps) {
@@ -14294,7 +14292,6 @@ __DEV__ &&
1429414292
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
1429514293
enableLazyContextPropagation =
1429614294
dynamicFeatureFlags.enableLazyContextPropagation,
14297-
enableUnifiedSyncLane = dynamicFeatureFlags.enableUnifiedSyncLane,
1429814295
enableRetryLaneExpiration = dynamicFeatureFlags.enableRetryLaneExpiration,
1429914296
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
1430014297
enableDeferRootSchedulingToMicrotask =
@@ -14398,9 +14395,7 @@ __DEV__ &&
1439814395
InputContinuousLane = 8,
1439914396
DefaultHydrationLane = 16,
1440014397
DefaultLane = 32,
14401-
SyncUpdateLanes = enableUnifiedSyncLane
14402-
? SyncLane | InputContinuousLane | DefaultLane
14403-
: SyncLane,
14398+
SyncUpdateLanes = SyncLane | InputContinuousLane | DefaultLane,
1440414399
TransitionHydrationLane = 64,
1440514400
TransitionLanes = 4194176,
1440614401
RetryLanes = 62914560,
@@ -16364,14 +16359,14 @@ __DEV__ &&
1636416359
scheduleRoot: scheduleRoot,
1636516360
setRefreshHandler: setRefreshHandler,
1636616361
getCurrentFiber: getCurrentFiberForDevTools,
16367-
reconcilerVersion: "19.0.0-www-modern-0b724e9e9c-20240621"
16362+
reconcilerVersion: "19.0.0-www-modern-c21bcd627b-20240624"
1636816363
});
1636916364
})({
1637016365
findFiberByHostInstance: function () {
1637116366
return null;
1637216367
},
1637316368
bundleType: 1,
16374-
version: "19.0.0-www-modern-0b724e9e9c-20240621",
16369+
version: "19.0.0-www-modern-c21bcd627b-20240624",
1637516370
rendererPackageName: "react-art"
1637616371
});
1637716372
var ClippingRectangle = TYPES.CLIPPING_RECTANGLE,

compiled/facebook-www/ReactART-prod.classic.js

+7-12
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ var dynamicFeatureFlags = require("ReactFeatureFlags"),
6363
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
6464
enableLazyContextPropagation =
6565
dynamicFeatureFlags.enableLazyContextPropagation,
66-
enableUnifiedSyncLane = dynamicFeatureFlags.enableUnifiedSyncLane,
6766
enableRetryLaneExpiration = dynamicFeatureFlags.enableRetryLaneExpiration,
6867
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
6968
enableDeferRootSchedulingToMicrotask =
@@ -599,14 +598,11 @@ function clz32Fallback(x) {
599598
x >>>= 0;
600599
return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;
601600
}
602-
var SyncUpdateLanes = enableUnifiedSyncLane ? 42 : 2,
603-
nextTransitionLane = 128,
601+
var nextTransitionLane = 128,
604602
nextRetryLane = 4194304;
605603
function getHighestPriorityLanes(lanes) {
606-
if (enableUnifiedSyncLane) {
607-
var pendingSyncLanes = lanes & SyncUpdateLanes;
608-
if (0 !== pendingSyncLanes) return pendingSyncLanes;
609-
}
604+
var pendingSyncLanes = lanes & 42;
605+
if (0 !== pendingSyncLanes) return pendingSyncLanes;
610606
switch (lanes & -lanes) {
611607
case 1:
612608
return 1;
@@ -5164,8 +5160,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
51645160
JSCompiler_temp = workInProgressRoot;
51655161
if (null !== JSCompiler_temp) {
51665162
nextProps = renderLanes & -renderLanes;
5167-
if (enableUnifiedSyncLane && 0 !== (nextProps & SyncUpdateLanes))
5168-
nextProps = 1;
5163+
if (0 !== (nextProps & 42)) nextProps = 1;
51695164
else
51705165
switch (nextProps) {
51715166
case 2:
@@ -9970,7 +9965,7 @@ function commitRootImpl(
99709965
remainingLanes = root.pendingLanes;
99719966
(enableInfiniteRenderLoopDetection &&
99729967
(didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) ||
9973-
(0 !== (lanes & 4194218) && 0 !== (remainingLanes & SyncUpdateLanes))
9968+
(0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42))
99749969
? root === rootWithNestedUpdates
99759970
? nestedUpdateCount++
99769971
: ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
@@ -10709,7 +10704,7 @@ var slice = Array.prototype.slice,
1070910704
return null;
1071010705
},
1071110706
bundleType: 0,
10712-
version: "19.0.0-www-classic-0b724e9e9c-20240621",
10707+
version: "19.0.0-www-classic-c21bcd627b-20240624",
1071310708
rendererPackageName: "react-art"
1071410709
};
1071510710
var internals$jscomp$inline_1386 = {
@@ -10740,7 +10735,7 @@ var internals$jscomp$inline_1386 = {
1074010735
scheduleRoot: null,
1074110736
setRefreshHandler: null,
1074210737
getCurrentFiber: null,
10743-
reconcilerVersion: "19.0.0-www-classic-0b724e9e9c-20240621"
10738+
reconcilerVersion: "19.0.0-www-classic-c21bcd627b-20240624"
1074410739
};
1074510740
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1074610741
var hook$jscomp$inline_1387 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled/facebook-www/ReactART-prod.modern.js

+7-12
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ var dynamicFeatureFlags = require("ReactFeatureFlags"),
6363
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
6464
enableLazyContextPropagation =
6565
dynamicFeatureFlags.enableLazyContextPropagation,
66-
enableUnifiedSyncLane = dynamicFeatureFlags.enableUnifiedSyncLane,
6766
enableRetryLaneExpiration = dynamicFeatureFlags.enableRetryLaneExpiration,
6867
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
6968
enableDeferRootSchedulingToMicrotask =
@@ -473,14 +472,11 @@ function clz32Fallback(x) {
473472
x >>>= 0;
474473
return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;
475474
}
476-
var SyncUpdateLanes = enableUnifiedSyncLane ? 42 : 2,
477-
nextTransitionLane = 128,
475+
var nextTransitionLane = 128,
478476
nextRetryLane = 4194304;
479477
function getHighestPriorityLanes(lanes) {
480-
if (enableUnifiedSyncLane) {
481-
var pendingSyncLanes = lanes & SyncUpdateLanes;
482-
if (0 !== pendingSyncLanes) return pendingSyncLanes;
483-
}
478+
var pendingSyncLanes = lanes & 42;
479+
if (0 !== pendingSyncLanes) return pendingSyncLanes;
484480
switch (lanes & -lanes) {
485481
case 1:
486482
return 1;
@@ -4837,8 +4833,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
48374833
JSCompiler_temp = workInProgressRoot;
48384834
if (null !== JSCompiler_temp) {
48394835
nextProps = renderLanes & -renderLanes;
4840-
if (enableUnifiedSyncLane && 0 !== (nextProps & SyncUpdateLanes))
4841-
nextProps = 1;
4836+
if (0 !== (nextProps & 42)) nextProps = 1;
48424837
else
48434838
switch (nextProps) {
48444839
case 2:
@@ -9469,7 +9464,7 @@ function commitRootImpl(
94699464
remainingLanes = root.pendingLanes;
94709465
(enableInfiniteRenderLoopDetection &&
94719466
(didIncludeRenderPhaseUpdate || didIncludeCommitPhaseUpdate)) ||
9472-
(0 !== (lanes & 4194218) && 0 !== (remainingLanes & SyncUpdateLanes))
9467+
(0 !== (lanes & 4194218) && 0 !== (remainingLanes & 42))
94739468
? root === rootWithNestedUpdates
94749469
? nestedUpdateCount++
94759470
: ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
@@ -10162,7 +10157,7 @@ var slice = Array.prototype.slice,
1016210157
return null;
1016310158
},
1016410159
bundleType: 0,
10165-
version: "19.0.0-www-modern-0b724e9e9c-20240621",
10160+
version: "19.0.0-www-modern-c21bcd627b-20240624",
1016610161
rendererPackageName: "react-art"
1016710162
};
1016810163
var internals$jscomp$inline_1372 = {
@@ -10193,7 +10188,7 @@ var internals$jscomp$inline_1372 = {
1019310188
scheduleRoot: null,
1019410189
setRefreshHandler: null,
1019510190
getCurrentFiber: null,
10196-
reconcilerVersion: "19.0.0-www-modern-0b724e9e9c-20240621"
10191+
reconcilerVersion: "19.0.0-www-modern-c21bcd627b-20240624"
1019710192
};
1019810193
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1019910194
var hook$jscomp$inline_1373 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled/facebook-www/ReactDOM-dev.classic.js

+9-17
Original file line numberDiff line numberDiff line change
@@ -950,10 +950,8 @@ __DEV__ &&
950950
}
951951
}
952952
function getHighestPriorityLanes(lanes) {
953-
if (enableUnifiedSyncLane) {
954-
var pendingSyncLanes = lanes & SyncUpdateLanes;
955-
if (0 !== pendingSyncLanes) return pendingSyncLanes;
956-
}
953+
var pendingSyncLanes = lanes & SyncUpdateLanes;
954+
if (0 !== pendingSyncLanes) return pendingSyncLanes;
957955
switch (lanes & -lanes) {
958956
case SyncHydrationLane:
959957
return SyncHydrationLane;
@@ -9338,10 +9336,7 @@ __DEV__ &&
93389336
JSCompiler_object_inline_digest_2433 = workInProgressRoot;
93399337
if (null !== JSCompiler_object_inline_digest_2433) {
93409338
JSCompiler_object_inline_stack_2434 = renderLanes & -renderLanes;
9341-
if (
9342-
enableUnifiedSyncLane &&
9343-
0 !== (JSCompiler_object_inline_stack_2434 & SyncUpdateLanes)
9344-
)
9339+
if (0 !== (JSCompiler_object_inline_stack_2434 & SyncUpdateLanes))
93459340
JSCompiler_object_inline_stack_2434 = SyncHydrationLane;
93469341
else
93479342
switch (JSCompiler_object_inline_stack_2434) {
@@ -23798,7 +23793,6 @@ __DEV__ &&
2379823793
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
2379923794
enableLazyContextPropagation =
2380023795
dynamicFeatureFlags.enableLazyContextPropagation,
23801-
enableUnifiedSyncLane = dynamicFeatureFlags.enableUnifiedSyncLane,
2380223796
enableRetryLaneExpiration = dynamicFeatureFlags.enableRetryLaneExpiration,
2380323797
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
2380423798
enableDeferRootSchedulingToMicrotask =
@@ -23893,9 +23887,7 @@ __DEV__ &&
2389323887
InputContinuousLane = 8,
2389423888
DefaultHydrationLane = 16,
2389523889
DefaultLane = 32,
23896-
SyncUpdateLanes = enableUnifiedSyncLane
23897-
? SyncLane | InputContinuousLane | DefaultLane
23898-
: SyncLane,
23890+
SyncUpdateLanes = SyncLane | InputContinuousLane | DefaultLane,
2389923891
TransitionHydrationLane = 64,
2390023892
TransitionLanes = 4194176,
2390123893
RetryLanes = 62914560,
@@ -27373,11 +27365,11 @@ __DEV__ &&
2737327365
: flushSyncErrorInBuildsThatSupportLegacyMode;
2737427366
(function () {
2737527367
var isomorphicReactPackageVersion = React.version;
27376-
if ("19.0.0-www-classic-0b724e9e9c-20240621" !== isomorphicReactPackageVersion)
27368+
if ("19.0.0-www-classic-c21bcd627b-20240624" !== isomorphicReactPackageVersion)
2737727369
throw Error(
2737827370
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
2737927371
(isomorphicReactPackageVersion +
27380-
"\n - react-dom: 19.0.0-www-classic-0b724e9e9c-20240621\nLearn more: https://react.dev/warnings/version-mismatch")
27372+
"\n - react-dom: 19.0.0-www-classic-c21bcd627b-20240624\nLearn more: https://react.dev/warnings/version-mismatch")
2738127373
);
2738227374
})();
2738327375
("function" === typeof Map &&
@@ -27443,12 +27435,12 @@ __DEV__ &&
2744327435
scheduleRoot: scheduleRoot,
2744427436
setRefreshHandler: setRefreshHandler,
2744527437
getCurrentFiber: getCurrentFiberForDevTools,
27446-
reconcilerVersion: "19.0.0-www-classic-0b724e9e9c-20240621"
27438+
reconcilerVersion: "19.0.0-www-classic-c21bcd627b-20240624"
2744727439
});
2744827440
})({
2744927441
findFiberByHostInstance: getClosestInstanceFromNode,
2745027442
bundleType: 1,
27451-
version: "19.0.0-www-classic-0b724e9e9c-20240621",
27443+
version: "19.0.0-www-classic-c21bcd627b-20240624",
2745227444
rendererPackageName: "react-dom"
2745327445
}) &&
2745427446
canUseDOM &&
@@ -28091,7 +28083,7 @@ __DEV__ &&
2809128083
exports.useFormStatus = function () {
2809228084
return resolveDispatcher().useHostTransitionStatus();
2809328085
};
28094-
exports.version = "19.0.0-www-classic-0b724e9e9c-20240621";
28086+
exports.version = "19.0.0-www-classic-c21bcd627b-20240624";
2809528087
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
2809628088
"function" ===
2809728089
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)