Add opt-in multi-line real-time build status display - #2798
Draft
orgads wants to merge 1 commit into
Draft
Conversation
Add an opt-in `-m` status mode that shows currently running edges in a multi-line real-time status area on ANSI-capable terminals, while preserving the existing single-line output when the flag is not used. Each status line shows the edge sequence number, description, and elapsed time. The multiline display is capped to the terminal height and 8 rows, and its width is clamped to 60 columns. Long job titles are trimmed from the left so the right side remains visible. The last finished edge is kept as a temporary line above the active status block, overwritten by the next completion. Error output and command output are printed cleanly after clearing the status area. Key changes: - Add `-m` to enable multiline status explicitly. - Keep default output unchanged when `-m` is not given. - Add 100ms timeout to ppoll/pselect/IOCP so DoWork() returns periodically and refreshes status via Report(). - Detect terminal dimensions to cap status lines at min(rows - 1, 8). - Clamp multiline width to 60 columns and trim long titles from the left. - Track each edge's start order via Edge::sequence_ for per-line numbering. - Overwrite the display block in place to reduce flicker. - Show `... and N more` when running edges exceed the display limit. Fixes ninja-build#111.
Contributor
Author
|
It is very slow on Windows. I'll see if I can improve it. Changing to draft for now. |
orgads
marked this pull request as draft
June 14, 2026 15:40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add an opt-in
-mstatus mode that shows currently running edges in a multi-line real-time status area on ANSI-capable terminals, while preserving the existing single-line output when the flag is not used.Each status line shows the edge sequence number, description, and elapsed time. The multiline display is capped to the terminal height and 8 rows, and its width is clamped to 60 columns. Long job titles are trimmed from the left so the right side remains visible.
The last finished edge is kept as a temporary line above the active status block, overwritten by the next completion. Error output and command output are printed cleanly after clearing the status area.
Key changes:
-mto enable multiline status explicitly.-mis not given.... and N morewhen running edges exceed the display limit.Fixes #111.