Skip to content

Commit

Permalink
Unify RootDidNotComplete and RootSuspendedWithDelay exit path (#31547)
Browse files Browse the repository at this point in the history
Also rename RootDidNotComplete to RootSuspendedAtTheShell since it
specifically means something suspended in the shell during hydration.

DiffTrain build for [8a41d6c](8a41d6c)
  • Loading branch information
sebmarkbage committed Nov 15, 2024
1 parent 23caea5 commit 654531f
Show file tree
Hide file tree
Showing 23 changed files with 1,009 additions and 1,129 deletions.
2 changes: 1 addition & 1 deletion compiled-rn/VERSION_NATIVE_FB
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19.0.0-native-fb-63cde684-20241114
19.0.0-native-fb-8a41d6ce-20241114
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<8db1f8874a2129441c0608ba9c2990d8>>
* @generated SignedSource<<e2b02597f5f6e76346b562d3b5eac4a5>>
*/

"use strict";
Expand Down Expand Up @@ -420,5 +420,5 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.0.0-native-fb-63cde684-20241114";
exports.version = "19.0.0-native-fb-8a41d6ce-20241114";
})();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<83fb924d282a538071fd7ba1e0da3445>>
* @generated SignedSource<<ffc966a7a8316af7b427548b9f1f97c3>>
*/

"use strict";
Expand Down Expand Up @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-native-fb-63cde684-20241114";
exports.version = "19.0.0-native-fb-8a41d6ce-20241114";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<83fb924d282a538071fd7ba1e0da3445>>
* @generated SignedSource<<ffc966a7a8316af7b427548b9f1f97c3>>
*/

"use strict";
Expand Down Expand Up @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-native-fb-63cde684-20241114";
exports.version = "19.0.0-native-fb-8a41d6ce-20241114";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<08dd0acbab1ea61c3d23358abf5fa96d>>
* @generated SignedSource<<d08636572d2a0e15dabed9c456dfb85e>>
*/

/*
Expand Down Expand Up @@ -15030,14 +15030,7 @@ __DEV__ &&
!shouldTimeSlice &&
markRootSuspended(root, lanes, 0, !1);
break;
} else if (exitStatus === RootDidNotComplete)
markRootSuspended(
root,
lanes,
0,
!workInProgressRootDidSkipSuspendedSiblings
);
else {
} else {
forceSync = root.current.alternate;
if (
renderWasConcurrent &&
Expand Down Expand Up @@ -15111,16 +15104,15 @@ __DEV__ &&
case RootFatalErrored:
throw Error("Root did not complete. This is a bug in React.");
case RootSuspendedWithDelay:
if ((lanes & 4194176) === lanes) {
markRootSuspended(
shouldTimeSlice,
lanes,
workInProgressDeferredLane,
!workInProgressRootDidSkipSuspendedSiblings
);
break a;
}
break;
if ((lanes & 4194176) !== lanes) break;
case RootSuspendedAtTheShell:
markRootSuspended(
shouldTimeSlice,
lanes,
workInProgressDeferredLane,
!workInProgressRootDidSkipSuspendedSiblings
);
break a;
case RootErrored:
workInProgressRootRecoverableErrors = null;
break;
Expand Down Expand Up @@ -15537,7 +15529,7 @@ __DEV__ &&
switch (workInProgressSuspendedReason) {
case SuspendedOnHydration:
resetWorkInProgressStack();
memoizedUpdaters = RootDidNotComplete;
memoizedUpdaters = RootSuspendedAtTheShell;
break a;
case SuspendedOnImmediate:
case SuspendedOnData:
Expand Down Expand Up @@ -15717,7 +15709,7 @@ __DEV__ &&
break;
case SuspendedOnHydration:
resetWorkInProgressStack();
workInProgressRootExitStatus = RootDidNotComplete;
workInProgressRootExitStatus = RootSuspendedAtTheShell;
break a;
default:
throw Error(
Expand Down Expand Up @@ -15955,7 +15947,7 @@ __DEV__ &&
}
workInProgress = unitOfWork = next;
} while (null !== unitOfWork);
workInProgressRootExitStatus = RootDidNotComplete;
workInProgressRootExitStatus = RootSuspendedAtTheShell;
workInProgress = null;
}
function commitRoot(
Expand Down Expand Up @@ -24759,8 +24751,8 @@ __DEV__ &&
RootErrored = 2,
RootSuspended = 3,
RootSuspendedWithDelay = 4,
RootSuspendedAtTheShell = 6,
RootCompleted = 5,
RootDidNotComplete = 6,
executionContext = NoContext,
workInProgressRoot = null,
workInProgress = null,
Expand Down Expand Up @@ -25352,11 +25344,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-native-fb-63cde684-20241114" !== isomorphicReactPackageVersion)
if ("19.0.0-native-fb-8a41d6ce-20241114" !== 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-native-fb-63cde684-20241114\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.0.0-native-fb-8a41d6ce-20241114\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -25393,11 +25385,11 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.0.0-native-fb-63cde684-20241114",
version: "19.0.0-native-fb-8a41d6ce-20241114",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-native-fb-63cde684-20241114"
reconcilerVersion: "19.0.0-native-fb-8a41d6ce-20241114"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -25541,5 +25533,5 @@ __DEV__ &&
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.0.0-native-fb-63cde684-20241114";
exports.version = "19.0.0-native-fb-8a41d6ce-20241114";
})();
Loading

0 comments on commit 654531f

Please sign in to comment.