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 component stack to invariants #18315

Closed

Conversation

bl00mber
Copy link
Contributor

close #11619

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 15, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 83c372b:

Sandbox Source
magical-https-5t23x Configuration

@bl00mber bl00mber force-pushed the patch-add-stack-to-invariant branch from 1148b62 to 94889f6 Compare March 15, 2020 15:30
@sizebot
Copy link

sizebot commented Mar 15, 2020

Details of bundled changes.

Comparing: 730389b...83c372b

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactDOM-profiling.js 0.0% 0.0% 427.69 KB 427.72 KB 77.63 KB 77.64 KB FB_WWW_PROFILING
react-dom-test-utils.production.min.js 0.0% -0.1% 12.29 KB 12.29 KB 4.52 KB 4.52 KB NODE_PROD
react-dom-unstable-native-dependencies.development.js 0.0% -0.0% 58.22 KB 58.22 KB 14.53 KB 14.53 KB UMD_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% 0.0% 10.31 KB 10.31 KB 3.49 KB 3.49 KB UMD_PROD
ReactDOMForked-dev.js 0.0% 0.0% 981.76 KB 982.05 KB 218.17 KB 218.21 KB FB_WWW_DEV
ReactDOMForked-prod.js 0.0% 0.0% 410.04 KB 410.08 KB 74.52 KB 74.53 KB FB_WWW_PROD
react-dom.development.js 0.0% 0.0% 902.41 KB 902.61 KB 198.57 KB 198.59 KB UMD_DEV
ReactDOMForked-profiling.js 0.0% 0.0% 427.69 KB 427.72 KB 77.63 KB 77.64 KB FB_WWW_PROFILING
react-dom-server.browser.development.js +0.2% +0.2% 135.83 KB 136.09 KB 34.97 KB 35.03 KB UMD_DEV
react-dom.production.min.js 0.0% 0.0% 118.25 KB 118.27 KB 37.99 KB 37.99 KB UMD_PROD
react-dom-server.browser.production.min.js 0.0% 🔺+0.1% 20.16 KB 20.16 KB 7.46 KB 7.47 KB UMD_PROD
react-dom.profiling.min.js 0.0% 0.0% 121.96 KB 121.98 KB 39.19 KB 39.19 KB UMD_PROFILING
ReactDOMTesting-dev.js 0.0% 0.0% 918.23 KB 918.53 KB 204.8 KB 204.84 KB FB_WWW_DEV
react-dom.development.js 0.0% 0.0% 858.87 KB 859.08 KB 196.07 KB 196.09 KB NODE_DEV
ReactDOMTesting-prod.js 0.0% 0.0% 390.79 KB 390.82 KB 71.17 KB 71.18 KB FB_WWW_PROD
react-dom-server.browser.development.js +0.2% +0.2% 128.87 KB 129.12 KB 34.52 KB 34.58 KB NODE_DEV
react-dom.production.min.js 0.0% 0.0% 118.32 KB 118.34 KB 37.19 KB 37.19 KB NODE_PROD
ReactDOMTesting-profiling.js 0.0% 0.0% 390.79 KB 390.82 KB 71.17 KB 71.18 KB FB_WWW_PROFILING
react-dom-server.browser.production.min.js 0.0% 🔺+0.1% 20.07 KB 20.07 KB 7.42 KB 7.42 KB NODE_PROD
react-dom.profiling.min.js 0.0% 0.0% 122.18 KB 122.2 KB 38.37 KB 38.38 KB NODE_PROFILING
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.1% 1.17 KB 1.17 KB 691 B 692 B UMD_PROD
ReactDOM-dev.js 0.0% 0.0% 981.76 KB 982.05 KB 218.17 KB 218.21 KB FB_WWW_DEV
ReactDOMServer-dev.js +0.2% +0.2% 139.01 KB 139.27 KB 35.48 KB 35.55 KB FB_WWW_DEV
ReactDOM-prod.js 0.0% 0.0% 410.04 KB 410.08 KB 74.52 KB 74.53 KB FB_WWW_PROD
react-dom-test-utils.development.js 0.0% -0.0% 55.27 KB 55.27 KB 15.23 KB 15.23 KB NODE_DEV
ReactDOMServer-prod.js 0.0% 0.0% 47.71 KB 47.73 KB 11.11 KB 11.11 KB FB_WWW_PROD
react-dom-server.node.development.js +0.2% +0.2% 130.09 KB 130.33 KB 34.77 KB 34.84 KB NODE_DEV
react-dom-server.node.production.min.js 0.0% 🔺+0.1% 20.48 KB 20.48 KB 7.57 KB 7.57 KB NODE_PROD

ReactDOM: size: 0.0%, gzip: 0.0%

Size changes (stable)

Generated by 🚫 dangerJS against 83c372b

@sizebot
Copy link

sizebot commented Mar 15, 2020

Details of bundled changes.

