Skip to content

rollup@3.21.3+ doesn't write all output when piping stdout #4982

@Strilanc

Description

@Strilanc

Rollup Version

3.21.3

Operating System (or Browser)

glinux

Node Version (if applicable)

9.6.6

Link To Reproduction

https://github.com/quantumlib/Stim/actions/runs/4898615286/jobs/8748315971?pr=552

Expected Behaviour

Running the following series of steps should produce no output from the diff:

git clone http://github.com/quantumlib/Stim
cd Stim

npm install rollup@3.21.3

rollup glue/crumble/main.js | tee > piped_output.js
rollup glue/crumble/main.js > direct_output.js

# THIS SHOULD BE EMPTY BUT IT ISN'T
diff piped_output.js direct_output.js

# changing the 3.21.3 version above to 3.21.2 results in no diff which would be correct

Actual Behaviour

The diff isn't empty.

The invocation of rollup that was piped through tee terminates early, failing to write all output.

This is essentially the failure recorded at https://github.com/quantumlib/Stim/actions/runs/4898615286/jobs/8748315971 except that in that place the truncated output is being fed to uglify, which complains that the input program terminates in the middle of a statement.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions