Callback attribute removed from module_info in Erlang 19

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Callback attribute removed from module_info in Erlang 19

Adam Lindberg-7
This is a continuation of a previous discussion (I wasn’t subscribed to the mailing list at that time):
http://erlang.org/pipermail/erlang-questions/2017-January/091485.html

The regression of removing the callback attributes in Erlang 19 is that Meck can no longer be used on callback modules (gen_server, etc.). The reason why is described here:
https://github.com/eproxus/meck/pull/169

In summary, it is because the new version of Erlang doesn’t “tell” Meck about the callbacks anymore, the module gets mocked without them. Then, other modules which uses that behaviour fails to compile (because the behaviour doesn’t exist anymore, although the module does).

Meck creates its own version of the module, matching the signature, then uses Mod:module_info(attributes) to get the attributes and includes those. This is what has changed in Erlang 19.

Not sure what the solution here should be, I can only comment on that it is a pretty big regression for Meck (ruling out behaviour mocking for now) with a non-trivial fix.

Cheers,
Adam

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Loading...