Closed iSuslov closed 1 month ago
Please use the TUI if you wish to run a task with that uses ANSI codes to alter the terminal.
With the streamed log output, there is no good way for us to prevent/modify underlying task ANSI instructions from changing the incorrect part of the terminal. The TUI was built for the purpose of providing a contained section of the terminal that would only contain the output of a single task.
For future reference: I tried "tui" without success.
I think I see the issue, it appears that rspack adds enough trailing spaces in the progress bar output the fill the current line:
● ESC[1mESC[0m ESC[32mESC[37mESC[2m━━━━━━━━━━━━━━━━━━━━━━━━━ESC[0mESC[0m (0%) ESC[2msetup compilation ESC[0m^MESC[2K
The ESC[2K
operation at the erases the current line, but if the trailing spaces have caused the line to wrap, it won't erase the intended line instead just the line overflow. This probably indicates we have a mismatch in the PTY dimensions and the virtual terminal dimensions so rspack
is outputting too many spaces for the terminal.
I'll look at making sure the underlying PTY has the exact same dimensions as the virtual terminal.
Verify canary release
Link to code that reproduces this issue
I provide shell script to reproduce
What package manager are you using / does the bug impact?
npm
What operating system are you using?
Mac
Which canary version will you have in your reproduction?
2.0.15-canary.3
Describe the Bug
When child script outputs progress bar, turborepo outputs every update of this progress bar as a new line.
In my example I'm using rsbuild that implements progress bar.
Expected Behavior
Stdout update should be supported.
To Reproduce
Use this script which:
./_reproduce
folderrsbuild
application in./_reproduce/apps/app
node_modules
and runsnpx turbo build
Additional context
No response