Making Elixir Recompile When External Files Change

Making Elixir Recompile When External Files Change

This article delves into optimising the Elixir language to efficiently handle recompilation when external file changes occur. By offloading computations to compile time and using the @external_resource attribute, developers can ensure that modifications to files trigger recompilations automatically, without needing to manually force a recompilation of the entire project. Moreover, the blog introduces the mix_recompile?/0 function in Elixir 1.12 to fine-tune recompilation logic, accounting for changes in directory structure as well as content updates.

Visit Original Article →