error with xref and on_load functions

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

error with xref and on_load functions

Felipe Ripoll Gisbert
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

--

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error with xref and on_load functions

Hans Bolinder-2

Hi,

I don't think the bug has been reported before. Thanks! I'll write a ticket.

Best regards,

Hans Bolinder, Erlang/OTP team, Ericsson


Från: [hidden email] <[hidden email]> för Felipe Ripoll Gisbert <[hidden email]>
Skickat: den 11 april 2017 21:48:12
Till: [hidden email]
Ämne: [erlang-questions] error with xref and on_load functions
 
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

--

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