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
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.errorEmittedshould always be set onerror.Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes