[erlang-questions] Retrieving the dependencies of a module
Ivan Uemlianin
ivan@REDACTED
Tue Jul 24 17:16:46 CEST 2018
Does xref do what you need?
http://erlang.org/doc/apps/tools/xref_chapter.html
Ivan
On 24/07/2018 15:33, Lutz Behnke wrote:
> Hi there,
>
> I am trying to find out what other modules the functions in a given
> module are calling. Is there a standard mechanism to do so?
>
> I have the following problem:
>
> In one application build with rebar3:
>
> app_one/src/a.erl:
> -module(a)
> f1() -> b:f2().
>
> in the other application, also build with rebar3:
>
> app_two/src/b.erl:
> -module(b)
> f2() -> c:f3().
>
>
> The module c is nowhere defined in either application one, two, or the
> dependencies either pulls.
>
> When I run the tests of application two everything works, when I try
> to call the code from the module a, I get:
>
> {failed_to_start_child,b,
> {undef,
> [{c,f3,[],[]},
> {b,f2,1,[{...}|...]},
> {gen_server,init_it,2,[...]},
> {gen_server,init_it,6,...},
> {proc_lib,init_p_do_apply,...}]}}}
>
> application two is specifically my fork of plumtree:
> https://github.com/timadorus/plumtree
>
> Therefore I am trying to understand what is actually placed in the
> beam, or what modules are accessed from b (aka
> plumtree_metadata_hashtree) to see where the working code in the test
> is comming from).
> I would assume that there is some code_transform going on, but cannot
> find any in the rebar configuration.
>
> Any help appreciated.
>
> mfg lutz
--
============================================================
Ivan A. Uemlianin PhD
Llaisdy
Ymchwil a Datblygu Technoleg Lleferydd
Speech Technology Research and Development
ivan@REDACTED
@llaisdy
llaisdy.wordpress.com
github.com/llaisdy
www.linkedin.com/in/ivanuemlianin
festina lente
============================================================
More information about the erlang-questions
mailing list