I have a macro that creates a module, a structure for a module and implements a protocol for this structure.
In my package, I have a simple test module that calls a macro and then makes statements in the generated module / structure / protocol implementation. One test calls a protocol function using a structure to assert that it has been implemented. Before 1.2, this worked, but now it fails, and I get the following warning when I run the package.
test/dogma/rule_builder_test.exs:7: warning: the Dogma.Rule \ protocol has already been consolidated, an implementation for \ Dogma.RuleBuilderTest.MagicTestRule has no effect
I removed this test for now, as I believe that the rest of my package checks this functionality enough, but I'm curious if there is a way to do this work again or at least silence the warning.
I played with Process.consilodate/2 but was unsuccessful.
elixir metaprogramming
lpil
source share