I'm also wondering how exactly messages printed fr...
# development
h
I'm also wondering how exactly messages printed from a console rule should interleave with the current streaming messages that are being printed with the lightning bolts - I think this are intended to all come from logs, right? @red-balloon-89377 @average-vr-56795?
ah, disregard that comment about the swim lanes, I misunderstood what this code was doing.
but in general I think there are some questions about exactly what we want the v2 console UI to look like, especially with regard to logs vs "normal" console output
and allowing scrollback vs. letting the swim lanes display information dynamically
r
I’m honestly not sure how it should look like, I don’t have a straight answer for that. Initially, I hoped to be able to keep the swimlanes at the bottom, stream the log (and error) messages as they come, buffer the “normal” console output, and print it at the end. However, users might want to know when tests pass or fail immediately.
So my next best guess is to interleave the “normal” output with the logs line-by-line, and leave it to the console rule authors to figure out when they want to print stuff. If someone wants something printed at the end of an execution (like the json output of
./pants export
), they can print it at the end of their console rules, when no more products are being requested.
That solution also has some flaws though
w
the pass/fail logging currently goes to the log in realtime, but not the actual test output: that's all rendered at the end
r
It might be the cleanest solution, particularly if we decide that test failures are also logged
I don’t think that most users care about streaming succeeding tests, but they care about seeing tests fail ASAP
h
@witty-crayon-22786 you mentioned caring about scrollback in https://github.com/pantsbuild/pants/issues/8062#issuecomment-512360323
but I think setting the terminal into raw mode is breaking natural scrollback, regardless of whether or not we put the swim lanes at the bottom of the terminal
if I use tmux scrollback I just see the same swimlane lines repeated, which I think is what you would expect if we are repainting the terminal in a loop ever 50ms or whatever the value is
w
mm
well, i think it depends how much of the screen you clear, right?
(i reaaaally don't know.)
h
I typically expect that if a program takes control of a terminal and does something "special" with it (so, a pager like less or a multiplexer like tmux), once you exit that program your scrollback is not guaranteed to make sense