In Elixir 1.2.X trying to use a Macro from a Module which isn’t yet required was giving CompileError as (CompileError) somemodule.exs:XX: you must require Somemodule before invoking themacro Somemodule.something/X
Today I was using a macro from a module and I forgot to require the module, but it didn’t gave CompileError. Later when I tried to use that macro, it gave an UndefinedFunctionError as (UndefinedFunctionError) function Somemodule.something/X is undefined or private. However there is a macro with the same name and arity. Be sure to require Somemodule if you intend to invoke this macro
.
When I tracked back, the behavior is changed somewhere in Elixir 1.3.X.
I think the previous behavior was better. But may be the behavior is changed for some good reason, which I don’t know.