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

Include error name in error chunks #32157

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Jan 22, 2025

Follow-up to #32116

resolveErrorDev is used for error values and error chunks. However, https://github.com/facebook/react/pull/32116only included the name in error values so error chunks were deserialized with an undefined name e.g. when we fail to serialize the error message

undefined: An error occurred but serializing the error message failed.

-- https://github.com/vercel/next.js/actions/runs/12872159135/job/35887113469?pr=75110#step:32:302

Included some types for error info that are shared between Client and Server to avoid these bugs where we only consider error values and not chunks in the future.

}

export type ReactErrorInfoDev = {
+digest?: string,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We currently don't transport the digest in error values. I don't see why we shouldn't.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Might be awkward with undefined vs not defined and it didn't really come up yet anyway.

@react-sizebot
Copy link

react-sizebot commented Jan 22, 2025

Comparing: b000019...6cdf20c

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 = 514.24 kB 514.24 kB = 91.73 kB 91.73 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 = 557.28 kB 557.28 kB = 98.97 kB 98.97 kB
facebook-www/ReactDOM-prod.classic.js = 595.79 kB 595.79 kB = 104.85 kB 104.85 kB
facebook-www/ReactDOM-prod.modern.js = 586.21 kB 586.21 kB = 103.30 kB 103.30 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-debug-tools/cjs/react-debug-tools.development.js = 32.24 kB 31.60 kB = 5.77 kB 5.69 kB
oss-stable-semver/react-debug-tools/cjs/react-debug-tools.development.js = 32.24 kB 31.60 kB = 5.77 kB 5.69 kB
oss-stable/react-debug-tools/cjs/react-debug-tools.development.js = 32.24 kB 31.60 kB = 5.77 kB 5.69 kB
oss-experimental/react-debug-tools/cjs/react-debug-tools.production.js = 28.72 kB 28.15 kB = 5.64 kB 5.56 kB
oss-stable-semver/react-debug-tools/cjs/react-debug-tools.production.js = 28.72 kB 28.15 kB = 5.64 kB 5.56 kB
oss-stable/react-debug-tools/cjs/react-debug-tools.production.js = 28.72 kB 28.15 kB = 5.64 kB 5.56 kB

Generated by 🚫 dangerJS against d4b0a1e

Copy link
Collaborator

@unstubbable unstubbable left a comment

Choose a reason for hiding this comment

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

Thank you!

@eps1lon eps1lon merged commit 5f05181 into facebook:main Jan 22, 2025
188 checks passed
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