After a bit of thinking, I would obviously implement the checks after the expansion phase, since macros may define behaviour and callbacks, but should I do this check before the *:elixir_erl.attributes_form/3* function, or should I do it on the *Elixir* side in the *Elixir.Module.check_behaviours_and_impls/4* function ? I would personally go for the latter, but I am more inclined to follow suggestions from more experienced contributors.
On Thursday, October 5, 2017 at 8:54:13 PM UTC-4, Alexis Brodeur wrote: > > I'm trying to work in moving the *behaviour* lint checks into Elixir as > per #5800 <https://github.com/elixir-lang/elixir/issues/5800>. > > Since module attributes are not expanded at compile time by the compiler > in *elixir_expand.erl*, I am at a road block as to where to implement the > lint checks. > > From what I gather, *attributes* are persisted at compile time in* ETS *and > fetched during the compilation phase in *elixir_module:compile* > <https://github.com/elixir-lang/elixir/blob/master/lib/elixir/src/elixir_module.erl#L82>, > > and are then converted to *AST* by the *elixir_erl:attributes_form* > <https://github.com/elixir-lang/elixir/blob/master/lib/elixir/src/elixir_erl.erl#L415> > function. > -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/4dd1b207-0040-402b-a8c7-8c2bc97a2f7c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
