summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2016-06-04 00:01:37 -0400
committerFred Hebert <mononcqc@ferd.ca>2016-06-04 00:01:37 -0400
commit3cb67ff753d68212ba613587bceb806244d795c5 (patch)
tree661a703beb7089b15dbff913e13250e437ae6358 /src
parent88b251a364b0d1ec9624bcc7e9bb4f99dcb6678c (diff)
Account for umbrella apps' deps in upgrades
Diffstat (limited to 'src')
-rw-r--r--src/rebar_prv_upgrade.erl8
1 files changed, 7 insertions, 1 deletions
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