Stream: beginners

Topic: ✔ roc cli arguments format


view this post on Zulip Michał Łępicki (Oct 16 2022 at 09:23):

Hi! I'm not sure if this is an issue or maybe I'm misunderstanding this help output. roc --help shows me this command format to use:

    roc [OPTIONS] [ROC_FILE] [-- <ARGS_FOR_APP>...] [SUBCOMMAND]

But when passing options, file and subcommand in this order I am getting an error:

$ roc --dev 1/1.roc run

No `.roc` file was specified, and the current directory does not contain a main.roc file to use as a default.

You can run `roc help` for more information on how to provide a .roc file.

Am I right that the format returned in help is wrong, or is there more to it?

view this post on Zulip Luke Boswell (Oct 16 2022 at 10:25):

Try roc dev ./name_of_your_file.roc :big_smile:

view this post on Zulip Michał Łępicki (Oct 16 2022 at 10:26):

That works, is the order in help output just wrong?

view this post on Zulip Luke Boswell (Oct 16 2022 at 10:31):

Possibly. roc run examples/helloWorld.roc works for me, while roc examples/helloWorld.roc build does not. So I guess the [SUBCOMMAND] is actually the first argument.

view this post on Zulip Brendan Hansknecht (Oct 16 2022 at 10:48):

This looks a like a bad error message on our part. That would be a good issue to file.

view this post on Zulip Michał Łępicki (Oct 16 2022 at 14:32):

Opened #4336

view this post on Zulip Notification Bot (Oct 16 2022 at 14:33):

Michał Łępicki has marked this topic as resolved.


Last updated: Jul 06 2025 at 12:14 UTC