I’m looking into how to reduce some compile time dependencies and stumbled across how LiveView removed its compile time dependency on Modules referred to in attrs
. So something like the following is no longer a compile time dependency.
attr :user, User, required: true
- How does expanding an alias prevent the compile time dependency?
- Does that mean if it’s not an alias it will still be a compile time dependency?
- What does
Macro.expand(alias, %{env | function: {:__attr__, 3}})
in layman terms do?
I couldn’t find/understand too much in the Macro documentation so I’m a little confused when it comes to Elixir AST details.
Thanks in advance for any help!