-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Update documentation on readline (continuation) #4245
Comments
Patch welcome. |
Hi @TooTallNate and @Niggler, I think that this issue should still be open. I'm not 100% sure of how the project structure works but my understanding is that the open issues in this v0.x-archive repo that are still valid for the current stable version of nodejs/node should stay open. You can see from my output below that this is, IMO, still a valid issue, so I think it should be reopened. The issue was first described here: #4243 (comment) - the documentation should probably say something like Please take a look at my repro cases and let me know if you agree. If so, I can put together a small PR for the docs [here (from the current nodejs/node master branch)](https://github.com/nodejs/node/blob/997a3be3af1f202dc8058ee1072cbd4b4b77895c/doc/api/readline.markdown#event-line - live, I believe, at https://nodejs.org/api/readline.html#readline_event_line). 1. If you have a Demonstration in v5.9.0:
2. To prove that the issue is not due to us writing to stdout via stdin or vice versa or some such weirdness which would logically cause some kind of infinite loop, I picked a completely different output stream and was able to reproduce the behavior: the
3. You can see evidence of this still tripping people up in the nodejs/node repo: nodejs/node#4402 (comment) Fiinally, to be as explicit as possible, I believe (like @Niggler in filing #4243) that the module is doing the wrong thing by firing the
Hopefully this was not too much material on such a small subject... |
The documentation is still inconsistent. It says:
Your comment in #4243 implicitly assumes that readline will also emit events when the output stream receives a '\n'. The docs should be updated to reflect this.
The text was updated successfully, but these errors were encountered: