mirror of
https://github.com/correl/rebar.git
synced 2024-11-23 19:19:54 +00:00
Ignore skip_deps during update-deps as it has no meaning
This commit is contained in:
parent
cb4599f828
commit
0977d58361
1 changed files with 28 additions and 28 deletions
|
@ -68,6 +68,23 @@ preprocess(Config, _) ->
|
|||
%% Add available deps to code path
|
||||
Config3 = update_deps_code_path(Config2, AvailableDeps),
|
||||
|
||||
%% Filtering out 'raw' dependencies so that no commands other than
|
||||
%% deps-related can be executed on their directories.
|
||||
NonRawAvailableDeps = [D || D <- AvailableDeps, not D#dep.is_raw],
|
||||
|
||||
case rebar_config:get(Config, command, undefined) of
|
||||
'update-deps' ->
|
||||
%% Skip ALL of the dep folders, we do this because we don't want
|
||||
%% any other calls to preprocess() for update-deps beyond the
|
||||
%% toplevel directory. They aren't actually harmful, but they slow
|
||||
%% things down unnecessarily.
|
||||
NewConfig = lists:foldl(fun(D, Acc) ->
|
||||
rebar_config:set_skip_dir(Acc, D#dep.dir)
|
||||
end, Config3, collect_deps(rebar_utils:get_cwd(), Config3)),
|
||||
%% Return the empty list, as we don't want anything processed before
|
||||
%% us.
|
||||
{ok, NewConfig, []};
|
||||
_ ->
|
||||
%% If skip_deps=true, mark each dep dir as a skip_dir w/ the core so that
|
||||
%% the current command doesn't run on the dep dir. However, pre/postprocess
|
||||
%% WILL run (and we want it to) for transitivity purposes.
|
||||
|
@ -93,23 +110,6 @@ preprocess(Config, _) ->
|
|||
Config3
|
||||
end,
|
||||
|
||||
%% Filtering out 'raw' dependencies so that no commands other than
|
||||
%% deps-related can be executed on their directories.
|
||||
NonRawAvailableDeps = [D || D <- AvailableDeps, not D#dep.is_raw],
|
||||
|
||||
case rebar_config:get(Config, command, undefined) of
|
||||
'update-deps' ->
|
||||
%% Skip ALL of the dep folders, we do this because we don't want
|
||||
%% any other calls to preprocess() for update-deps beyond the
|
||||
%% toplevel directory. They aren't actually harmful, but they slow
|
||||
%% things down unnecessarily.
|
||||
NewConfig2 = lists:foldl(fun(D, Acc) ->
|
||||
rebar_config:set_skip_dir(Acc, D#dep.dir)
|
||||
end, NewConfig, collect_deps(rebar_utils:get_cwd(),NewConfig)),
|
||||
%% Return the empty list, as we don't want anything processed before
|
||||
%% us.
|
||||
{ok, NewConfig2, []};
|
||||
_ ->
|
||||
%% Return all the available dep directories for process
|
||||
{ok, NewConfig, dep_dirs(NonRawAvailableDeps)}
|
||||
end.
|
||||
|
|
Loading…
Reference in a new issue