From 5a45fde441c3244e974a7be83ae37ba7c33ccb98 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Fri, 9 Oct 2020 21:58:28 +0000 Subject: [PATCH] more DIAGNOSTIC-level output --- src/rebar_fetch.erl | 2 +- src/rebar_parallel.erl | 2 +- src/rebar_paths.erl | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/rebar_fetch.erl b/src/rebar_fetch.erl index 3696b339..4590b10f 100644 --- a/src/rebar_fetch.erl +++ b/src/rebar_fetch.erl @@ -45,7 +45,7 @@ download_source(AppInfo, State) -> throw:{no_resource, Type, Location} -> throw(?PRV_ERROR({no_resource, Location, Type})); ?WITH_STACKTRACE(C,T,S) - ?DEBUG("rebar_fetch exception ~p ~p ~p", [C, T, S]), + ?DIAGNOSTIC("rebar_fetch exception ~p ~p ~p", [C, T, S]), throw(?PRV_ERROR({fetch_fail, rebar_app_info:source(AppInfo)})) end. diff --git a/src/rebar_parallel.erl b/src/rebar_parallel.erl index 8e48c9b7..e1b62161 100644 --- a/src/rebar_parallel.erl +++ b/src/rebar_parallel.erl @@ -14,7 +14,7 @@ queue(Tasks, WorkF, WArgs, Handler, HArgs) -> Parent = self(), Worker = fun() -> worker(Parent, WorkF, WArgs) end, Jobs = min(length(Tasks), erlang:system_info(schedulers)), - ?DEBUG("Starting ~B worker(s)", [Jobs]), + ?DIAGNOSTIC("Starting ~B worker(s)", [Jobs]), Pids = [spawn_monitor(Worker) || _ <- lists:seq(1, Jobs)], parallel_dispatch(Tasks, Pids, Handler, HArgs). diff --git a/src/rebar_paths.erl b/src/rebar_paths.erl index 6b8d6a30..7a494430 100644 --- a/src/rebar_paths.erl +++ b/src/rebar_paths.erl @@ -14,6 +14,7 @@ -spec set_paths(targets(), rebar_state:t()) -> ok. set_paths(UserTargets, State) -> Targets = normalize_targets(UserTargets), + ?DIAGNOSTIC("Setting paths to ~p", [Targets]), GroupPaths = path_groups(Targets, State), Paths = lists:append(lists:reverse([P || {_, P} <- GroupPaths])), code:add_pathsa(Paths), @@ -24,6 +25,7 @@ set_paths(UserTargets, State) -> -spec unset_paths(targets(), rebar_state:t()) -> ok. unset_paths(UserTargets, State) -> Targets = normalize_targets(UserTargets), + ?DIAGNOSTIC("Removing ~p paths", [Targets]), GroupPaths = path_groups(Targets, State), Paths = lists:append([P || {_, P} <- GroupPaths]), [code:del_path(P) || P <- Paths], @@ -240,4 +242,4 @@ get_runtime_apps([App|Rest0], AppsAcc0, AppsList) -> error -> {Rest, Acc} end end, {Rest0, sets:add_element(App, AppsAcc0)}, TotalApps), - get_runtime_apps(Rest1 ++ TotalApps, AppsAcc1, AppsList). \ No newline at end of file + get_runtime_apps(Rest1 ++ TotalApps, AppsAcc1, AppsList).