Hi there,
I remember reading (or hearing in a talk) that even if your code fails to compile, you can still run it, and it will just crash whenever it encounters the broken part or anything that depends on it. However, when I try to run the following code, it just won't start, even though the broken code is not even called.
app [main] { cli: platform "https://github.com/roc-lang/basic-cli/releases/download/0.12.0/Lb8EgiejTUzbggO2HVVuPJFkwvvsfW6LojkLR20kTVE.tar.br" }
import cli.Stdout
f = \t -> t + 3 # expects a number
g = \_ -> f "test" # provide a string, compilation error!
main =
Stdout.line! "Hello"
Did I misunderstand something? Or is it true at a coarser granularity, e.g., if there's an error in a module, the whole module is broken, but other modules can run until they import the broken module?
roc myapp.roc
should work, but it doesn't always.
We need to deal with more edge cases. I think it used to work better, but more and more complexity has been added to the compiler that ends up breaking before we get to code gen
Thanks @Brendan Hansknecht , would you like me to open a GitHub issue for this, or is it not necessary?
If you open issues, I would try to make them minimal examples where it is failing. I think this is a case where we need to track and tackle individual cases. Cause this is probably a pile of bugs rather than a single project.
Last updated: Jul 05 2025 at 12:14 UTC