Skip to content

fix progress on line wrap (trim line to stderr.columns)#9225

Merged
sokra merged 2 commits intowebpack:masterfrom
kuceb:issue-9221
Jun 13, 2019
Merged

fix progress on line wrap (trim line to stderr.columns)#9225
sokra merged 2 commits intowebpack:masterfrom
kuceb:issue-9221

Conversation

@kuceb
Copy link
Copy Markdown
Contributor

@kuceb kuceb commented Jun 3, 2019

fix #9221

fixed it by trimming lines to process.stderr.columns if it exists

What kind of change does this PR introduce?
bugfix

Did you add tests for your changes?
yes

also added a test utility file so I didn't have to clutter up the progressPlugin.test.js, but it can be moved back in. I just needed a utility for capturing stderr and promisified compiler.run

@webpack-bot
Copy link
Copy Markdown
Contributor

For maintainers only:

  • This need to be documented (issue in webpack/webpack.js.org will be filed when merged)

@webpack-bot
Copy link
Copy Markdown
Contributor

Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon.

Comment thread lib/ProgressPlugin.js Outdated
Comment thread test/support/utils.js Outdated
Comment thread test/support/utils.js Outdated
Comment thread test/ProgressPlugin.test.js Outdated
Comment thread lib/ProgressPlugin.js Outdated
Comment thread test/support/utils.js Outdated
Comment thread test/ProgressPlugin.test.js Outdated
Comment thread test/ProgressPlugin.test.js Outdated
Comment thread lib/ProgressPlugin.js Outdated
@webpack-bot
Copy link
Copy Markdown
Contributor

@bkucera Thanks for your update.

I labeled the Pull Request so reviewers will review it again.

@sokra Please review the new changes.

@kuceb
Copy link
Copy Markdown
Contributor Author

kuceb commented Jun 11, 2019

friendly bump

@sokra sokra merged commit 681abf0 into webpack:master Jun 13, 2019
@sokra
Copy link
Copy Markdown
Member

sokra commented Jun 13, 2019

Thanks

@kinke
Copy link
Copy Markdown

kinke commented Jul 4, 2019

With --progress, I now have an output of thousands of lines (instead of just the progress line being constantly updated).

@kuceb
Copy link
Copy Markdown
Contributor Author

kuceb commented Jul 5, 2019

@kinke please open an issue if you think this caused a bug, closed PRs are not good for visibility. Also please mention the webpack version you're on.

@kinke
Copy link
Copy Markdown

kinke commented Jul 5, 2019

Well it's not a bug IMO, just a major inconvenience - I downgraded from v4.35.2 to v4.34 because of this.

@kuceb
Copy link
Copy Markdown
Contributor Author

kuceb commented Jul 6, 2019

@kinke ok, well please open an issue or comment on this issue #9221, preferably with a reproducible example.

also it would be nice to log process.stderr.columns and post that with the issue. it may be a problem when that's not set

@haoqunjiang
Copy link
Copy Markdown
Contributor

haoqunjiang commented Sep 30, 2019

IMO falling back to Infinity is not a good idea here.
It breaks use cases like the Vue CLI UI, where the stderr stream is piped thus not having the columns property vuejs/vue-cli#4557.
Such problems won't occur with the old 40 max length.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Terminal progress on multiple lines if line wraps

5 participants