Exploring Elixir Project Re compilation
summary
Explains how Elixir decides which .ex files recompile: runtime vs export dependency vs compile dependency, how cycles and “double” paths cause distant cascades, and how separating behaviors and macros into their own modules removes transient compile deps. Uses mix xref (graph, cycles, trace) to trace edges, shows extracting behavior/macro code reduces recompiled files from 42 to 2 and build time from ~4s to ~0.5s, and suggests CI checks to prevent regressions.
AI-written summary · about
chapters (7)
- 0:0004:14 - Intro
- 4:1507:03 - Dependencies
- 7:0413:25 - Cycles
- 13:2617:02 - Double Dependencies
- 17:0318:17 - Key Discoveries
- 18:1827:57 - Export Dependencies
- 27:5830:20 - QnA
related talks
35mThe pillars of Metaprogramming in Elixir
38mDemystifying compilers by writing your own
46mBuild Your Own Elixir
37mMetaprogramming + DSL Design in Elixir
31mRebuilding Espec: Foundations In Metaprogramming,
38mRubyX: Compiling Ruby and it's effect on the community
44mA Few Improvements to Erlang
21mPapers We Love - Elixir Edition
