-
Notifications
You must be signed in to change notification settings - Fork 35
Better compilation error messages? #176
Comments
Thanks for the issue! elm-verify-examples is a newly reworked project (like, last few days new) and I'm very excited for it. There is a much larger conversation about whether we want the elm-test node runner to integrate with it more directly (some kind of pre-run hook system?) That said, I can't reproduce this bad error message. I add this example to my file: List.filter Char.isUpper ['a', 'A'] --> ['A'] and I see a reasonable compiler error when I run |
@mgold Perhaps this repo can help you reproduce? https://github.com/lydell/elm-test-compilation-error-demo |
Running |
Strange. For me, there's no difference running |
I recently ran in to the same error message, similarly due to a compilation error in my tests. My particular error was unrelated to the I may be missing something, but it looks like the underlying issue here is to do with the I went looking in |
@bobwhitelock Thanks! |
(Sorry if this has been discussed before. I searched, but couldn't find anything.)
I'm new to elm-test. I tried it out for the first time today. First off, I must say that it was a very pleasant experience!
I use the Atom text editor, and the Elm plugins for it are really good. Specifically, all errors are pointed out for me directly in the editor, so when I finally compile my Elm code it never fails.
Except today. Because I compiled code that I hadn't written: elm-verify-examples had. And I didn't compile the code either: elm-test did.
Have a look at this:
Hmm. So something caused the the compilation to fail. But why? Because of misconfiguration? Something that I had forgot to install? A bug in elm-test? Or – of course – it could be invalid code in my tests somewhere.
I soon figured out that I could look for error by compiling manually.
Aha! Turns out I had missed adding
import Char
in a comment so that elm-verify-examples could pick it up and add that import to its generated code.Then my tests passed just fine! By the way, here's the repo where I added elm-test and elm-verify-examples: https://github.com/lydell/elm-minesweeper
So the question is: Can we make the compilation error message nicer?
elm-make
errors (like above) seems like a good idea.What do you think?
The text was updated successfully, but these errors were encountered: