You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think that this could be fixed in the common case if we disabled the UI before rendering output from the @console_rule (perhaps by having the Console.write/print methods also explicitly call a "stop UI for the rest of the run" method), because then the output rendered by the @console_rule would write into the space where the UI was being rendered.
### Problem
In some cases, most notably when pants prints the results of the `test` goal to stderr, we do this printing while the dynamic UI is still active. This means that when the dynamic UI is deactivated, the lines in the terminal corresponding to where the dynamic UI swimlanes were being animated vanish suddenly, which results in the terminal scrolling to some distance beyond where the last output was when a pants run is complete. This is undesirable. We'd like to be able to have a pants rule explicitly disable the dynamic UI when the rule knows it has no more work to do other than printing output.
### Solution
This commit exposes a method on the Python `Console` class `teardown_dynamic_ui()` that proxies to the extant `maybe_teardown_display` method, that will disable the dynamic UI for the remainder of the pants run.
### Result
Fixes#10005
this happens running in a terminal that is split horizontally, something like this:
when pants finishes running, the scrolling is off, so I have to scroll up in order to see the results (of pytest in this case).
The text was updated successfully, but these errors were encountered: