Compilation Errors showing at random places in log

When running an Elixir app, whenever there are errors in compilation, it shows at some random place (usually closer to the top) of the logs, so I have to scroll all the way up and sift through the logs to figure out what the error is.

I’ve tried removing Elixir and Erlang and re-installing them on my system to hopefully reset that behaviour but it’s still happening, I’m currently running Elixir 1.15.4

Here’s a screenshot of a simulated error:

Any help would be appreciated

Thanks! :smiley:

I’ve noticed recently that if copy/paste an .ex file and then edit the module name the compiler gets confused and I get this module not found error about the original module.

Usually solved by deleting the app folder in _build/.

I’ve seen this as well since elixir 1.15. Not sure what is going on, but its definitely changed in some way.

1 Like

removing the _build/ folder works for me, thanks!

Just your app subfolder should be enough, it avoids recompiling all the dependencies.

Sounds like you could file an issue for this in the Elixir repo.

Or perhaps it has already been fixed on main and we’re awaiting a new release?

You could try to build from source and see if the issue goes away.

If you’re using asdf:

$ asdf install elixir ref:main
$ asdf local elixir ref:main <-- in your project directory

This sounds like it might be this change in Elixir 1.15:

The Elixir compiler can now emit many errors for a single file, making sure more feedback is reported to developers before compilation is aborted.