Comparing: 730389b...83c372b

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.profiling.min.js 0.0% 0.0% 126.57 KB 126.59 KB 39.59 KB 39.59 KB NODE_PROFILING
react-dom-unstable-fizz.browser.development.js 0.0% +0.1% 3.35 KB 3.35 KB 1.27 KB 1.27 KB UMD_DEV
ReactDOM-dev.js 0.0% 0.0% 935.88 KB 936.18 KB 208.26 KB 208.31 KB FB_WWW_DEV
react-dom-server.browser.development.js +0.2% +0.2% 137.42 KB 137.68 KB 35.17 KB 35.24 KB UMD_DEV
react-dom-server.browser.production.min.js 0.0% 🔺+0.1% 20.62 KB 20.62 KB 7.54 KB 7.54 KB UMD_PROD
react-dom-server.browser.development.js +0.2% +0.2% 130.38 KB 130.63 KB 34.74 KB 34.8 KB NODE_DEV
react-dom-server.browser.production.min.js 0.0% 0.0% 20.53 KB 20.53 KB 7.5 KB 7.5 KB NODE_PROD
react-dom.development.js 0.0% 0.0% 932.89 KB 933.1 KB 203.83 KB 203.85 KB UMD_DEV
react-dom.production.min.js 0.0% 0.0% 122.45 KB 122.47 KB 39.14 KB 39.15 KB UMD_PROD
ReactDOMForked-dev.js 0.0% 0.0% 935.88 KB 936.18 KB 208.26 KB 208.31 KB FB_WWW_DEV
ReactDOMServer-dev.js +0.2% +0.2% 138.16 KB 138.42 KB 35.34 KB 35.41 KB FB_WWW_DEV
react-dom.profiling.min.js 0.0% 0.0% 126.28 KB 126.3 KB 40.39 KB 40.39 KB UMD_PROFILING
ReactDOMForked-prod.js 0.0% 0.0% 383.62 KB 383.65 KB 69.79 KB 69.8 KB FB_WWW_PROD
ReactDOMServer-prod.js 0.0% -0.0% 47.01 KB 47.02 KB 10.93 KB 10.93 KB FB_WWW_PROD
react-dom.development.js 0.0% 0.0% 888.08 KB 888.28 KB 201.33 KB 201.35 KB NODE_DEV
ReactDOMForked-profiling.js 0.0% 0.0% 401.21 KB 401.24 KB 72.83 KB 72.84 KB FB_WWW_PROFILING
react-dom.production.min.js 0.0% 0.0% 122.59 KB 122.61 KB 38.31 KB 38.31 KB NODE_PROD
ReactDOM-prod.js 0.0% 0.0% 383.62 KB 383.65 KB 69.79 KB 69.8 KB FB_WWW_PROD
ReactDOM-profiling.js 0.0% 0.0% 401.21 KB 401.24 KB 72.83 KB 72.84 KB FB_WWW_PROFILING
react-dom-test-utils.development.js 0.0% -0.0% 59.84 KB 59.84 KB 15.86 KB 15.86 KB UMD_DEV
ReactDOMTesting-dev.js 0.0% 0.0% 891.57 KB 891.87 KB 199.31 KB 199.36 KB FB_WWW_DEV
ReactDOMTesting-prod.js 0.0% 0.0% 377.38 KB 377.41 KB 68.99 KB 69 KB FB_WWW_PROD
react-dom-test-utils.development.js 0.0% -0.0% 55.29 KB 55.29 KB 15.24 KB 15.24 KB NODE_DEV
ReactDOMTesting-profiling.js 0.0% 0.0% 377.38 KB 377.41 KB 68.99 KB 69 KB FB_WWW_PROFILING
react-dom-server.node.development.js +0.2% +0.2% 131.6 KB 131.84 KB 34.99 KB 35.06 KB NODE_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 12.3 KB 12.3 KB 4.53 KB 4.53 KB NODE_PROD
react-dom-server.node.production.min.js 0.0% 🔺+0.1% 20.94 KB 20.94 KB 7.65 KB 7.65 KB NODE_PROD

Size changes (experimental)

Generated by 🚫 dangerJS against 83c372b

@bl00mber bl00mber force-pushed the patch-add-stack-to-invariant branch from 94889f6 to 83c372b Compare March 15, 2020 15:39
@bl00mber bl00mber changed the title Include component stack in invariants Include component stack to invariants Mar 15, 2020
@sophiebits
Copy link
Collaborator

I was under the impression that we now tack on a component stack to all errors raised during rendering, in a second message that starts "The above error occurred in the component:". Can you post before and after screenshots of the console?

@bl00mber
Copy link
Contributor Author

bl00mber commented Mar 20, 2020

@sophiebits Yeah this is most likely not relevant

Screenshot from 2020-03-20

@sophiebits
Copy link
Collaborator

It is interesting that in your screenshot the "The above error" message appears before the actual error. Perhaps related to #18101.

However, given that the stack trace does show up it probably does make sense to leave the behavior as-is. I'll close the original issue too. Sorry to make you spend time on something that didn't end up getting merged, but thank you for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include component stack in invariants
4 participants