Recompilation of views

I’m trying to understand why changing one of my views triggers 123 file recompilations. What I have found:

I have a ControllerAView template which contains:
render(ControllerBView, "_templateB.html", conn: @conn)

If I touch ControllerBView, it triggers a recompilation of ControllerAView.
I have seen the blog post on “understanding Elixir’s recompilation” from Renan Ranelli, but it focuses on how Macros create dependencies, and as far as I know Phoenix.View.render is not a macro ?

Has anyone an idea on why this recompilation occurs ?

Try mix xref graph. This will give you some hints.

1 Like