diff options
Diffstat (limited to 'src/rebar_digraph.erl')
| -rw-r--r-- | src/rebar_digraph.erl | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/rebar_digraph.erl b/src/rebar_digraph.erl index 129ea35..35fd7e7 100644 --- a/src/rebar_digraph.erl +++ b/src/rebar_digraph.erl @@ -72,10 +72,12 @@ cull_deps(Graph, Vertices) -> cull_deps(Graph, Vertices, 1, - lists:foldl(fun({Key, _}, Levels) -> dict:store(Key, 0, Levels) end, - dict:new(), Vertices), - lists:foldl(fun({Key, _}=N, Solution) -> dict:store(Key, N, Solution) end, - dict:new(), Vertices), + lists:foldl(fun({Key, _}, Levels) -> + dict:store(Key, 0, Levels) + end, dict:new(), Vertices), + lists:foldl(fun({Key, _}=N, Solution) -> + dict:store(Key, N, Solution) + end, dict:new(), Vertices), []). cull_deps(_Graph, [], _Level, Levels, Solution, Discarded) -> @@ -99,7 +101,7 @@ cull_deps(Graph, Vertices, Level, Levels, Solution, Discarded) -> DiscardedAcc1} end end, {NewVertices, SolutionAcc, LevelsAcc, DiscardedAcc}, OutNeighbors) - end, {[], Solution, Levels, Discarded}, lists:keysort(1, Vertices)), + end, {[], Solution, Levels, Discarded}, lists:sort(Vertices)), cull_deps(Graph, NV, Level+1, LS, NS, DS). subgraph(Graph, Vertices) -> |
