summaryrefslogtreecommitdiff
path: root/src/rebar_app_discover.erl
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2015-04-10 22:31:01 -0500
committerTristan Sloughter <t@crashfast.com>2015-04-11 11:50:16 -0500
commitd75ba02671236634906989f70eadc785658b4959 (patch)
tree187d17775bb5617dcc37b81cdfe307379b84c28e /src/rebar_app_discover.erl
parenta447067888deb47cad7b009d65f76bed61fda7a3 (diff)
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.