-
Notifications
You must be signed in to change notification settings - Fork 47k
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
[Flight] Wire up async_hooks in Node.js DEV for inspecting Promises #27840
Conversation
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.
This is a DEV only feature.
9a963d8
to
2ba9670
Compare
@@ -117,6 +118,8 @@ import binaryToComparableString from 'shared/binaryToComparableString'; | |||
|
|||
import {SuspenseException, getSuspendedThenable} from './ReactFlightThenable'; | |||
|
|||
initAsyncDebugInfo(); |
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.
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. |
273e0ba
to
52c924e
Compare
### React upstream changes - facebook/react#27888 - facebook/react#27870 - facebook/react#27871 - facebook/react#27850 - facebook/react#27839 - facebook/react#27842 - facebook/react#27841 - facebook/react#27840 - facebook/react#27761 - facebook/react#27831 - facebook/react#27801 Closes NEXT-2012
…acebook#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.
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.