[erlang-questions] Retrieving the dependencies of a module
Lutz Behnke
lutz.behnke@REDACTED
Wed Jul 25 09:06:12 CEST 2018
Please excuse my waste of your time.
It is a classical PEBKAC: tests that are never called cannot fail.
On the plus side: I learned more about xref, especially the fact, that
it analyses the beam file instead of the source code.
Thank you for your help.
mfg lutz
Am 25.07.2018 um 03:07 schrieb Dmitry Belyaev:
> Are you sure the plumtree CT tests are executing the code that xref
> complains about?
>
> Kind regards,
> Dmitry Belyaev
>
> On Wed, Jul 25, 2018 at 5:35 AM, Lutz Behnke <
> lutz.behnke@REDACTED> wrote:
>
>> Not really. Instead it deepens my confusion, as it reports the same
>> function as missing in plumtree as it does in my code, despite the CT tests
>> of plumtree working.
>>
>> mfg lutz
>>
>>
>> Am 24.07.2018 um 17:16 schrieb Ivan Uemlianin:
>>
>>> 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
>>>>
>>>
>>>
>>
>> --
>> 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
>>
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>
--
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