[erlang-questions] error with xref and on_load functions

Felipe Ripoll Gisbert <>
Tue Apr 11 21:48:12 CEST 2017


Hi all,
I have a problem running xref on modules with `on_load` functions, for
example, giving this module:

-module(xreftest).
-on_load(init/0).

init() ->
  ok.

if we run xref:

1> c(xreftest, [debug_info]).
{ok,xreftest}
2> xref:d(".").
[{deprecated,[]},
 {undefined,[]},
 {unused,[{xreftest,init,0}]}]

we get an `unused` warning for init/0 but it is actually used on load.

Is this a known issue?

Thanks

-- 
*Felipe Ripoll Gisbert*
www.feliperipoll.es


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170411/7f66f8ca/attachment.html>


More information about the erlang-questions mailing list