-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Behaviour as runtime dependency #12103
Behaviour as runtime dependency #12103
Conversation
0040270
to
c0c2d65
Compare
PR ready for review. I presume the Windows OTP-25 failure is not related |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fantastic @marcandre, thank you! ❤️ I have dropped 3 comments but they are all nitpicks about renaming/moving code around. :)
Great, thank you 😄 |
c0c2d65
to
860648d
Compare
Processing unchanged
This will make it easier to also build a list of warnings
860648d
to
839589f
Compare
@josevalim tweaks done |
💚 💙 💜 💛 ❤️ |
With this PR,
@behaviour
declarations introduce only a runtime dependency instead of a compile-time.The checks are moved from the module compiler to the parallel checker.
This requires storing the
@impl
statements as well as the list of@behaviour
s when compiling the module, for later retrieval when doing the checks.Remains to be done:@behaviour :"Elixir.MyModule"
does not (yet) introduce a runtime dependency at all and so it is possible that further changes toMyModule
will not trigger checks for modules implementing it.Notes:
behaviour
code to a newModule.Behaviour
module, but that's not necessary and code could easily be moved back intoModule