Open favetelinguis opened 4 months ago
Thanks for reporting this @favetelinguis!
In this case, the code happened to hit a todo!
. We're aware of the bad error messages that these todo's produce (https://github.com/roc-lang/roc/issues/6812), and @NoodleSamaChan is working on improving them :)
I would agree that the core of the language is amazing but we still have many things to improve.
We do have a nice error message for this case when you try to compile code in a roc file with duplicate definitions, but the repl performs some tricks that result in different behavior.
I've put up PR #6899 with a better error message, it should be active in the web repl in a little less than 24 hours. This error will unfortunately still kill the repl, the fix for that is #6722.
We do have a nice error message for this case when you try to compile code in a roc file with duplicate definitions, but the repl performs some tricks that result in different behavior.
I am actually curious why the usual Roc DUPLICATE NAME
error does not get thrown in the repl, this issue should remain open until that is investigated.
I forgot that regular error printing does not work with wasm, I'll try to fix it.
A proper fix is not easy, I'm going to come back to this next week.
I have been trying out Roc for a few weeks and I really like what you are doing this is just a real world report about how I was talking about Roc at work and what went wrong.
Today I was talking with a coworker about how amazing this new language Roc is. After going to roc-lang.org she went to the repl and typed
test = 1
and then againtest = 1
. She was met with a huge error message and the repl died. After that I had to endure multiple remarks that roc is not all that amazing ;)Maybe its a small thing to fix just to prevent a potential bad first experience.