Uh oh!
There was an error while loading. Please reload this page.
fs: do not emit 'finish' before 'open' on writing empty file - #29930
fs: do not emit 'finish' before 'open' on writing empty file#29930ronag wants to merge 1 commit into
Conversation
936bd44 to
c0ba9a2Compareronag
commented
Oct 11, 2019
mcollina
commented
Oct 11, 2019
The commit has the wrong subsystem prefix. It’s not stream, but rather fs. |
Trott
commented
Oct 11, 2019
@nodejs/fs |
Trott
commented
Oct 11, 2019
I tried to amend the commit message but don't have permission to the nxtedition/node.git repo. But I did change the title of this PR to what I would recommend the commit message be changed to. |
Trott
left a comment
There was a problem hiding this comment.
LGTM with commit messages/subsytem changed to fs (and assuming no CI surprises).
Will run CITGM too to make sure this fixes the multer issue and doesn't unexpectedly create issues somewhere else.
This comment has been minimized.
This comment has been minimized.
Trott
commented
Oct 11, 2019
'finish' could previously be emitted before the file has been created when ending a write stream without having written any data. Refs: expressjs/multer#238
c0ba9a2 to
f341a47Compareronag
commented
Oct 11, 2019
amended commit msg |
nodejs-github-bot
commented
Oct 11, 2019
Trott
commented
Oct 12, 2019
CITGM results look great. No multer failures anymore and no new unexpected failures. |
This comment has been minimized.
This comment has been minimized.
'finish' could previously be emitted before the file has been created when ending a write stream without having written any data. Refs: expressjs/multer#238 PR-URL: #29930 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Trott
commented
Oct 13, 2019
Landed in ba45367. Thanks! |
'finish' could previously be emitted before the file has been created when ending a write stream without having written any data. Refs: expressjs/multer#238 PR-URL: #29930 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
boneskull
commented
Oct 24, 2019
It looks like this may be causing some test failures in userland: see sindresorhus/copy-file#38 https://travis-ci.org/sindresorhus/cp-file/jobs/602461047#L280 In this case, |
boneskull
commented
Oct 24, 2019
previously the first error emitted from the fs readable stream was given this test is doing some monkeypatching in its harness, we can probably just work around that, but wanted to make sure this was intended? |
ronag
commented
Oct 24, 2019
@boneskull: I'm not sure I'm following. Can you provide a simple example? |
boneskull
commented
Oct 24, 2019
@ronag I can't really, as it's not my code and I don't really understand the intent. But I can tell you that previous to Node.js v12.13.0, the first error emitted from a writable stream in this test case was one w/ https://github.com/sindresorhus/cp-file/blob/master/test/async.js#L244 |
mcollina
commented
Oct 25, 2019
@boneskull would you mind opening a new issue in this repo? Would you mind confirming that Node 12.12.0 was working as expected. |
'finish' could previously be emitted before the file has been
created when ending a write stream without having written any
data.
Refs: expressjs/multer#238
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes