halohalospecial / atom-elmjutsu

A bag of tricks for developing with Elm. (Atom package)
https://atom.io/packages/elmjutsu
MIT License
192 stars 24 forks source link

Error highlighting causes some issues. #129

Closed mm-tfx closed 6 years ago

mm-tfx commented 6 years ago

I am not entirely sure how does this work but there is an issue with Error higlihting. I have found this in my application but later on I tried to narrow down this to SSCCE. So I copied the default code from Ellie app (button increment/decrement) and then I splitted the code into modules. View.elm containing view function. Messages.elm containing type Msg, Update.elm containing update function and so on.

Then I added new message into Msg.elm and prese CTRL-S. Next step was to compile my project using cmd line so elm make Main.elm and compiler was happy even though it should complain about new Msg not handled in the Update.elm.

Then I opened Update.elm in Atom and I could see highlighted error there. If I would just press CTRL-S and try to compile again then compiler will start complaining as it should.

If I have run elm make in settings set to on save then I am running into those kind of issues. Running elm make from Atom probably causes changes in timestamps for elmi files. That could be a reason for compiler not seeing changes properly.

That is my guess only but setting run elm make to never then I don't have such problems however Error highlighting does not work.

I tried the same using Notepad and there I don't have this problem.

I hope above explanation is not too chaotic. Please let me know how can I troubleshoot further.

halohalospecial commented 6 years ago

Hi @mm-tfx! Can you try enabling the Always Compile Main option in the latest version (v8.6.0)? (Delete elm-stuff first just to be sure :slightly_smiling_face:)

https://github.com/halohalospecial/atom-elmjutsu#always-compile-main

mm-tfx commented 6 years ago

Hi. I have tried this new version in this simple example I made and in bigger application. Works perfectly.

Thanks a lot for quick response and for this great tool.