Open lukewilliamboswell opened 6 months ago
Additional guidance for this task
https://roc.zulipchat.com/#narrow/stream/304641-ideas/topic/Roc.20cli.20workflow/near/451019171
Hey @lukewilliamboswell, is this issue up for grabs/still relevant? 🙇
Yes very much still relevant and planned. Most of this is currently waiting for someone to implement the changes.
I'm thinking we might want to make this a tracking Issue and spawn off a couple of other issues for parts of this. The original description needs updating from Richard's additional comments in that zulip thread. I can look at this later today -- though any help updating this or scoping out and thinking of good sub-issues is also appreciated. It might be best to coordinate this part on zulip, are you active over there?
If you make any changes related to this, I recommend you do so from the #6859 branch (either PR into that branch, or main once that lands) as there has been some related cleanup in that PR which makes this work much easier to implement. My plan was to start chipping away at these features once that PR lands. It's very close now so no reason to wait any longer.
Yeah 💯 breaking it up a bit sounds good 👍 I am on the Zulip, shall we have a new thread or continue on the previous one?
Yeah 💯 breaking it up a bit sounds good 👍 I am on the Zulip, shall we have a new thread or continue on the previous one?
I think we should continue the discussion... it's easier to look back and see the previous conversation and remind ourselves of what we were thinking. 😃
Thanks for looking into this.
Zulip discussion thread
At present there are various commands and options for working with the Roc CLI. The difference in behaviour between options can be unclear, e.g.
roc run
verseroc dev
.The motivation behind this change is to align the behaviour of the CLI around two primary workflows, while still providing flexibility to use the available features through the use of flags.
expect
will be checked, anddbg
values are printed to stderr. The compiler defaults to using the development backends and surgical linker when available as this will build faster, at the expense of runtime performance.expect
ordbg
are ignored and stripped from the produced binary. The compiler defaults to using the LLVM backend with full optimisations.This task is to modify the Roc CLI workflows as follows;
RUN WORKFLOW
roc
(modified from current implementation)dbg
valuesexpect
assertions and panic/crash if any fail!#/usr/bin/env roc
roc run
androc dev
commands removed as redundantBUILD WORKFLOW
roc build
(modified from current implementation)dbg
and strips from binaryexpect
and strips from binaryFLAGS
Below are some of the changes to flags that are related to this change.
--watch
(new flag) (re)compile binary on any changes in the application [NOTE this flag needs further discussion and should be left for a future task]--backend <llvm/dev>
(new flag) compile binary usingllvm
ordev
backend instead of default--opt <none/size/speed>
(new flags)--opt none
compile without optimisations, llvm only--opt size
(renamed from--opt-size
) smaller binary, llvm only--opt speed
(renamed from--optimize
) compile with optimisations, llvm only