From 3cb67ff753d68212ba613587bceb806244d795c5 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Sat, 4 Jun 2016 00:01:37 -0400 Subject: Account for umbrella apps' deps in upgrades --- src/rebar_prv_upgrade.erl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/rebar_prv_upgrade.erl b/src/rebar_prv_upgrade.erl index c5c43e4..87d01d4 100644 --- a/src/rebar_prv_upgrade.erl +++ b/src/rebar_prv_upgrade.erl @@ -45,7 +45,13 @@ init(State) -> do(State) -> {Args, _} = rebar_state:command_parsed_args(State), Locks = rebar_state:get(State, {locks, default}, []), - Deps = rebar_state:get(State, deps, []), + %% grab the parsed deps, and then add in the deps found in each of the + %% umbrella apps' configs (which are in {deps, default} when added by + %% `rebar_app_discover'). This later set however includes locks, so + %% we remove them to get a full picture. + TopDeps = rebar_state:get(State, deps, []), + ProfileDeps = rebar_state:get(State, {deps, default}, []), + Deps = TopDeps ++ ((ProfileDeps -- TopDeps) -- Locks), % top deps > profile deps Names = parse_names(ec_cnv:to_binary(proplists:get_value(package, Args, <<"">>)), Locks), DepsDict = deps_dict(rebar_state:all_deps(State)), case prepare_locks(Names, Deps, Locks, [], DepsDict) of -- cgit v1.1