-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: ensure errorEmitted is always set #28709
Conversation
@mcollina ping (sorry for spam?) |
44e5572
to
51428f8
Compare
51428f8
to
d7bc957
Compare
Would you mind adding another unit test on the actual behavior change? What consequences has setting |
@mcollina: Not sure what you expect there :/ |
I don't know why you are proposing this change. What's the end user result for this? |
@mcollina: Because sometimes e.g. _writable_stream: SET https://github.com/nodejs/node/blob/master/lib/_stream_writable.js#L431 NOT SET https://github.com/nodejs/node/blob/master/lib/_stream_writable.js#L252 |
+1. I prefer tests that try to double-emit errors and we block them rather than tests about internals. That's what I'm asking for.
I'm conservative of changes, as every change we do to streams can break a lot of people. |
Thank you. Makes sense.
Haha, I guess that is your job. I'm very keen on consistency and predicability. Unfortunately at the moment it is almost a requirement to read the Node code to figure out how things actually work before using them. I will try to help out within your zone. |
I agree, we should be running CITGM for the event and stream-related changes in this and the other PRs. |
d7bc957
to
821cc7a
Compare
@mcollina tests updated |
432d8b2
to
a2b670a
Compare
1c99240
to
f018384
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
1 similar comment
Can you rebase on top of master? CITGM is failing because of that esm bug. |
f018384
to
51d97bf
Compare
Rebased. |
This was fixed in 4a2bd69 |
_writableState.errorEmitted
should always be set onerror
.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes