Skip to content

Commit

Permalink
Log Render Phases that Never Committed (#31548)
Browse files Browse the repository at this point in the history
This includes:

- `Interrupted Render`: Interrupted Renders (setState or ping at higher
priority)
- `Prewarm`: Suspended Renders outside a Suspense boundary
(RootSuspendedWithDelay/RootSuspendedAtTheShell)
- `Errored Render`: Render that errored somewhere in the tree (Fatal or
Not) (which may or may not be retried and then complete)
- `Teared Render`: Due to useSyncExternalStore not matching (which will
do another sync attempt)

Suspended Commit:

<img width="893" alt="Screenshot 2024-11-14 at 11 47 40 PM"
src="https://github.com/user-attachments/assets/b25a6a8b-a5e9-4d66-b325-57aef4bf9dad">

Errored with a second recovery attempt that also errors:

<img width="976" alt="Screenshot 2024-11-15 at 12 09 06 AM"
src="https://github.com/user-attachments/assets/9ce52cbb-b587-4f1e-8b67-e51d9073ae5b">

DiffTrain build for [3720870](3720870)
  • Loading branch information
sebmarkbage committed Nov 15, 2024
1 parent 654531f commit 2be2b99
Show file tree
Hide file tree
Showing 23 changed files with 327 additions and 239 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-8a41d6ce-20241114
19.0.0-native-fb-3720870a-20241115
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<e2b02597f5f6e76346b562d3b5eac4a5>>
* @generated SignedSource<<a798802247e4c93dc93c4ea338dfcea0>>
*/

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

"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-8a41d6ce-20241114";
exports.version = "19.0.0-native-fb-3720870a-20241115";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<ffc966a7a8316af7b427548b9f1f97c3>>
* @generated SignedSource<<a12a99f2312342ef445af51ce5717917>>
*/

"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-8a41d6ce-20241114";
exports.version = "19.0.0-native-fb-3720870a-20241115";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<d08636572d2a0e15dabed9c456dfb85e>>
* @generated SignedSource<<aed3c5844e5883b854dbc5609f1b1436>>
*/

/*
Expand Down Expand Up @@ -15133,6 +15133,7 @@ __DEV__ &&
workInProgressDeferredLane,
workInProgressRootInterleavedUpdatedLanes,
workInProgressSuspendedRetryLanes,
exitStatus,
IMMEDIATE_COMMIT,
renderStartTime,
0
Expand All @@ -15141,11 +15142,11 @@ __DEV__ &&
if (
(lanes & 62914560) === lanes &&
(alwaysThrottleRetries || exitStatus === RootSuspended) &&
((exitStatus =
((renderWasConcurrent =
globalMostRecentFallbackTime +
FALLBACK_THROTTLE_MS -
now$1()),
10 < exitStatus)
10 < renderWasConcurrent)
) {
markRootSuspended(
shouldTimeSlice,
Expand All @@ -15167,11 +15168,12 @@ __DEV__ &&
workInProgressRootInterleavedUpdatedLanes,
workInProgressSuspendedRetryLanes,
workInProgressRootDidSkipSuspendedSiblings,
exitStatus,
THROTTLED_COMMIT,
renderStartTime,
0
),
exitStatus
renderWasConcurrent
);
break a;
}
Expand All @@ -15186,6 +15188,7 @@ __DEV__ &&
workInProgressRootInterleavedUpdatedLanes,
workInProgressSuspendedRetryLanes,
workInProgressRootDidSkipSuspendedSiblings,
exitStatus,
IMMEDIATE_COMMIT,
renderStartTime,
0
Expand Down Expand Up @@ -15216,6 +15219,7 @@ __DEV__ &&
updatedLanes,
suspendedRetryLanes,
didSkipSuspendedSiblings,
exitStatus,
suspendedCommitReason,
completedRenderStartTime,
completedRenderEndTime
Expand All @@ -15238,6 +15242,7 @@ __DEV__ &&
spawnedLane,
updatedLanes,
suspendedRetryLanes,
exitStatus,
SUSPENDED_COMMIT,
completedRenderStartTime,
completedRenderEndTime
Expand All @@ -15259,6 +15264,7 @@ __DEV__ &&
spawnedLane,
updatedLanes,
suspendedRetryLanes,
exitStatus,
suspendedCommitReason,
completedRenderStartTime,
completedRenderEndTime
Expand Down Expand Up @@ -15958,6 +15964,7 @@ __DEV__ &&
spawnedLane,
updatedLanes,
suspendedRetryLanes,
exitStatus,
suspendedCommitReason,
completedRenderStartTime,
completedRenderEndTime
Expand All @@ -15976,6 +15983,7 @@ __DEV__ &&
spawnedLane,
updatedLanes,
suspendedRetryLanes,
exitStatus,
suspendedCommitReason,
completedRenderStartTime,
completedRenderEndTime
Expand Down Expand Up @@ -25344,11 +25352,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-native-fb-8a41d6ce-20241114" !== isomorphicReactPackageVersion)
if ("19.0.0-native-fb-3720870a-20241115" !== 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-8a41d6ce-20241114\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.0.0-native-fb-3720870a-20241115\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -25385,11 +25393,11 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.0.0-native-fb-8a41d6ce-20241114",
version: "19.0.0-native-fb-3720870a-20241115",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-native-fb-8a41d6ce-20241114"
reconcilerVersion: "19.0.0-native-fb-3720870a-20241115"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -25533,5 +25541,5 @@ __DEV__ &&
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.0.0-native-fb-8a41d6ce-20241114";
exports.version = "19.0.0-native-fb-3720870a-20241115";
})();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<85881c516b5a54f437a6a23f57e458bb>>
* @generated SignedSource<<898c5585689cafb6710c089e8df349ba>>
*/

/*
Expand Down Expand Up @@ -10911,8 +10911,8 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
if (
(lanes & 62914560) === lanes &&
(alwaysThrottleRetries || 3 === renderWasConcurrent) &&
((renderWasConcurrent = globalMostRecentFallbackTime + 300 - now()),
10 < renderWasConcurrent)
((exitStatus = globalMostRecentFallbackTime + 300 - now()),
10 < exitStatus)
) {
markRootSuspended(
shouldTimeSlice,
Expand All @@ -10934,11 +10934,12 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
workInProgressRootInterleavedUpdatedLanes,
workInProgressSuspendedRetryLanes,
workInProgressRootDidSkipSuspendedSiblings,
renderWasConcurrent,
2,
-0,
0
),
renderWasConcurrent
exitStatus
);
break a;
}
Expand All @@ -10953,6 +10954,7 @@ function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
workInProgressRootInterleavedUpdatedLanes,
workInProgressSuspendedRetryLanes,
workInProgressRootDidSkipSuspendedSiblings,
renderWasConcurrent,
0,
-0,
0
Expand Down Expand Up @@ -10982,6 +10984,7 @@ function commitRootWhenReady(
updatedLanes,
suspendedRetryLanes,
didSkipSuspendedSiblings,
exitStatus,
suspendedCommitReason,
completedRenderStartTime,
completedRenderEndTime
Expand All @@ -11004,6 +11007,7 @@ function commitRootWhenReady(
spawnedLane,
updatedLanes,
suspendedRetryLanes,
exitStatus,
1,
completedRenderStartTime,
completedRenderEndTime
Expand All @@ -11020,6 +11024,7 @@ function commitRootWhenReady(
spawnedLane,
updatedLanes,
suspendedRetryLanes,
exitStatus,
suspendedCommitReason,
completedRenderStartTime,
completedRenderEndTime
Expand Down Expand Up @@ -11570,6 +11575,7 @@ function commitRoot(
spawnedLane,
updatedLanes,
suspendedRetryLanes,
exitStatus,
suspendedCommitReason,
completedRenderStartTime,
completedRenderEndTime
Expand All @@ -11588,6 +11594,7 @@ function commitRoot(
spawnedLane,
updatedLanes,
suspendedRetryLanes,
exitStatus,
suspendedCommitReason,
completedRenderStartTime,
completedRenderEndTime
Expand Down Expand Up @@ -15630,14 +15637,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1697 = React.version;
if (
"19.0.0-native-fb-8a41d6ce-20241114" !==
"19.0.0-native-fb-3720870a-20241115" !==
isomorphicReactPackageVersion$jscomp$inline_1697
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1697,
"19.0.0-native-fb-8a41d6ce-20241114"
"19.0.0-native-fb-3720870a-20241115"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -15659,11 +15666,11 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2155 = {
bundleType: 0,
version: "19.0.0-native-fb-8a41d6ce-20241114",
version: "19.0.0-native-fb-3720870a-20241115",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-native-fb-8a41d6ce-20241114"
reconcilerVersion: "19.0.0-native-fb-3720870a-20241115"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2156 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -15767,4 +15774,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.0.0-native-fb-8a41d6ce-20241114";
exports.version = "19.0.0-native-fb-3720870a-20241115";
Loading

0 comments on commit 2be2b99

Please sign in to comment.