From 64056bf9f9fee47227c60609a7684b04d8df577a Mon Sep 17 00:00:00 2001 From: Liam McNamara Date: Mon, 20 Nov 2017 10:09:32 +0100 Subject: 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. --- src/rebar_prv_install_deps.erl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/rebar_prv_install_deps.erl') 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) -> -- cgit v1.1