Hi everyone,
I’m currently running into a strange full recompilation issue on Elixir 1.19 and I’d like some advice on how to further investigate the root cause.
Environment
-
Erlang/OTP 28.2
-
Elixir 1.19.4 (and all other 1.19.x versions show the same behavior)
-
Phoenix + Phoenix LiveView
-
Ash Framework
-
phoenix_live_reload enabled
Issue
Whenever any pattern exists under the phoenix_live_reload configuration, the following happens:
-
Start the server with mix phx.server.
-
Visit the web page.
-
As soon as the request hits the server, the entire project recompiles.
After that, the server works normally.
But if I stop it and run mix phx.server again, the same full recompilation occurs on the next request.
This cycle repeats every time.
If I remove all patterns from live_reload, the issue disappears — but of course that disables LiveReload entirely.
What I’ve found so far
We’ve tracked the trigger point to the following part of the Phoenix code reloader:
Something within this flow is causing the compiler to think all modules are stale, but we haven’t been able to determine why this happens specifically on Elixir 1.19.
Questions
I’d appreciate any advice on how to further approach this problem:
-
How can I inspect what Mix thinks has changed?
(module timestamps, manifests, dependency graph diffs, etc.)
-
Is there a good way to trace which module is being marked as stale first?
-
Any recommended debugging flags or instrumentation for Mix or the Phoenix code reloader?
If anyone has encountered similar behavior in Elixir 1.19 — or knows how to dig deeper into the compiler’s staleness detection — I’d really appreciate your insights.
Thanks in advance!






















