Stream: ideas

Topic: Cmd.status stdout


view this post on Zulip Anton (Feb 13 2024 at 17:27):

If you execute Cmd.status (in basic-cli and basic-webserver), it currently forwards its stdout and stderr to the terminal in which you are running your Roc app. I think it's safe to say you rarely want this, since you are specifically requesting only the exit status.

So I'd like to change this to discard stdout and stderr when calling Cmd.status. Let me know if you disagree or have concerns!

view this post on Zulip Richard Feldman (Feb 13 2024 at 17:34):

hm, I think I usually want the current behavior! :sweat_smile:

view this post on Zulip Richard Feldman (Feb 13 2024 at 17:34):

like I want to run the command, let the user see its output, and then maybe exit the parent process early if the child had an error (which I can tell from its exit status)

view this post on Zulip Richard Feldman (Feb 13 2024 at 17:35):

maybe we should change the name from Cmd.status to something else? Like maybe have two different functions, one for forwarding and one for not, and they both give the status (even though it's not mentioned in their names)

view this post on Zulip Anton (Feb 13 2024 at 18:27):

What do you think of statusVerbose?

view this post on Zulip Luke Boswell (Feb 13 2024 at 19:34):

Aren't we describing the difference between status and output?

view this post on Zulip Luke Boswell (Feb 13 2024 at 19:35):

We just wrapped the Rust API

view this post on Zulip Anton (Feb 14 2024 at 09:44):

Aren't we describing the difference between status and output?

Sort of, status and output return different types, so I do think it would be nice to have "verbose" variants that would allow for quick debugging with minimal code changes.


Last updated: Jun 16 2026 at 16:19 UTC