Open Anton-4 opened 2 weeks ago
Hello there!
Would it be quite alright if I worked on this issue ?
Cheers!
Hi @NoodleSamaChan, thanks for helping out! I've assigned you to the issue :)
Thanks so much, apologies for the late answer, I have a follow up question if that's alright to be sure I understand exactly what is expected : )
Would you have an example of what a better looking message would look like for you for instance? And do you expect a panic or an error to be returned ideally?
Cheers!
Would you have an example of what a better looking message would look like for you for instance?
I would go with something like this:
<red>Error<\red>: Unimplemented feature
Immediate subtractions with values exceeding 12 bits are not yet supported.
Tip: You probably hit this in the repl. You should be able to build/run this code using a roc file, e.g.: `roc myFile.roc`.
Issue: <https://github.com/roc-lang/roc/issues/ISSUE_NR>
Instead of the todo macro we should probably use a normal function e.g.: roc_todo(description: &str, tip: Option<&str>, issue_link: Url)
. It should call eprintln
followed by process::exit(1);
.
And do you expect a panic or an error to be returned ideally?
We can start with the function I suggested, later we want this to return an error but I think passing the error through the whole compiler would require too much work for a first PR.
Down the road we should also do a CI check that fails if there are any todo!
in the code, and it should recommend using the roc_todo function instead.
Is not the best looking error message, we should see if we can easily modify the output used by the todo macro or create our own todo macro with a nicely formatted and nicely worded error message.
Recommended experience: Novice at Rust