Skip to content
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

Update terminal width when progress animation is updated #463

Merged

Conversation

kateinoigakukun
Copy link
Member

@kateinoigakukun kateinoigakukun commented Feb 3, 2024

Without updating the terminal width for each progress update, a progress line may be printed as more than one line, so line clearing will not work as expected and many lines will be printed when overflowing max columns of line.

Ninja also checks the terminal width every line print: https://github.com/ninja-build/ninja/blob/fd7067652cae480190bf13b2ee5475efdf09ac7d/src/line_printer.cc#L110

This particularly improves the build and test progress report of SwiftPM.

Before

old.mov

After

new.mov

Without updating the terminal width, a progress line may be printed
as more than one line, so line clearing will not work as expected and
many lines will be printed.
@kateinoigakukun
Copy link
Member Author

@swift-ci Please test

@MaxDesiatov MaxDesiatov added the bug label Feb 5, 2024
@MaxDesiatov MaxDesiatov enabled auto-merge (squash) February 5, 2024 14:49
@MaxDesiatov MaxDesiatov merged commit 9595fce into swiftlang:main Feb 5, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants