GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [Flight] Wire up async_hooks in Node.js DEV for inspecting Promises by sebmarkbage · Pull Request #27840 · react/react

Conversation

@sebmarkbage

@sebmarkbage sebmarkbage commented Dec 15, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

This wires up the use of async_hooks in the Node build (as well as the Edge build when a global is available) in DEV mode only. This will be used to track debug info about what suspended during an RSC pass.

Enabled behind a flag for now.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

dai-shi reacted with eyes emoji
All reactions
  • 👀 1 reaction
@sebmarkbage
sebmarkbage requested review from acdlite and gnoff December 15, 2023 22:22
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Dec 15, 2023
@react-sizebot

react-sizebot commented Dec 15, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Comparing: 493610f...52c924e

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.min.js = 175.90 kB 175.90 kB = 54.76 kB 54.75 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 177.97 kB 177.97 kB = 55.39 kB 55.39 kB
facebook-www/ReactDOM-prod.classic.js = 570.21 kB 570.21 kB = 100.35 kB 100.35 kB
facebook-www/ReactDOM-prod.modern.js = 554.06 kB 554.06 kB = 97.43 kB 97.43 kB
test_utils/ReactAllWarnings.js Deleted 67.41 kB 0.00 kB Deleted 16.49 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-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.development.js +0.83% 115.85 kB 116.82 kB +1.26% 27.47 kB 27.81 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js +0.82% 117.92 kB 118.88 kB +1.26% 28.03 kB 28.38 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.production.min.js +0.68% 26.70 kB 26.88 kB +0.56% 9.06 kB 9.11 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.production.min.js +0.68% 26.70 kB 26.88 kB +0.56% 9.06 kB 9.11 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.min.js +0.67% 27.33 kB 27.51 kB +0.54% 9.21 kB 9.26 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.min.js +0.67% 27.33 kB 27.51 kB +0.54% 9.21 kB 9.26 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.production.min.js +0.61% 29.87 kB 30.06 kB +0.53% 9.92 kB 9.97 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.min.js +0.60% 30.51 kB 30.69 kB +0.49% 10.07 kB 10.12 kB
oss-experimental/react-server-dom-esm/cjs/react-server-dom-esm-server.node.development.js +0.58% 112.72 kB 113.37 kB +0.87% 26.32 kB 26.55 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.unbundled.development.js +0.55% 118.13 kB 118.78 kB +0.81% 27.54 kB 27.76 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js +0.54% 120.55 kB 121.20 kB +0.80% 28.18 kB 28.40 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.development.js +0.54% 120.77 kB 121.42 kB +0.79% 28.39 kB 28.61 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js +0.53% 123.19 kB 123.84 kB +0.77% 29.06 kB 29.29 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.production.js +0.29% 92.75 kB 93.02 kB +0.38% 22.23 kB 22.31 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.production.js +0.29% 92.75 kB 93.02 kB +0.38% 22.23 kB 22.31 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.js +0.29% 94.81 kB 95.08 kB +0.39% 22.79 kB 22.88 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.js +0.29% 94.81 kB 95.08 kB +0.39% 22.79 kB 22.88 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.development.js +0.29% 102.45 kB 102.74 kB +0.33% 24.56 kB 24.65 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.development.js +0.29% 102.45 kB 102.74 kB +0.33% 24.56 kB 24.65 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js +0.28% 104.51 kB 104.80 kB +0.34% 25.12 kB 25.20 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js +0.28% 104.51 kB 104.80 kB +0.34% 25.12 kB 25.20 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.production.js +0.26% 104.03 kB 104.31 kB +0.33% 24.56 kB 24.65 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.js +0.26% 106.09 kB 106.36 kB +0.35% 25.14 kB 25.23 kB
oss-experimental/react-is/umd/react-is.development.js = 7.95 kB 7.91 kB = 2.11 kB 2.09 kB
oss-stable-semver/react-is/umd/react-is.development.js = 7.93 kB 7.88 kB = 2.10 kB 2.08 kB
oss-stable/react-is/umd/react-is.development.js = 7.93 kB 7.88 kB = 2.10 kB 2.08 kB
oss-experimental/react-is/cjs/react-is.development.js = 7.35 kB 7.31 kB = 2.01 kB 1.99 kB
oss-stable-semver/react-is/cjs/react-is.development.js = 7.33 kB 7.28 kB = 2.01 kB 1.99 kB
oss-stable/react-is/cjs/react-is.development.js = 7.33 kB 7.28 kB = 2.01 kB 1.99 kB
oss-experimental/react-is/cjs/react-is.production.js = 6.62 kB 6.58 kB = 1.80 kB 1.78 kB
oss-stable-semver/react-is/cjs/react-is.production.js = 6.60 kB 6.55 kB = 1.79 kB 1.77 kB
oss-stable/react-is/cjs/react-is.production.js = 6.60 kB 6.55 kB = 1.79 kB 1.77 kB
test_utils/ReactAllWarnings.js Deleted 67.41 kB 0.00 kB Deleted 16.49 kB 0.00 kB

