[erlang-questions] Fwd: Callbacks no longer in Module:module_info(attributes) on OTP 19

Eric Entin eric@REDACTED
Fri Jun 24 00:09:28 CEST 2016


Apologies if anyone receives this twice, but I think I was not able to post
to the group before because I had not joined it.

On OTP 19:

Erlang/OTP 19 [erts-8.0] [source] [64-bit] [smp:8:8] [async-threads:10]
> [hipe] [kernel-poll:false]
>


Eshell V8.0  (abort with ^G)
> 1> gen_server:module_info(attributes).
> [{vsn,[312724683823627977474402165944618744937]}]


but on OTP 18:

Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:8:8] [async-threads:10]
> [hipe] [kernel-poll:false] [dtrace]
>


Eshell V7.3  (abort with ^G)
> 1> gen_server:module_info(attributes).
> [{vsn,[103744906244088013982217220225633001614]},
>  {callback,[{{init,1},
>              [{type,"t",'fun',
>                     [{type,"t",product,
>
>  [{ann_type,"t",[{var,"t",'Args'},{type,"t",term,[]}]}]},
>                      {type,"u",union,
>
>  [{type,"u",tuple,[{atom,"u",ok},{ann_type,"u",[{...}|...]}]},
>                             {type,"u",tuple,
>
> [{atom,"u",ok},{ann_type,"u",[...]},{type,[...],...}]},
>
> {type,"v",tuple,[{atom,"v",stop},{ann_type,[...],...}]},
>                             {atom,"v",ignore}]}]}]}]}, ...]


The data is still present in the beam file on OTP 19:

Erlang/OTP 19 [erts-8.0] [source] [64-bit] [smp:8:8] [async-threads:10]
> [hipe] [kernel-poll:false]
>


Eshell V8.0  (abort with ^G)
> 1> beam_lib:chunks(code:which(gen_server), [abstract_code]).
> {ok,{gen_server,[{abstract_code,{raw_abstract_v1,[{attribute,1,
>                                                              file,
>
>  {"gen_server.erl",1}},
>
> {attribute,20,module,gen_server},
>                                                   {attribute,90,export,
>                                                              [{start,3},
>                                                               {start,4},
>
> {start_link,3},
>
> {start_link,4},
>                                                               {stop,1},
>                                                               {stop,3},
>                                                               {call,2},
>                                                               {call,3},
>                                                               {cast,2},
>                                                               {reply,2},
>                                                               {abcast,2},
>                                                               {abcast,...},
>                                                               {...}|...]},
>                                                   {attribute,100,export,
>
>  [{system_continue,3},
>
> {system_terminate,4},
>
> {system_code_change,4},
>
> {system_get_state,1},
>
> {system_replace_state,2},
>
> {format_status,2}]},
>
> {attribute,108,export,[{init_it,6}]},
>
> {attribute,110,import,{error_logger,[{format,2}]}},
>                                                   {attribute,116,callback,
>
>  {{init,1},[{type,116,'fun',[{type,...},{...}]}]}},
>                                                   {attribute,119,callback,
>
>  {{handle_call,3},[{type,119,'fun',[{...}|...]}]}},
>                                                   {attribute,127,callback,
>
>  {{handle_cast,2},[{type,127,'fun',[...]}]}},
>                                                   {attribute,131,callback,
>
>  {{handle_info,2},[{type,131,'fun',...}]}},
>
> {attribute,135,callback,{{terminate,2},[{type,135,...}]}},
>
> {attribute,139,callback,{{code_change,3},[{type,...}]}},
>
> {attribute,142,callback,{{format_status,2},[{...}]}},
>
> {attribute,149,optional_callbacks,[{format_status,...}]},
>
> {function,168,start,3,[...]},
>
> {function,171,start,4,...},
>
> {function,174,start_link,...},
>                                                   {function,177,...},
>                                                   {function,...},
>                                                   {...}|...]}}]}}


but I can't find any details on this change in the OTP 19 changelog, in a
PR on GitHub, or in the issues tracker. Can someone point me to why this
behavior changed?

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160623/eedc9408/attachment.htm>


More information about the erlang-questions mailing list