Console is not cleared in watch mode (also does not show the 0 error count output)
Steps to reproduce
I use tsgo --watch --noEmit --skipLibCheck on Win11's Terminal with pwsh 7.5.x The console is not cleared between watched builds (there is --preserveWatchOutput which defaults to false, in other words the console should be cleared in between)
Sidenote: I also have cases where i press CTRL+S in my IDE (with an error present) in that moment the compiler watcher starts a new compilation, but does not detect the error in the file. If i change the file again, e.g. inserting a new blank line and save, now the error is picked up.
Behavior with [email protected]
tsc --watch --noEmit --skipLibCheck
clears the console and shows [08:31:19] File change detected. Starting incremental compilation...
[08:31:24] Found 0 errors. Watching for file changes.
Behavior with tsgo
tsgo --watch --noEmit --skipLibCheck
the new entries are appended in the console, without clearing (also does not show the 0 errors message)
Found 2 errors in the same file, starting at: src/sample.ts:4
build finished in 0.016s build starting at 08:37:29 AM build finished in 0.006s build starting at 08:37:31 AM build finished in 0.003s build starting at 08:37:33 AM build finished in 0.002s build starting at 08:37:35 AM build finished in 0.002s
This comes down to us not using a diagnostic message in DoCycle, and so TryClearScreen does not detect the starting message and does not issue the screen clearing codes.
Well, rather, I think the watch mode for non-build-mode is just not using the right messages.