-
Notifications
You must be signed in to change notification settings - Fork 49.3k
[Flight] Dedupe objects serialized as Debug Models in a separate set #33583
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
Conversation
if ( | ||
__DEV__ && | ||
enableAsyncDebugInfo && | ||
(typeof resolve !== 'function' || !(resolve: any).isReactInternalListener) |
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 microtask here means that cycles don't resolve synchronously which means that console logs can miss them. This is not the only thing that can be async though. If you console log a client reference that hasn't loaded yet you get the same problem.
In the future, we should really make sure that the debug info can be parsed async while retaining console log order.
Going to land this so that we can get the deduping in. |
Follow up to #33583. I forgot to rename these too.
Stacked on #33539.
Stores dedupes of
renderConsoleValue
in a separate set. This allows us to dedupe objects safely since we can't write objects using this algorithm if they might also be referenced by the "real" serialization.Also renamed it to
renderDebugModel
since it's not just for console anymore.