elixir
elixir copied to clipboard
`@behaviour` and `@impl` should add runtime dependency
Elixir and Erlang/OTP versions
main
Operating system
macOS
Current behavior
Currently @behaviour adds a compile-time dependency. It doesn't change code being compiled it just emits a warning. And so it can be a runtime dependency and handled in a group pass.
Expected behavior
@behaviour should add a runtime dependency.
@marcandre you may like this one. :) Thank you for this and other Hex.pm PRs around re-compilation!
This is a tricky one but I will be glad to sit and discuss @marcandre if you are interested!
It makes sense that checking of behaviour match can be done outside of both the implementation and the spec files, I should have thought of that.
I can definitely have a look at it, even though it seems pretty intimidating 😅
I shot you an email in case you want to jump into a call!
~Ah, passing a behaviour to defoverridable/1 / Module.make_overridable will now have to introduce a compile-time dependency.~ Nevermind, it already has to...