[erlang-questions] Retrieving the dependencies of a module

Lutz Behnke lutz.behnke@REDACTED
Tue Jul 24 16:33:37 CEST 2018


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
-- 
Lutz Behnke
Hochschule für Angewandte Wissenschaften Hamburg,
Labor für Allgemeine Informatik,

phone: +49 40 42875-8156    mailto:lutz.behnke@REDACTED
fax  : +49 40 2803770       http://users.informatik.haw-hamburg.de/~sage
Berliner Tor 7, 20099 Hamburg, Germany



More information about the erlang-questions mailing list