Build better Erlang.

Ask A Question



Why tasks doesn't get executed in dependency projects with the same profile as their top level projects

I was wondering what the correct usage of `profiles` in the aspect of `{erl_opts, [debug_info]}` and dependencies is. In your [profiles example]( you put `debug_info` in the `test` profile and `no_debug_info` in the `prod` profile. That is the behavior I also would have assumed to be a best practice for erlang apps and libraries. I did this for example in a migration to `rebar3` of a library project [boss_db]( From another top level erlang project I would like to use this library as a dependency, where I also define the `debug_info`/`no_debug_info` according to your example in the corresponding profiles. But when I then run `rebar3 as test dialyzer` from the top level project the dialyzer will fail with the error message: `Could not get abstract code for file: .../_build/default/lib/boss_db/ebin/boss_cache.beam (please recompile it with +debug_info)`. You can find the travis build [here]( So my question is why doesn't the dependencies also get compiled with the same profile as the top level project in general? To fix this I could define `debug_info` right within the `default` profile in the dependency but then the dependency would be compiled with `debug_info` even when I will create a release with `rebar3 as prod tar` right?

Posted by David Robakowski 3 years ago