summaryrefslogtreecommitdiff
path: root/src/rebar_app_discover.erl
diff options
context:
space:
mode:
authorTristan Sloughter <tristan.sloughter@gmail.com>2015-08-21 21:23:08 -0500
committerTristan Sloughter <tristan.sloughter@gmail.com>2015-08-21 21:23:08 -0500
commit1f6516b231260a1b2e48f9b86e37a5d317d4983c (patch)
treefdade8897340406cf52bd7807e92086856f13a60 /src/rebar_app_discover.erl
parentb52395f4aec11bacaace91ec72e100c9778d6098 (diff)
parente853e12d7c5b3f0f29670d4ae89d17d004edada1 (diff)
Merge pull request #732 from tsloughter/level_wins
this patch treats pkg and src deps as equals, so level decides winner
Diffstat (limited to 'src/rebar_app_discover.erl')
-rw-r--r--src/rebar_app_discover.erl18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/rebar_app_discover.erl b/src/rebar_app_discover.erl
index e81a323..8b1e58e 100644
--- a/src/rebar_app_discover.erl
+++ b/src/rebar_app_discover.erl
@@ -96,7 +96,7 @@ merge_deps(AppInfo, State) ->
{AppInfo1, State1}.
handle_profile(Profile, Name, AppState, State) ->
- {TopSrc, TopPkg} = rebar_state:get(State, {parsed_deps, Profile}, {[], []}),
+ TopParsedDeps = rebar_state:get(State, {parsed_deps, Profile}, {[], []}),
TopLevelProfileDeps = rebar_state:get(State, {deps, Profile}, []),
AppProfileDeps = rebar_state:get(AppState, {deps, Profile}, []),
AppProfileDeps2 = rebar_utils:tup_dedup(rebar_utils:tup_sort(AppProfileDeps)),
@@ -108,18 +108,18 @@ handle_profile(Profile, Name, AppState, State) ->
%% Only deps not also specified in the top level config need
%% to be included in the parsed deps
NewDeps = ProfileDeps2 -- TopLevelProfileDeps,
- {ParsedSrc, ParsedPkg} = parse_profile_deps(Profile, Name, NewDeps, AppState, State1),
- rebar_state:set(State1, {parsed_deps, Profile}, {TopSrc++ParsedSrc, TopPkg++ParsedPkg}).
+ ParsedDeps = parse_profile_deps(Profile, Name, NewDeps, AppState, State1),
+ rebar_state:set(State1, {parsed_deps, Profile}, TopParsedDeps++ParsedDeps).
parse_profile_deps(Profile, Name, Deps, AppState, State) ->
DepsDir = rebar_prv_install_deps:profile_dep_dir(State, Profile),
Locks = rebar_state:get(State, {locks, Profile}, []),
- rebar_prv_install_deps:parse_deps(Name
- ,DepsDir
- ,Deps
- ,AppState
- ,Locks
- ,1).
+ rebar_app_utils:parse_deps(Name
+ ,DepsDir
+ ,Deps
+ ,AppState
+ ,Locks
+ ,1).
project_app_config(AppInfo, State) ->
C = rebar_config:consult(rebar_app_info:dir(AppInfo)),