Description
- Version: v12.6.0
- Platform: Darwin Admins-MacBook-Pro-6.local 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
- Subsystem: readline
We were using readline
to convert a stream that gives bytes to an AsyncIterable
of lines. We did this by using something like:
const iterableOfLines = readline.createInterface({ input: streamOfBytes })
We would then use this as an AsyncIterable
(which looks like it should be supported) and write it to a file, but there would sometimes be lines missing. The number of lines missing was inconsistent and we couldn't identify any patterns relating the lines that were missing. They were not different from the rest in any way, they were not always the first or last lines, etc.
Unfortunately, it's hard for me to tell you more because we were unable to write an isolated test that would reliably show this behavior (we noticed it in production).
We are confident that the bug is in readline
because we replaced the use of it with our own custom function that would convert the bytes to lines, and we consistently get all of the lines every time.