build, clean: UI improvements to keep progress at bottom
When doing a build or clean in interactive mode without --verbose, two
categories of information are output to the terminal; progress of all
the tasks and warnings/errors from the tasks. Perviously if any warning
was output, this would be under the progress block and a new progress
block would be drawn under that, the next time progress was updated.
This is a bit ugly.
So let's change this so that the progress block is always at the bottom
and all warnings are output immediately before the progress block
begins. And we draw a dashed separator between the two areas. This is
much tidier.
The implementation is not perfect; if outputting a warning, we erase the
progress block, rewind the cursor, output the warning, then redraw the
progress block. The erasing step means we get some flicker. This is not
noticable when only a few warnings are output, which is the common case.
The alternative is to figure out exactly which cells will be covered by
the new output and only erase the uncovered cells. But this is much more
complex and requires extra coupling between the logger and the label
controller, which I want to avoid.
Signed-off-by:
Ryan Roberts <ryan.roberts@arm.com>
Loading
Please register or sign in to comment