Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify RootDidNotComplete and RootSuspendedWithDelay exit path #31547

Merged
merged 3 commits into from
Nov 15, 2024

Conversation

sebmarkbage
Copy link
Collaborator

Also rename RootDidNotComplete to RootSuspendedAtTheShell since it specifically means something suspended in the shell during hydration.

Copy link

vercel bot commented Nov 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 15, 2024 1:06am

// cases where need to exit the current render without producing a
// consistent tree or committing.
const didAttemptEntireTree = !workInProgressRootDidSkipSuspendedSiblings;
markRootSuspended(root, lanes, NoLane, didAttemptEntireTree);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the else branch we just fall through to finishConcurrentRender since we won't be concurrent and it doesn't match the explicit exitStatus checks.

Therefore we enter the same path as RootSuspendedWithDelay and we can use the same code path.

didAttemptEntireTree,
);
return;
if (!includesOnlyTransitions(lanes)) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the subtle difference that RootSuspendedWithDelay checks the lanes but maybe we should just do that before setting the flag in the first place?

@react-sizebot
Copy link

Comparing: 63cde68...8f8b017

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB = 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 509.09 kB 508.90 kB = 91.00 kB 90.98 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 514.03 kB 513.84 kB = 91.71 kB 91.68 kB
facebook-www/ReactDOM-prod.classic.js = 588.71 kB 588.52 kB = 104.18 kB 104.16 kB
facebook-www/ReactDOM-prod.modern.js = 578.98 kB 578.79 kB = 102.59 kB 102.57 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against ffe8253

@sebmarkbage sebmarkbage merged commit 8a41d6c into facebook:main Nov 15, 2024
184 checks passed
github-actions bot pushed a commit that referenced this pull request Nov 15, 2024
Also rename RootDidNotComplete to RootSuspendedAtTheShell since it
specifically means something suspended in the shell during hydration.

DiffTrain build for [8a41d6c](8a41d6c)
github-actions bot pushed a commit that referenced this pull request Nov 15, 2024
Also rename RootDidNotComplete to RootSuspendedAtTheShell since it
specifically means something suspended in the shell during hydration.

DiffTrain build for [8a41d6c](8a41d6c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants