#What we print to the terminal and how
1 messages Ā· Page 1 of 1 (latest)
š§µ
I started a thread about this somewhere, but you were on vacation and you are the TUI whisperer š
- What would it take to change the TUI output to be function calls, rather than buildkit operations?
- How do we get a middle ground between complete TUI takeover (beautiful progress, but nothing can be printed to stdout the regular way) and silent mode (not progress whatsoever, but clean stdout behavior)
- I am super reliant on
--focus=falseto get the output I want in demos and workshops, and it's hard to explain why or what it means. How can we solve that?
-
This should be the same work involved in getting Dagger Cloud to show function calls instead, I think that's in the backlog. At this point we'd probably want to re-assess whether we even want to forward Buildkit vertices, or whether they all become internal somehow, or [...]
-
Not sure what you mean here. Do you mean being able to redirect a particular output of a Dagger pipeline to a file (say a
stringreturn value), but still see progress? Or do you think we need a whole alternative approach to the TUI? The need for a total takeover arises as soon as we want to display progress + logs for multiple things in parallel, or show anything fancy like a spinner. We can still do this while supporting simplestdoutredirects, fwiw. -
Would have to see an example here. Whether a command defaults to focused/unfocused is a fairly ad-hoc hardcoded decision at the moment, with the prevailing idea being that the default is far too noisy for simple tasks.
dagger rundefaults to unfocused, but all the Zenith verb-y commands default to focused. Maybe your demos could useWithFocus()to surface only the important parts? There's also probably some--focus=falsemuscle memory because it used to hide errors, but that's now fixed so that errors will always be surfaced even in focus mode (which has its own problems...)
Honestly what would help a ton is seeing "I ran this, I wanted to see this, but instead I saw this" - then I can start turning these into tests and thinking about the broader problem with all these scenarios in mind as we collect them. Right now it feels like a lot of 2 steps forward, 1 step back.
Yeah, adding .with_focus() here https://github.com/dagger/dagger/blob/60bc4c985293bc45ac093ba37da47159e53244ab/sdk/python/dev/src/main/test.py#L32 shows the output of test runs from different versions running in parallel which is exactly what I wanted to do 1 year ago when the SDK was released! So I've been adding it to where it makes sense in the pipelines.
- I tried implementing
dagger printand failed, because I couldnāt get the behavior I needed. in the context of that command, I find the TUI useful while things are running, itās basically a super-cool progress bar. But once things are done, I donāt want that TUI output to pollute my terminal. I want the output to be indistinguishable from what I would see if I ranāsilent.
(sorry kind of hard to explain)
Makes sense, I like that idea! Sort of like a "primary output" that supersedes everything else. My only question is where we would use it (just dagger print?)
depends on the outcome of #1174585230649217055 š
@potent sphinx bringing this back on your radar, since you're working on TUI magic
Resurrecting this once more @tawdry quartz