3 ms·
Warning: Compilation times suck for Elixir/Erlang. I'm frustrated almost daily when I make changes to my code and have to wait for 66 .ex files to compile after
by sergiotapia 4y ago
Warning: Compilation times suck for Elixir/Erlang. I'm frustrated almost daily when I make changes to my code and have to wait for 66 .ex files to compile after changing one single line of code in a heex template.
- Kototama 4y agoWhy do the other files get recompiled? they should be recompiled only if there is change in them.
- sergiotapia 4y agoI have no idea. That's what I'm seeing when working with my project. Literally add one character to one of my liveview modules: Rebuilding... Compiling 67 files (.ex)
- devoutsalsa 4y agoProbably macros.
- tomjakubowski 4y agoIt's worth your time to investigate this, it's fixable. Check out mix xref to investigate dependency chains between files in your mix project. In the project I work on, it turned out a module `use`d by almost every controller included a function (totally unused, btw) which, through a little bit of indirection, caused a circular compile-time dependency between all of them. So any change to any controller caused hundreds of files to rebuild.
- sergiotapia 4y agoNever heard of xref. I'll take a look thanks!
- pablodavila 4y agoThis was improved in a recent release. Did you try with the latest version?