I’m using Neomake plus Credo for type as you go feedback. It’s great…unless there’s a compile error in the file. Then you get nothing.
The problem is that Neomake generates a temporary file with the contents of my dirty buffer to run its makers against. But:
- I can’t find a way to tell mix to compile a single file
- I can’t find a way to tell elixirc not to produce output (no --dry-run?)
- I can’t find a way to pipe mix’s dep path info into elixirc. And trying to build up the right args myself has proven frustrating.
What I would love is a
mix compile --dry-run <path to file> type of thing. Can someone make that exist? Is there another way to solve this problem?
This is the state of things. I’m sure you can configure Neomake to only check on save, versus buffer changes, then it won’t need the temporary file. Mix compile is too slow to use constantly anyway. That is the only sane way I’ve been able to configure Flycheck.
Sure, I can configure Neomake to compile the project on save. That’s not the point. If things are so bad the file doesn’t compile then I don’t want to save it. I revert buffers regularly to drop changes I don’t want. Mix compile isn’t that slow and if I’m taking the “save often” approach, then I’m still rebuilding often too. Since the making is done async, it doesn’t really matter how long it takes. Or at least I’d be willing to accept this trade for better IDE support.
I know that Erlang allows for syntax checking without writing out the beam. There is --dry-run support in other mix tasks. It would be really nice if the compile or at least the compile.elixir tasks could be enhanced.