summaryrefslogtreecommitdiff
path: root/src/rebar_digraph.erl
diff options
context:
space:
mode:
authorTristan Sloughter <tristan.sloughter@gmail.com>2015-08-01 17:06:51 -0500
committerTristan Sloughter <tristan.sloughter@gmail.com>2015-08-01 17:06:51 -0500
commitacb2fcd057f519113cf6d08a2c65c6d0a9e3da9b (patch)
treee1f370bdb362aa6c0bf0b1d87071c6fa1bf0c2cd /src/rebar_digraph.erl
parent0d9128fe7ca0611d756f8e587bf36dba8532ebba (diff)
parentc7bb13f29b66f9429c9db737842865846f255871 (diff)
Merge pull request #679 from tsloughter/pkg_level
keep correct Level for pkg deps of scm deps
Diffstat (limited to 'src/rebar_digraph.erl')
-rw-r--r--src/rebar_digraph.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rebar_digraph.erl b/src/rebar_digraph.erl
index a9c1cbb..a4635e3 100644
--- a/src/rebar_digraph.erl
+++ b/src/rebar_digraph.erl
@@ -2,7 +2,7 @@
-export([compile_order/1
,restore_graph/1
- ,cull_deps/2
+ ,cull_deps/3
,subgraph/2
,format_error/1]).
@@ -68,12 +68,12 @@ restore_graph({Vs, Es}) ->
%% Pick packages to fullfill dependencies
%% The first dep while traversing the graph is chosen and any conflicting
%% dep encountered later on is ignored.
-cull_deps(Graph, Vertices) ->
+cull_deps(Graph, Vertices, Level) ->
cull_deps(Graph,
Vertices,
- 1,
+ Level+1,
lists:foldl(fun({Key, _}, Levels) ->
- dict:store(Key, 0, Levels)
+ dict:store(Key, Level, Levels)
end, dict:new(), Vertices),
lists:foldl(fun({Key, _}=N, Solution) ->
dict:store(Key, N, Solution)