Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upstream, http, http2: make all stream.end() call return this #18780
Conversation
mcollina
requested a review
from
addaleax
Feb 14, 2018
nodejs-github-bot
added
the
lib / src
label
Feb 14, 2018
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Can this change in return type really be justified? Also:
|
benjamingr
added
the
semver-major
label
Feb 14, 2018
This comment has been minimized.
This comment has been minimized.
|
@mcollina I'm guessing we missed some context - any reading material about this change or some rationale? |
This comment has been minimized.
This comment has been minimized.
|
Adding a return type where there was previously not one should not be semver-major as it shouldn't break any prior assumptions. |
jasnell
approved these changes
Feb 14, 2018
This comment has been minimized.
This comment has been minimized.
|
@jasnell uhh.. I think it can break assumptions? I've seen |
BridgeAR
approved these changes
Feb 14, 2018
This comment has been minimized.
This comment has been minimized.
|
Bleh, ok. Major it is then. |
This comment has been minimized.
This comment has been minimized.
|
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
approved these changes
Feb 14, 2018
|
Thanks, that explains it and this does bring consistency. Actual code LGTM |
addaleax
approved these changes
Feb 14, 2018
mcollina
force-pushed the
mcollina:end-this
branch
from
69ac34e
to
cc5937c
Feb 15, 2018
This comment has been minimized.
This comment has been minimized.
lpinca
approved these changes
Feb 15, 2018
| changes: | ||
| - version: REPLACEME | ||
| pr-url: https://github.com/nodejs/node/pull/18780 | ||
| description: This method now returns a reference to `http.ClientRequest`. |
This comment has been minimized.
This comment has been minimized.
lpinca
Feb 15, 2018
Member
Nit: how about using just ClientRequest to be consistent with the other comments?
This comment has been minimized.
This comment has been minimized.
BridgeAR
added
the
author ready
label
Feb 16, 2018
mcollina
added some commits
Feb 14, 2018
mcollina
force-pushed the
mcollina:end-this
branch
from
cc5937c
to
54facaa
Feb 16, 2018
This comment has been minimized.
This comment has been minimized.
|
@mscdex are you ok with this change then? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
mcollina
closed this
Feb 19, 2018
mcollina
deleted the
mcollina:end-this
branch
Feb 19, 2018
mcollina
added a commit
that referenced
this pull request
Feb 19, 2018
mcollina
added a commit
that referenced
this pull request
Feb 19, 2018
mcollina
added a commit
that referenced
this pull request
Feb 19, 2018
This comment has been minimized.
This comment has been minimized.
|
Awesome work, adding "don't land on" tags. |
mcollina commentedFeb 14, 2018
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