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

[Fizz] Enable owner stacks for SSR #30152

Merged
merged 6 commits into from
Jul 1, 2024
Merged

Conversation

sebmarkbage
Copy link
Collaborator

Stacked on #30142.

This tracks owners and their stacks in DEV in Fizz. We use the ComponentStackNode as the data structure to track this information - effectively like ReactComponentInfo (Server) or Fiber (Client). They're the instance.

I then port them same logic from ReactFiberComponentStack, ReactFiberOwnerStack and ReactFiberCallUserSpace to Fizz equivalents.

This gets us both owner stacks from captureOwnerStack(), as well as appended to console.errors logged by Fizz, while rendering and in onError.

@sebmarkbage sebmarkbage requested review from gnoff and eps1lon July 1, 2024 03:52
Copy link

vercel bot commented Jul 1, 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 Jul 1, 2024 2:21pm

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Jul 1, 2024
@sebmarkbage sebmarkbage changed the title [Fizz] Enable owner stacks [Fizz] Enable owner stacks for SSR Jul 1, 2024
@react-sizebot
Copy link

react-sizebot commented Jul 1, 2024

Comparing: e6783e7...ec4b3fc

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 = 497.99 kB 497.99 kB = 89.27 kB 89.27 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 = 502.81 kB 502.81 kB = 89.97 kB 89.97 kB
facebook-www/ReactDOM-prod.classic.js = 597.08 kB 597.08 kB = 105.33 kB 105.33 kB
facebook-www/ReactDOM-prod.modern.js = 571.42 kB 571.42 kB = 101.27 kB 101.27 kB
oss-experimental/react-server/cjs/react-server.development.js +5.28% 166.14 kB 174.91 kB +5.04% 30.09 kB 31.61 kB
oss-experimental/react-html/cjs/react-html.development.js +2.64% 332.52 kB 341.29 kB +2.32% 60.90 kB 62.31 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.node.development.js +2.43% 360.55 kB 369.32 kB +2.23% 65.07 kB 66.52 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.browser.development.js +2.43% 360.56 kB 369.33 kB +2.23% 65.07 kB 66.52 kB
oss-experimental/react-dom/cjs/react-dom-server.bun.development.js +2.38% 320.68 kB 328.31 kB +2.26% 62.05 kB 63.46 kB
oss-experimental/react-dom/cjs/react-dom-server.node.development.js +2.32% 378.87 kB 387.65 kB +2.16% 67.27 kB 68.72 kB
oss-experimental/react-dom/cjs/react-dom-server.browser.development.js +2.29% 383.40 kB 392.17 kB +2.12% 67.77 kB 69.21 kB
oss-experimental/react-dom/cjs/react-dom-server.edge.development.js +2.28% 383.95 kB 392.72 kB +2.12% 67.87 kB 69.30 kB
oss-stable-rc/react-server/cjs/react-server.development.js +2.27% 155.62 kB 159.16 kB +1.96% 28.43 kB 28.99 kB
oss-stable-semver/react-server/cjs/react-server.development.js +2.27% 155.62 kB 159.16 kB +1.96% 28.43 kB 28.99 kB
oss-stable/react-server/cjs/react-server.development.js +2.27% 155.62 kB 159.16 kB +1.96% 28.43 kB 28.99 kB
test_utils/ReactAllWarnings.js Deleted 62.88 kB 0.00 kB Deleted 15.69 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-experimental/react-server/cjs/react-server.development.js +5.28% 166.14 kB 174.91 kB +5.04% 30.09 kB 31.61 kB
oss-experimental/react-html/cjs/react-html.development.js +2.64% 332.52 kB 341.29 kB +2.32% 60.90 kB 62.31 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.node.development.js +2.43% 360.55 kB 369.32 kB +2.23% 65.07 kB 66.52 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.browser.development.js +2.43% 360.56 kB 369.33 kB +2.23% 65.07 kB 66.52 kB
oss-experimental/react-dom/cjs/react-dom-server.bun.development.js +2.38% 320.68 kB 328.31 kB +2.26% 62.05 kB 63.46 kB
oss-experimental/react-dom/cjs/react-dom-server.node.development.js +2.32% 378.87 kB 387.65 kB +2.16% 67.27 kB 68.72 kB
oss-experimental/react-dom/cjs/react-dom-server.browser.development.js +2.29% 383.40 kB 392.17 kB +2.12% 67.77 kB 69.21 kB
oss-experimental/react-dom/cjs/react-dom-server.edge.development.js +2.28% 383.95 kB 392.72 kB +2.12% 67.87 kB 69.30 kB
oss-stable-rc/react-server/cjs/react-server.development.js +2.27% 155.62 kB 159.16 kB +1.96% 28.43 kB 28.99 kB
oss-stable-semver/react-server/cjs/react-server.development.js +2.27% 155.62 kB 159.16 kB +1.96% 28.43 kB 28.99 kB
oss-stable/react-server/cjs/react-server.development.js +2.27% 155.62 kB 159.16 kB +1.96% 28.43 kB 28.99 kB
oss-experimental/react-html/cjs/react-html.react-server.development.js +1.86% 475.27 kB 484.10 kB +1.76% 86.14 kB 87.66 kB
oss-stable-rc/react-dom/cjs/react-dom-server-legacy.node.development.js +1.04% 341.72 kB 345.26 kB +0.87% 62.62 kB 63.16 kB
oss-stable-semver/react-dom/cjs/react-dom-server-legacy.node.development.js +1.04% 341.72 kB 345.26 kB +0.87% 62.62 kB 63.16 kB
oss-stable-rc/react-dom/cjs/react-dom-server-legacy.browser.development.js +1.04% 341.73 kB 345.27 kB +0.87% 62.62 kB 63.16 kB
oss-stable-semver/react-dom/cjs/react-dom-server-legacy.browser.development.js +1.04% 341.73 kB 345.27 kB +0.87% 62.62 kB 63.16 kB
oss-stable/react-dom/cjs/react-dom-server-legacy.node.development.js +1.04% 341.75 kB 345.29 kB +0.86% 62.64 kB 63.18 kB
oss-stable/react-dom/cjs/react-dom-server-legacy.browser.development.js +1.04% 341.75 kB 345.29 kB +0.86% 62.64 kB 63.18 kB
oss-stable-rc/react-dom/cjs/react-dom-server.node.development.js +1.01% 348.99 kB 352.53 kB +0.84% 63.22 kB 63.75 kB
oss-stable-semver/react-dom/cjs/react-dom-server.node.development.js +1.01% 348.99 kB 352.53 kB +0.84% 63.22 kB 63.75 kB
oss-stable/react-dom/cjs/react-dom-server.node.development.js +1.01% 349.06 kB 352.60 kB +0.83% 63.24 kB 63.77 kB
oss-stable-rc/react-dom/cjs/react-dom-server.browser.development.js +1.00% 353.85 kB 357.39 kB +0.86% 64.52 kB 65.08 kB
oss-stable-semver/react-dom/cjs/react-dom-server.browser.development.js +1.00% 353.85 kB 357.39 kB +0.86% 64.52 kB 65.08 kB
oss-stable/react-dom/cjs/react-dom-server.browser.development.js +1.00% 353.92 kB 357.46 kB +0.86% 64.55 kB 65.10 kB
oss-stable-rc/react-dom/cjs/react-dom-server.edge.development.js +1.00% 354.40 kB 357.94 kB +0.87% 64.61 kB 65.17 kB
oss-stable-semver/react-dom/cjs/react-dom-server.edge.development.js +1.00% 354.40 kB 357.94 kB +0.87% 64.61 kB 65.17 kB
oss-stable/react-dom/cjs/react-dom-server.edge.development.js +1.00% 354.47 kB 358.01 kB +0.86% 64.64 kB 65.20 kB
oss-stable-rc/react-dom/cjs/react-dom-server.bun.development.js +0.96% 303.46 kB 306.36 kB +0.84% 59.63 kB 60.13 kB
oss-stable-semver/react-dom/cjs/react-dom-server.bun.development.js +0.96% 303.46 kB 306.36 kB +0.84% 59.63 kB 60.13 kB
oss-stable/react-dom/cjs/react-dom-server.bun.development.js +0.96% 303.53 kB 306.43 kB +0.84% 59.65 kB 60.15 kB
facebook-www/ReactDOMServerStreaming-dev.modern.js +0.95% 346.33 kB 349.61 kB +0.91% 62.93 kB 63.50 kB
facebook-www/ReactDOMServer-dev.modern.js +0.93% 353.78 kB 357.06 kB +0.88% 64.13 kB 64.69 kB
facebook-www/ReactDOMServer-dev.classic.js +0.92% 355.86 kB 359.14 kB +0.83% 64.57 kB 65.11 kB
oss-stable-rc/react-server/cjs/react-server.production.js +0.24% 106.25 kB 106.51 kB +0.09% 19.48 kB 19.49 kB
oss-stable-semver/react-server/cjs/react-server.production.js +0.24% 106.25 kB 106.51 kB +0.09% 19.48 kB 19.49 kB
oss-stable/react-server/cjs/react-server.production.js +0.24% 106.25 kB 106.51 kB +0.09% 19.48 kB 19.49 kB
oss-experimental/react-server/cjs/react-server.production.js +0.22% 116.76 kB 117.02 kB +0.08% 21.08 kB 21.10 kB
test_utils/ReactAllWarnings.js Deleted 62.88 kB 0.00 kB Deleted 15.69 kB 0.00 kB

Generated by 🚫 dangerJS against ec4b3fc

We use the ComponentStackNode to represent the current component.
I don't know why this doesn't work with the gating mechanism.
Now that we have owners in Fizz we can add the missing context in the error
message that the client and jsx had.

I don't think this context is very useful now that we have good stacks but
it is at least parity.
@sebmarkbage sebmarkbage merged commit 315109b into facebook:main Jul 1, 2024
139 checks passed
github-actions bot pushed a commit that referenced this pull request Jul 1, 2024
Stacked on #30142.

This tracks owners and their stacks in DEV in Fizz. We use the
ComponentStackNode as the data structure to track this information -
effectively like ReactComponentInfo (Server) or Fiber (Client). They're
the instance.

I then port them same logic from ReactFiberComponentStack,
ReactFiberOwnerStack and ReactFiberCallUserSpace to Fizz equivalents.

This gets us both owner stacks from `captureOwnerStack()`, as well as
appended to console.errors logged by Fizz, while rendering and in
onError.

DiffTrain build for [315109b](315109b)
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