Skip to content

Commit 6fb4d0d

Browse files
committed
[RN] Move unifiedSyncLane back to dynamic (#28430)
This surfaced a bug because it wasn't on everywhere, moving back to dynamic while we investigate the bug DiffTrain build for commit 98b8359.
1 parent 8136b16 commit 6fb4d0d

File tree

13 files changed

+77
-52
lines changed

13 files changed

+77
-52
lines changed

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25707,7 +25707,7 @@ if (__DEV__) {
2570725707
return root;
2570825708
}
2570925709

25710-
var ReactVersion = "18.3.0-canary-aaa4acb12-20240222";
25710+
var ReactVersion = "18.3.0-canary-98b8359f6-20240223";
2571125711

2571225712
// Might add PROFILE later.
2571325713

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -9171,7 +9171,7 @@ var devToolsConfig$jscomp$inline_1014 = {
91719171
throw Error("TestRenderer does not support findFiberByHostInstance()");
91729172
},
91739173
bundleType: 0,
9174-
version: "18.3.0-canary-aaa4acb12-20240222",
9174+
version: "18.3.0-canary-98b8359f6-20240223",
91759175
rendererPackageName: "react-test-renderer"
91769176
};
91779177
var internals$jscomp$inline_1195 = {
@@ -9202,7 +9202,7 @@ var internals$jscomp$inline_1195 = {
92029202
scheduleRoot: null,
92039203
setRefreshHandler: null,
92049204
getCurrentFiber: null,
9205-
reconcilerVersion: "18.3.0-canary-aaa4acb12-20240222"
9205+
reconcilerVersion: "18.3.0-canary-98b8359f6-20240223"
92069206
};
92079207
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
92089208
var hook$jscomp$inline_1196 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -9599,7 +9599,7 @@ var devToolsConfig$jscomp$inline_1056 = {
95999599
throw Error("TestRenderer does not support findFiberByHostInstance()");
96009600
},
96019601
bundleType: 0,
9602-
version: "18.3.0-canary-aaa4acb12-20240222",
9602+
version: "18.3.0-canary-98b8359f6-20240223",
96039603
rendererPackageName: "react-test-renderer"
96049604
};
96059605
var internals$jscomp$inline_1236 = {
@@ -9630,7 +9630,7 @@ var internals$jscomp$inline_1236 = {
96309630
scheduleRoot: null,
96319631
setRefreshHandler: null,
96329632
getCurrentFiber: null,
9633-
reconcilerVersion: "18.3.0-canary-aaa4acb12-20240222"
9633+
reconcilerVersion: "18.3.0-canary-98b8359f6-20240223"
96349634
};
96359635
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
96369636
var hook$jscomp$inline_1237 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if (__DEV__) {
2626
}
2727
var dynamicFlags = require("ReactNativeInternalFeatureFlags");
2828

29-
var ReactVersion = "18.3.0-canary-aaa4acb12-20240222";
29+
var ReactVersion = "18.3.0-canary-98b8359f6-20240223";
3030

3131
// ATTENTION
3232
// When adding new symbols to this file,

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -600,4 +600,4 @@ exports.useSyncExternalStore = function (
600600
exports.useTransition = function () {
601601
return ReactCurrentDispatcher.current.useTransition();
602602
};
603-
exports.version = "18.3.0-canary-aaa4acb12-20240222";
603+
exports.version = "18.3.0-canary-98b8359f6-20240223";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ exports.useSyncExternalStore = function (
596596
exports.useTransition = function () {
597597
return ReactCurrentDispatcher.current.useTransition();
598598
};
599-
exports.version = "18.3.0-canary-aaa4acb12-20240222";
599+
exports.version = "18.3.0-canary-98b8359f6-20240223";
600600
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
601601
"function" ===
602602
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
aaa4acb1280fcda398defb805db47a8623df6c0f
1+
98b8359f656ef714cc44828d7bfd2409ca16b9b3

compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js

+9-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<bf21f6d72f3518f207e57e11607507ed>>
10+
* @generated SignedSource<<4c526192e135ce4617cc964ef360f7e3>>
1111
*/
1212

1313
"use strict";
@@ -3241,7 +3241,8 @@ to return true:wantsResponderID| |
32413241
passChildrenWhenCloningPersistedNodes =
32423242
dynamicFlags.passChildrenWhenCloningPersistedNodes,
32433243
useMicrotasksForSchedulingInFabric =
3244-
dynamicFlags.useMicrotasksForSchedulingInFabric; // The rest of the flags are static for better dead code elimination.
3244+
dynamicFlags.useMicrotasksForSchedulingInFabric,
3245+
enableUnifiedSyncLane = dynamicFlags.enableUnifiedSyncLane; // The rest of the flags are static for better dead code elimination.
32453246
var enableSchedulingProfiler = true;
32463247
var enableProfilerTimer = true;
32473248
var enableProfilerCommitHooks = true;
@@ -4005,7 +4006,9 @@ to return true:wantsResponderID| |
40054006
var DefaultLane =
40064007
/* */
40074008
32;
4008-
var SyncUpdateLanes = SyncLane | InputContinuousLane | DefaultLane;
4009+
var SyncUpdateLanes = enableUnifiedSyncLane
4010+
? SyncLane | InputContinuousLane | DefaultLane
4011+
: SyncLane;
40094012
var TransitionHydrationLane =
40104013
/* */
40114014
64;
@@ -4161,7 +4164,7 @@ to return true:wantsResponderID| |
41614164
var nextRetryLane = RetryLane1;
41624165

41634166
function getHighestPriorityLanes(lanes) {
4164-
{
4167+
if (enableUnifiedSyncLane) {
41654168
var pendingSyncLanes = lanes & SyncUpdateLanes;
41664169

41674170
if (pendingSyncLanes !== 0) {
@@ -4761,7 +4764,7 @@ to return true:wantsResponderID| |
47614764
var renderLane = getHighestPriorityLane(renderLanes);
47624765
var lane;
47634766

4764-
if ((renderLane & SyncUpdateLanes) !== NoLane) {
4767+
if (enableUnifiedSyncLane && (renderLane & SyncUpdateLanes) !== NoLane) {
47654768
lane = SyncHydrationLane;
47664769
} else {
47674770
switch (renderLane) {
@@ -28015,7 +28018,7 @@ to return true:wantsResponderID| |
2801528018
return root;
2801628019
}
2801728020

28018-
var ReactVersion = "18.3.0-canary-2e1e0d6f";
28021+
var ReactVersion = "18.3.0-canary-0435735f";
2801928022

2802028023
function createPortal$1(
2802128024
children,

compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js

+13-8
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<2a3d0aa946faed7a858417c14fa324c6>>
10+
* @generated SignedSource<<743b9976cf9cb1022780b5808cc05a13>>
1111
*/
1212

1313
"use strict";
@@ -1323,6 +1323,7 @@ var alwaysThrottleRetries = dynamicFlags.alwaysThrottleRetries,
13231323
dynamicFlags.passChildrenWhenCloningPersistedNodes,
13241324
useMicrotasksForSchedulingInFabric =
13251325
dynamicFlags.useMicrotasksForSchedulingInFabric,
1326+
enableUnifiedSyncLane = dynamicFlags.enableUnifiedSyncLane,
13261327
scheduleCallback$2 = Scheduler.unstable_scheduleCallback,
13271328
cancelCallback$1 = Scheduler.unstable_cancelCallback,
13281329
shouldYield = Scheduler.unstable_shouldYield,
@@ -1354,11 +1355,14 @@ function clz32Fallback(x) {
13541355
x >>>= 0;
13551356
return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;
13561357
}
1357-
var nextTransitionLane = 128,
1358+
var SyncUpdateLanes = enableUnifiedSyncLane ? 42 : 2,
1359+
nextTransitionLane = 128,
13581360
nextRetryLane = 4194304;
13591361
function getHighestPriorityLanes(lanes) {
1360-
var pendingSyncLanes = lanes & 42;
1361-
if (0 !== pendingSyncLanes) return pendingSyncLanes;
1362+
if (enableUnifiedSyncLane) {
1363+
var pendingSyncLanes = lanes & SyncUpdateLanes;
1364+
if (0 !== pendingSyncLanes) return pendingSyncLanes;
1365+
}
13621366
switch (lanes & -lanes) {
13631367
case 1:
13641368
return 1;
@@ -5754,7 +5758,8 @@ function updateDehydratedSuspenseComponent(
57545758
didPrimaryChildrenDefer = workInProgressRoot;
57555759
if (null !== didPrimaryChildrenDefer) {
57565760
nextProps = renderLanes & -renderLanes;
5757-
if (0 !== (nextProps & 42)) nextProps = 1;
5761+
if (enableUnifiedSyncLane && 0 !== (nextProps & SyncUpdateLanes))
5762+
nextProps = 1;
57585763
else
57595764
switch (nextProps) {
57605765
case 2:
@@ -8598,7 +8603,7 @@ function commitRootImpl(
85988603
0 !== root.tag &&
85998604
flushPassiveEffects();
86008605
remainingLanes = root.pendingLanes;
8601-
0 !== (transitions & 4194218) && 0 !== (remainingLanes & 42)
8606+
0 !== (transitions & 4194218) && 0 !== (remainingLanes & SyncUpdateLanes)
86028607
? root === rootWithNestedUpdates
86038608
? nestedUpdateCount++
86048609
: ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
@@ -9687,7 +9692,7 @@ var roots = new Map(),
96879692
devToolsConfig$jscomp$inline_1069 = {
96889693
findFiberByHostInstance: getInstanceFromNode,
96899694
bundleType: 0,
9690-
version: "18.3.0-canary-b37c113f",
9695+
version: "18.3.0-canary-06019910",
96919696
rendererPackageName: "react-native-renderer",
96929697
rendererConfig: {
96939698
getInspectorDataForInstance: getInspectorDataForInstance,
@@ -9730,7 +9735,7 @@ var internals$jscomp$inline_1294 = {
97309735
scheduleRoot: null,
97319736
setRefreshHandler: null,
97329737
getCurrentFiber: null,
9733-
reconcilerVersion: "18.3.0-canary-b37c113f"
9738+
reconcilerVersion: "18.3.0-canary-06019910"
97349739
};
97359740
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
97369741
var hook$jscomp$inline_1295 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js

+12-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<228fd7bab3210ea9b41049c42925b98a>>
10+
* @generated SignedSource<<bfa7c893ceec829541615729b8d25246>>
1111
*/
1212

1313
"use strict";
@@ -1327,6 +1327,7 @@ var alwaysThrottleRetries = dynamicFlags.alwaysThrottleRetries,
13271327
dynamicFlags.passChildrenWhenCloningPersistedNodes,
13281328
useMicrotasksForSchedulingInFabric =
13291329
dynamicFlags.useMicrotasksForSchedulingInFabric,
1330+
enableUnifiedSyncLane = dynamicFlags.enableUnifiedSyncLane,
13301331
scheduleCallback$2 = Scheduler.unstable_scheduleCallback,
13311332
cancelCallback$1 = Scheduler.unstable_cancelCallback,
13321333
shouldYield = Scheduler.unstable_shouldYield,
@@ -1430,6 +1431,7 @@ function clz32Fallback(x) {
14301431
x >>>= 0;
14311432
return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;
14321433
}
1434+
var SyncUpdateLanes = enableUnifiedSyncLane ? 42 : 2;
14331435
function getLabelForLane(lane) {
14341436
if (lane & 1) return "SyncHydrationLane";
14351437
if (lane & 2) return "Sync";
@@ -1449,8 +1451,10 @@ function getLabelForLane(lane) {
14491451
var nextTransitionLane = 128,
14501452
nextRetryLane = 4194304;
14511453
function getHighestPriorityLanes(lanes) {
1452-
var pendingSyncLanes = lanes & 42;
1453-
if (0 !== pendingSyncLanes) return pendingSyncLanes;
1454+
if (enableUnifiedSyncLane) {
1455+
var pendingSyncLanes = lanes & SyncUpdateLanes;
1456+
if (0 !== pendingSyncLanes) return pendingSyncLanes;
1457+
}
14541458
switch (lanes & -lanes) {
14551459
case 1:
14561460
return 1;
@@ -5972,7 +5976,8 @@ function updateDehydratedSuspenseComponent(
59725976
didPrimaryChildrenDefer = workInProgressRoot;
59735977
if (null !== didPrimaryChildrenDefer) {
59745978
nextProps = renderLanes & -renderLanes;
5975-
if (0 !== (nextProps & 42)) nextProps = 1;
5979+
if (enableUnifiedSyncLane && 0 !== (nextProps & SyncUpdateLanes))
5980+
nextProps = 1;
59765981
else
59775982
switch (nextProps) {
59785983
case 2:
@@ -9206,7 +9211,7 @@ function commitRootImpl(
92069211
0 !== root.tag &&
92079212
flushPassiveEffects();
92089213
remainingLanes = root.pendingLanes;
9209-
0 !== (transitions & 4194218) && 0 !== (remainingLanes & 42)
9214+
0 !== (transitions & 4194218) && 0 !== (remainingLanes & SyncUpdateLanes)
92109215
? ((nestedUpdateScheduled = !0),
92119216
root === rootWithNestedUpdates
92129217
? nestedUpdateCount++
@@ -10385,7 +10390,7 @@ var roots = new Map(),
1038510390
devToolsConfig$jscomp$inline_1147 = {
1038610391
findFiberByHostInstance: getInstanceFromNode,
1038710392
bundleType: 0,
10388-
version: "18.3.0-canary-b2e48ba9",
10393+
version: "18.3.0-canary-9dda16fd",
1038910394
rendererPackageName: "react-native-renderer",
1039010395
rendererConfig: {
1039110396
getInspectorDataForInstance: getInspectorDataForInstance,
@@ -10441,7 +10446,7 @@ var roots = new Map(),
1044110446
scheduleRoot: null,
1044210447
setRefreshHandler: null,
1044310448
getCurrentFiber: null,
10444-
reconcilerVersion: "18.3.0-canary-b2e48ba9"
10449+
reconcilerVersion: "18.3.0-canary-9dda16fd"
1044510450
});
1044610451
exports.createPortal = function (children, containerTag) {
1044710452
return createPortal$1(

compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js

+9-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<83d99d0c79ddb75f425e727a1ae48bd3>>
10+
* @generated SignedSource<<2b24b949db80030833f17449b6904d8c>>
1111
*/
1212

1313
"use strict";
@@ -2948,8 +2948,8 @@ to return true:wantsResponderID| |
29482948
dynamicFlags.enableComponentStackLocations,
29492949
enableDeferRootSchedulingToMicrotask =
29502950
dynamicFlags.enableDeferRootSchedulingToMicrotask,
2951-
enableUseRefAccessWarning = dynamicFlags.enableUseRefAccessWarning;
2952-
// The rest of the flags are static for better dead code elimination.
2951+
enableUseRefAccessWarning = dynamicFlags.enableUseRefAccessWarning,
2952+
enableUnifiedSyncLane = dynamicFlags.enableUnifiedSyncLane; // The rest of the flags are static for better dead code elimination.
29532953
var enableSchedulingProfiler = true;
29542954
var enableProfilerTimer = true;
29552955
var enableProfilerCommitHooks = true;
@@ -4896,7 +4896,9 @@ to return true:wantsResponderID| |
48964896
var DefaultLane =
48974897
/* */
48984898
32;
4899-
var SyncUpdateLanes = SyncLane | InputContinuousLane | DefaultLane;
4899+
var SyncUpdateLanes = enableUnifiedSyncLane
4900+
? SyncLane | InputContinuousLane | DefaultLane
4901+
: SyncLane;
49004902
var TransitionHydrationLane =
49014903
/* */
49024904
64;
@@ -5052,7 +5054,7 @@ to return true:wantsResponderID| |
50525054
var nextRetryLane = RetryLane1;
50535055

50545056
function getHighestPriorityLanes(lanes) {
5055-
{
5057+
if (enableUnifiedSyncLane) {
50565058
var pendingSyncLanes = lanes & SyncUpdateLanes;
50575059

50585060
if (pendingSyncLanes !== 0) {
@@ -5652,7 +5654,7 @@ to return true:wantsResponderID| |
56525654
var renderLane = getHighestPriorityLane(renderLanes);
56535655
var lane;
56545656

5655-
if ((renderLane & SyncUpdateLanes) !== NoLane) {
5657+
if (enableUnifiedSyncLane && (renderLane & SyncUpdateLanes) !== NoLane) {
56565658
lane = SyncHydrationLane;
56575659
} else {
56585660
switch (renderLane) {
@@ -28456,7 +28458,7 @@ to return true:wantsResponderID| |
2845628458
return root;
2845728459
}
2845828460

28459-
var ReactVersion = "18.3.0-canary-589e7bda";
28461+
var ReactVersion = "18.3.0-canary-a4796866";
2846028462

2846128463
function createPortal$1(
2846228464
children,

0 commit comments

Comments
 (0)