stream, http, http2: make all stream.end() call return this#18780
stream, http, http2: make all stream.end() call return this#18780mcollina wants to merge 3 commits intonodejs:masterfrom
Conversation
|
cc @mafintosh @nodejs/streams |
|
Can this change in return type really be justified? Also:
|
|
@mcollina I'm guessing we missed some context - any reading material about this change or some rationale? |
|
Adding a return type where there was previously not one should not be semver-major as it shouldn't break any prior assumptions. |
|
@jasnell uhh.. I think it can break assumptions? I've seen |
|
Bleh, ok. Major it is then. |
|
I forgot to put the label on it, the intention is it to be semver-major. Basically this cleans up the situation for .end() in streams. Currently we have net and tls that return this, the stream module that returns undefined, and http that return whatever _send() returns. I thought that the least disruptive change would be to have it return this everywhere. |
benjamingr
left a comment
There was a problem hiding this comment.
Thanks, that explains it and this does bring consistency. Actual code LGTM
doc/api/http.md
Outdated
There was a problem hiding this comment.
Nit: how about using just ClientRequest to be consistent with the other comments?
|
@mscdex are you ok with this change then? |
|
Landed as f6721c2, 8118da7 and 3d93f39. |
PR-URL: #18780 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: #18780 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: #18780 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
|
Awesome work, adding "don't land on" tags. |
PR-URL: nodejs#18780 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs#18780 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs#18780 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This PR make all the instances of
stream.end()return this. This includes both http and http2 pseudo-writables.Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
stream, http, http2