| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
I'm not convinced that we should document these as Duplex and it's not entirely clear if that's always going to be the case. For instance, it does not make sense to treat stdin as a Writable. |
Sorry, something went wrong.
Just for clarification, that stdin is a “readable” stream and stdout/stderr are “writable” streams is only a convention and not enforced by the OS in any way (at least on UNIX and I think it applies to Windows, too). I don’t think it’s Node’s place to enforce these convention when the OS doesn’t. |
Sorry, something went wrong.
|
True, but it's also not that practically useful unless there's an obscure use case I'm missing. |
Sorry, something went wrong.
Maybe we could start printing warnings to fd 0. 😛 The docs are still technically correct due to the weirdness that is the stdio impl. I think changing it to note that it is net.Socket (inherits from stream.Duplex) unless it is from/to a file, in which case it is a fs.sync{Write|Read}Stream, could be more useful. |
Sorry, something went wrong.
|
That would be certainly more useful |
Sorry, something went wrong.
|
Just because it may not be used very often doesn't mean its not useful. Why should we have an opinion on this, particularly if its platform independent, and pre-existing? There are interesting use-cases, like gpg, where processes read and write from arbitrary fds, I like that such programs can be written in node, that its not just for webapps. |
Sorry, something went wrong.
|
Agree with #11194 (comment), we should doc its actual class. |
Sorry, something went wrong.
|
I've amended changes to the commit so the actual class is now documented. |
Sorry, something went wrong.
There was a problem hiding this comment.
I left some suggestions, I find the "from/to" confusing, but basically LGTM.
Sorry, something went wrong.
There was a problem hiding this comment.
I suggest: "unless fd 2 refers to a file, "
Sorry, something went wrong.
There was a problem hiding this comment.
@sam-github Thank you for reviewing. I made the requested changes and rebased with master. I had some merge conflicts on the same sections in the docs.
Can you review again? Thanks!
Sorry, something went wrong.
There was a problem hiding this comment.
"(which inherits"
Sorry, something went wrong.
|
code looks good, @Fishrock123 assigned this to himself, so he'll need a chance to review you should shorten your commit message, guidelines are here: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md#step-3-commit |
Sorry, something went wrong.
There was a problem hiding this comment.
Almost there, small nit
Sorry, something went wrong.
There was a problem hiding this comment.
It would be worthwhile to have this (and the other reference below) be a link to the Duplex doc
Sorry, something went wrong.
|
@jasnell: I made the changes, can you review again? |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM with one small comment
Sorry, something went wrong.
There was a problem hiding this comment.
Could you link net.Socket to it's definition in net.md? Thanks!
Sorry, something went wrong.
There was a problem hiding this comment.
@Fishrock123 done
Sorry, something went wrong.
|
@seppevs sorry this took so long, by now process.md has changed. Can you rebase and make [Duplex] look like the other entries? Thanks! |
Sorry, something went wrong.
…n states otherwise This is a fix for nodejs#9201
stdout, stderr and stdin are all Duplex streams but documentation states otherwise Fixes #9201 PR-URL: #11194 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
|
Looks like she forgot to close it. Please re-open if this was in error. |
Sorry, something went wrong.
stdout, stderr and stdin are all Duplex streams but documentation states otherwise Fixes #9201 PR-URL: #11194 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
stdout, stderr and stdin are all Duplex streams but documentation states otherwise Fixes #9201 PR-URL: #11194 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
|
backported to v6.x-staging. If it should be backed out lmk |
Sorry, something went wrong.
stdout, stderr and stdin are all Duplex streams but documentation states otherwise Fixes #9201 PR-URL: #11194 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
stdout, stderr and stdin are all Duplex streams but documentation states otherwise Fixes nodejs/node#9201 PR-URL: nodejs/node#11194 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
| Back | FazBrowse Home | New Git URL |
doc: stdout, stderr and stdin are all Duplex streams but documentation states otherwise
This is a fix for #9201
Checklist
Affected core subsystem(s)
doc