-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
stream: writable write emit all errors async #29744
Conversation
cc09dcf
to
37e138b
Compare
bfc0730
to
bccf4b3
Compare
@nodejs/streams |
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.
I agree in principle, but I fear this might break some code.
New failure after pushing cosmetic fixup. I guess Travis does a rebase when running and something new in master made it fail. Investigating. |
rebased and fixed test |
fc535b6
to
b5ee8a9
Compare
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.
LGTM
@Trott @benjamingr This needs another review, ping nodejs/streams? |
@nodejs/streams |
/ping @nodejs/tsc this needs another review |
@mcollina: I've brought this up to date with recent changes in master. Please take another look. |
ce8b7b7
to
35225e4
Compare
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.
Still LGTM
e2a49e4
to
3e59684
Compare
3e59684
to
6708f17
Compare
@Trott: Another CITGM? |
CITGM looks good. CI does not, but I think that's a problem on CI right now and not a problem with this PR. I'll ping the other Build folks via IRC or an issue in the |
errorOrDestroy emits 'error' synchronously due to compat reasons. However, it should be possible to use correct async behaviour for new code.
589e4e2
to
909706d
Compare
Rebased to fix conflicts. Needs another CI. |
CI |
@BridgeAR: Is this waiting for anything at the moment or is it just baking? |
The CI must be green. Our process is relatively well documented. I suggest you could just check some of our markdown files :) |
Since this is semver-major it also requires two TSC LGs. |
I've never seen all CI's green (nor CITGM) and I don't quite understand the output enough to determine what is relevant and "good enough". I'll see if I can ask someone to explain it to me.
Ah yes, this I did know. Maybe @addaleax? |
errorOrDestroy emits 'error' synchronously due to compat reasons. However, it should be possible to use correct async behaviour for new code. PR-URL: #29744 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
Landed in 75b30c6 |
Currently
write
sometimes throws/emits synchronously and sometimes asynchronously. Also, the callback is sometimes called before and sometimes after the'error'
.This PR brings consistency in "correctly" emitting all errors in
write
asynchronously after the callback.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes