Callback attribute removed from module_info in Erlang 19

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.