summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLiam McNamara <liam.mcnamara@klarna.com>2017-11-20 10:09:32 +0100
committerLiam McNamara <liam.mcnamara@klarna.com>2017-11-20 12:50:37 +0100
commit64056bf9f9fee47227c60609a7684b04d8df577a (patch)
treece94a202a011dcceae7161f7c191caafcfe176a1 /src
parenteff06dd9ed9f32befde46578853ec6e0f29a1205 (diff)
Allow silencing skip warnings when fetching deps
When fetching deps, if this is a clean repo there will be extensive messages warning that dependencies which have already been fetched are being skipped. For large projects being built and tested in a clean environment this significantly increases the noise level of the build. This modification adds an additional rebar option (deps_warning_on_conflict) that will allow disabling these warning messages. If deps_error_on_conflict is set, an error will still be thrown. This will not change default behaviour of rebar. There is a similar outstanding issue: https://github.com/erlang/rebar3/issues/1105 However this seems to be a push for not outputting warnings when the dep version is the same, rather than disabling warnings altogether.
Diffstat (limited to 'src')
-rw-r--r--src/rebar_prv_install_deps.erl9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/rebar_prv_install_deps.erl b/src/rebar_prv_install_deps.erl
index 65aabff..b735ed0 100644
--- a/src/rebar_prv_install_deps.erl
+++ b/src/rebar_prv_install_deps.erl
@@ -419,8 +419,13 @@ warn_skip_deps(AppInfo, State) ->
Args = [rebar_app_info:name(AppInfo),
rebar_app_info:source(AppInfo)],
case rebar_state:get(State, deps_error_on_conflict, false) of
- false -> ?WARN(Msg, Args);
- true -> ?ERROR(Msg, Args), ?FAIL
+ false ->
+ case rebar_state:get(State, deps_warning_on_conflict, true) of
+ true -> ?WARN(Msg, Args);
+ false -> ok
+ end;
+ true ->
+ ?ERROR(Msg, Args), ?FAIL
end.
not_needs_compile(App) ->