I have a structure similar to the following:
rebar.config
deps/
apps/A/rebar.config
My top-level rebar.config
file looks like the following:
{sub_dirs, ["apps/A"]}.
{lib_dirs, ["deps"]}.
A/rebar.config
looks like the following:
{deps, [
%% deps
]}.
{erl_opts, [debug_info, warn_missing_spec, warnings_as_errors]}.
Now, one of my dependencies doesn't provide -spec
for all of its functions, so the warnings_as_errors
causes the compile to fail.
I was expecting the erl_opts
to only affect my code, and for the dependencies to have their own options. Why does rebar
do this?
I cannot reproduce this using the following version of rebar:
On my local setup, using your same config (goldrush is my dependency):
As you can see, the two applications receive two different sets of options.
Could you enable debugging and post the relevant output?
What version of rebar/Erlang are you running?