Generated by 🚫 dangerJS against 52c924e

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sebmarkbage added 3 commits December 15, 2023 17:36
@sebmarkbage
Add Node specific async_hooks config
7da3127
In the Edge build we currently get this from the global object just like
AsyncLocalStorage. This is unfortunate and something we'd like to move away
from.
@sebmarkbage
Add feature flag
72a432c
@sebmarkbage
Enable hooks globally when the flag is on
2ba9670
This is a DEV only feature.
@sebmarkbage
sebmarkbage force-pushed the debuginfo branch from 9a963d8 to 2ba9670 Compare December 15, 2023 22:37
@sebmarkbage sebmarkbage changed the title [Flight] Wire up async [Flight] Wire up async_hooks in Node.js DEV for inspecting Promises Dec 15, 2023
sebmarkbage
sebmarkbage commented Dec 15, 2023
View reviewed changes
Comment thread packages/react-server/src/ReactFlightServer.js

import {SuspenseException, getSuspendedThenable} from './ReactFlightThenable';

initAsyncDebugInfo();

@sebmarkbage sebmarkbage Dec 15, 2023

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The explicit init here is really only due to the module cycle between the implementation and the config since we need createAsyncHook to have been resolved already.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sebmarkbage

sebmarkbage commented Dec 15, 2023

Copy link
Copy Markdown
Contributor Author

Diagnostic Channels were evaluated but they're not detailed enough to trace where something was eventually awaited and what ultimately caused what. It just tells you that it happened.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sebmarkbage
Import executionAsyncId too
52c924e
@sebmarkbage
sebmarkbage force-pushed the debuginfo branch from 273e0ba to 52c924e Compare December 16, 2023 00:55
gnoff
gnoff approved these changes Dec 16, 2023
View reviewed changes
@sebmarkbage
sebmarkbage merged commit 8b8d265 into react:main Dec 16, 2023
@acdlite acdlite mentioned this pull request Jan 8, 2024
Update React from 0cdfef19b to f1039be4a vercel/next.js#60368
Merged
acdlite added a commit to acdlite/next.js that referenced this pull request Jan 8, 2024
@acdlite
Update React from 0cdfef19b to f1039be4a
e8b8060
- react/react#27888
- react/react#27870
- react/react#27871
- react/react#27850
- react/react#27839
- react/react#27842
- react/react#27841
- react/react#27840
- react/react#27761
- react/react#27831
- react/react#27801
acdlite added a commit to vercel/next.js that referenced this pull request Jan 8, 2024
@acdlite
Update React from 0cdfef19b to f1039be4a (#60368)
5e71061
### React upstream changes

- react/react#27888
- react/react#27870
- react/react#27871
- react/react#27850
- react/react#27839
- react/react#27842
- react/react#27841
- react/react#27840
- react/react#27761
- react/react#27831
- react/react#27801

Closes NEXT-2012
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
@sebmarkbage @AndyPengc12
[Flight] Wire up async_hooks in Node.js DEV for inspecting Promises (r…
a52d192
…eact#27840)

This wires up the use of `async_hooks` in the Node build (as well as the
Edge build when a global is available) in DEV mode only. This will be
used to track debug info about what suspended during an RSC pass.

Enabled behind a flag for now.
bigfootjon pushed a commit that referenced this pull request Apr 18, 2024
@sebmarkbage
[Flight] Wire up async_hooks in Node.js DEV for inspecting Promises (#…
c8618d3
…27840)

This wires up the use of `async_hooks` in the Node build (as well as the
Edge build when a global is available) in DEV mode only. This will be
used to track debug info about what suspended during an RSC pass.

Enabled behind a flag for now.

DiffTrain build for commit 8b8d265.
hanzo-dev pushed a commit to hanzoai/react that referenced this pull request Sep 9, 2026
@sebmarkbage
[Flight] Wire up async_hooks in Node.js DEV for inspecting Promises (r…
e427788
…eact#27840)

This wires up the use of `async_hooks` in the Node build (as well as the
Edge build when a global is available) in DEV mode only. This will be
used to track debug info about what suspended during an RSC pass.

Enabled behind a flag for now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gnoff gnoff gnoff approved these changes
@acdlite acdlite Awaiting requested review from acdlite

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@sebmarkbage @react-sizebot @gnoff @facebook-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.