summaryrefslogtreecommitdiff
path: root/src/rebar_digraph.erl
diff options
context:
space:
mode:
authorTristan Sloughter <tristan.sloughter@gmail.com>2015-04-15 19:20:57 -0500
committerTristan Sloughter <tristan.sloughter@gmail.com>2015-04-15 19:20:57 -0500
commitcbd22cf49003421214880b252015f331f4346e6e (patch)
tree25498a6e246fb018733d15a05ff7eb6815987e87 /src/rebar_digraph.erl
parent38191c369a29c4cd8f6c5a30233014b7d7547813 (diff)
parentf82874de5802dbf9e2029a9aa07c7cbae12a1324 (diff)
Merge pull request #340 from tsloughter/compile_sort
include applications list in compile sort
Diffstat (limited to 'src/rebar_digraph.erl')
-rw-r--r--src/rebar_digraph.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rebar_digraph.erl b/src/rebar_digraph.erl
index 7c1fe90..9e10d49 100644
--- a/src/rebar_digraph.erl
+++ b/src/rebar_digraph.erl
@@ -13,7 +13,7 @@ compile_order(Apps) ->
Graph = digraph:new(),
lists:foreach(fun(App) ->
Name = rebar_app_info:name(App),
- Deps = rebar_app_info:deps(App),
+ Deps = all_apps_deps(App),
add(Graph, {Name, Deps})
end, Apps),
case digraph_utils:topsort(Graph) of
@@ -123,3 +123,7 @@ find_app_by_name(Name, Apps) ->
ec_lists:find(fun(App) ->
rebar_app_info:name(App) =:= Name
end, Apps).
+
+all_apps_deps(App) ->
+ Applications = [atom_to_binary(X, utf8) || X <- rebar_app_info:applications(App)],
+ lists:usort(rebar_app_info:deps(App) ++ Applications).