summaryrefslogtreecommitdiff
path: root/src/rebar_app_discover.erl
diff options
context:
space:
mode:
authorTristan Sloughter <tristan.sloughter@gmail.com>2015-04-11 19:53:53 -0500
committerTristan Sloughter <tristan.sloughter@gmail.com>2015-04-11 19:53:53 -0500
commit0ad833b700f59bd5fd5e3b34aab2f887424671f3 (patch)
treeebaf2b2c639509b9211528c15a2337f27b965c9f /src/rebar_app_discover.erl
parentf88bb57cd34f3636217a1d1ae5f63eb32ba448d6 (diff)
parent4fb9207d9a7bd4e8d227c05ba2eb6089ca98322c (diff)
Merge pull request #330 from tsloughter/wip_single_atom_deps
support single atoms for pkg deps, fetch highest version available
Diffstat (limited to 'src/rebar_app_discover.erl')
-rw-r--r--src/rebar_app_discover.erl9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/rebar_app_discover.erl b/src/rebar_app_discover.erl
index 0799313..fe930bd 100644
--- a/src/rebar_app_discover.erl
+++ b/src/rebar_app_discover.erl
@@ -48,9 +48,9 @@ merge_deps(AppInfo, State) ->
State1 = lists:foldl(fun(Profile, StateAcc) ->
AppProfDeps = rebar_state:get(AppState, {deps, Profile}, []),
TopLevelProfDeps = rebar_state:get(StateAcc, {deps, Profile}, []),
- ProfDeps2 = dedup(lists:keymerge(1,
- lists:keysort(1, TopLevelProfDeps),
- lists:keysort(1, AppProfDeps))),
+ ProfDeps2 = dedup(rebar_utils:tup_umerge(
+ rebar_utils:tup_sort(TopLevelProfDeps)
+ ,rebar_utils:tup_sort(AppProfDeps))),
rebar_state:set(StateAcc, {deps, Profile}, ProfDeps2)
end, State, lists:reverse(CurrentProfiles)),
@@ -164,7 +164,8 @@ create_app_info(AppDir, AppFile) ->
AppInfo1 = rebar_app_info:applications(
rebar_app_info:app_details(AppInfo, AppDetails),
IncludedApplications++Applications),
- rebar_app_info:dir(AppInfo1, AppDir);
+ Valid = rebar_app_utils:validate_application_info(AppInfo1),
+ rebar_app_info:dir(rebar_app_info:valid(AppInfo1, Valid), AppDir);
_ ->
error
end.