Stream: compiler development

Topic: which roc subcommand for roc_cli tests


view this post on Zulip Luke Boswell (Sep 04 2024 at 10:44):

@Anton 's comment on build-host PR https://github.com/roc-lang/roc/pull/6859#discussion_r1742366298

Assuming that run still tries to run a program even if there are errors, that is probably not what we want to use here...

For running roc_cli tests using roc what subcommand should we use?

In the future roc cli workflow I've been slowly trying to work towards, we don't have run or dev subcommands any longer.

Richard provided more guidance in https://roc.zulipchat.com/#narrow/stream/304641-ideas/topic/Roc.20cli.20workflow/near/451019171

I would like roc to always run even if there are errors - like roc run does today. However, I think today it should work like roc dev and only run if there are no errors.

So should we for this PR;

  1. just use roc dev today and then in future when it is no longer available remove it
  2. ensure that roc without a subcommand behaves like roc dev and run the tests without any subcommand.

view this post on Zulip Anton (Sep 04 2024 at 10:50):

2 sounds good

view this post on Zulip Luke Boswell (Sep 04 2024 at 12:07):

This is why I think we should have the behavior work differently in the short term vs the long term. Until we get the "run even though there are errors" design working, I think we shouldn't even offer it as a subcommand or a feature flag. For now it should probably be an environment variable like ROC_EXPERIMENTAL_DEFER_ERRORS=1 where the name conveys that this is something that's currently unreliable.

Once it becomes reliable, I think we can just always enable it. Between editor integrations and having it actually work reliably, I don't think there should be any remaining reasons not to have it on all the time - and that design certainly results in the simplest CLI experience.

We should also implement the ROC_EXPERIMENTAL_DEFER_ERRORS flag Richard has described here so we can just use roc without any subcommand and this shouldn't run if there are any errors.

view this post on Zulip Anton (Sep 04 2024 at 12:23):

I'm a little confused, this "roc without any subcommand and this shouldn't run if there are any errors" is already the current behavior no?

view this post on Zulip Luke Boswell (Sep 04 2024 at 12:24):

I haven't checked. I was just wanting to confirm the intended behaviour.

view this post on Zulip Luke Boswell (Sep 04 2024 at 12:25):

The tests currently use CMD_RUN on the branch, which may be why you commented.

But I thought I translated from the old tests, so I just need to check it's doing the right thing.

view this post on Zulip Anton (Sep 04 2024 at 12:32):

I translated from the old tests

Yeah, I checked that too, they are indeed using run


Last updated: Jul 06 2025 at 12:14 UTC