-
Notifications
You must be signed in to change notification settings - Fork 415
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
Add using_terminal
stanza
#3660
Conversation
Signed-off-by: Cameron Wong <[email protected]>
Signed-off-by: Cameron Wong <[email protected]>
That looks right to me, but we also need to prevent dune from printing messages while such an action is running. This should be done globally via the |
Signed-off-by: Cameron Wong <[email protected]>
I'm unsure of what the behavior in this case should be. Should we silently eat anything sent to the console during such an action, or capture them to be output later? |
The latter seems much more reasonable to me. |
Quoting Jeremie from the original issue:
|
What needs to be adjust in |
This was an idea I had when I was far less familiar with how the codebase functioned; I'm no longer sure what I really meant. I'll remove it from the PR description. |
Signed-off-by: Cameron Wong <[email protected]>
Signed-off-by: Cameron Wong <[email protected]>
…minal Signed-off-by: Cameron Wong <[email protected]>
I'd really like to make |
Wait, for that matter, what is terminal composition currently useful for? Neither grepping over the codebase or using github search seems to come up with any uses of it. |
Signed-off-by: Cameron Wong <[email protected]>
Signed-off-by: Cameron Wong <[email protected]>
…minal Signed-off-by: Cameron Wong <[email protected]>
src/dune_engine/action_exec.ml
Outdated
; stderr_to = Process.Io.stderr | ||
} | ||
in | ||
Console.unlock (); |
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.
What happens when the exec
above raises? Shouldn't we still unlock?
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.
Good catch, fixed.
src/stdune/console.mli
Outdated
To allow these to be used alongside [Fiber] jobs, we expose this unsafe | ||
interface instead of [with_lock: (unit -> unit) -> unit]. Double-[lock]ing | ||
or [unlock]ing the console will lead to output errors (no output, repeated | ||
output, etc). *) |
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.
Can we just forbid double locking/unlocking via runtime checks?
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.
I spoke to @jeremiedimino about the behavior of terminal locking in the presence of composed terminals, and we concluded that we don't need to worry about it for now, so I've adjusted the interface.
Signed-off-by: Cameron Wong <[email protected]>
Please re-open if this is still relevant |
As per #3464 .
Todo: