-
Notifications
You must be signed in to change notification settings - Fork 401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clear console before running command in exec -w #10983
base: main
Are you sure you want to change the base?
Conversation
@@ -10,16 +10,16 @@ between each change to its code. | |||
> EOF | |||
|
|||
$ dune exec --watch ./foo.exe & | |||
Success, waiting for filesystem changes... | |||
changes... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does it remove the entire sentence, minus the last word, here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea! It only happens in cram tests - not when running dune from a terminal. I've tried various Console
functions to see if I could fix the test behaviour while also maintaining the behaviour when you run the command interactively but nothing works. Maybe something to do with how cram tests capture the output of commands? @rgrinberg any ideas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea, sorry. But shouldn't you restore the terminal after the process finishes?
This fixes an issue where the build progress stays on the console after the build completes, and the first line of the output of the command being exec'd is printed on teh same line as the build progress. A side effect of this change is that some of the "Build Successful" messages in tests get truncated. Signed-off-by: Stephen Sherratt <[email protected]>
|> Fiber.map | ||
~f: | ||
(Result.map ~f:(fun prog -> | ||
Console.reset (); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than doing this directly, let's be consistent with dune build
watch mode.
Console.reset (); | |
Scheduler.maybe_clear_screen ~details_hum:[] config; |
You will need to thread config
from run_eagar_watch
.
Are we aware that all the |
This fixes an issue where the build progress stays on the console after the build completes, and the first line of the output of the command being exec'd is printed on teh same line as the build progress.
A side effect of this change is that some of the "Build Successful" messages in tests get truncated.
Fixes #10922