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

Add WarningAggregator, improve unused stream warning #1790

Merged
merged 2 commits into from
Mar 11, 2024

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Mar 8, 2024

EW-8204

The unused stream warning emitted when a tee'd branch of an internal stream is left unconsumed is spammy and not very helpful. This change improves things by ensuring that only one instance of the warning per IoContext is emitted, aggregating all of the information about branches that are not read. The warning message is further augmented to include the JavaScript stack trace locations where each of the unconsumed branches were created.

image

The unused stream warning emitted when a tee'd branch of an internal
stream is left unconsumed is spammy and not very helpful. This change
improves things by ensuring that only one instance of the warning per
IoContext is emitted, aggregating all of the information about branches
that are not read. The warning message is further augmented to include
the JavaScript stack trace locations where each of the unconsumed
branches were created.
@irvinebroque
Copy link
Collaborator

Nice one! LGTM

@jasnell jasnell requested a review from mrbbot March 11, 2024 14:23
@jasnell jasnell merged commit 5c88eed into main Mar 11, 2024
10 checks passed
@jasnell jasnell deleted the jsnell/warning-aggregator branch March 11, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants