-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert "stream: error Duplex write/read if not writable/readable" #39246
Conversation
This reverts commit 954217a. It breaks npm.
To reproduce the issue before this commit:
|
Here's the related code in npm that doesn't work as expected with the change: https://github.com/npm/gauge/blob/e1839fb2fddb15b6e468ff5ec90086c3c59e084d/index.js#L226-L232 It seems that either the |
I’ll take a look tonight |
@targos any possibility of a repro using just gauge? |
var Gauge = require('./deps/npm/node_modules/gauge/index.js');
var gauge = new Gauge(process.stderr, {
theme: {hasColor: true},
template: [
{type: 'progressbar', length: 20},
{type: 'activityIndicator', kerning: 1, length: 1},
{type: 'section', default: ''},
':',
{type: 'logline', kerning: 1, default: ''}
]
})
gauge.show("working…", 0)
setTimeout(() => { gauge.pulse(); gauge.show("working…", 0.25) }, 500)
setTimeout(() => { gauge.pulse(); gauge.show("working…", 0.50) }, 1000)
setTimeout(() => { gauge.pulse(); gauge.show("working…", 0.75) }, 1500)
setTimeout(() => { gauge.pulse(); gauge.show("working…", 0.99) }, 2000)
setTimeout(() => gauge.hide(), 2300) |
There is a redraw live loop bug in gauge… I’m not sure what change triggers it. It unnecessarily calls redraw in drain. I’ll try and see if I can workaround it without changing gauge. |
HWM was set to 0 which would cause e.g. stdout.write(...) to always return false. Refs: nodejs#39246
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in #39253
This reverts commit 954217a.
It breaks npm.