diff options
author | Tristan Sloughter <t@crashfast.com> | 2015-04-10 22:31:01 -0500 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2015-04-11 11:50:16 -0500 |
commit | d75ba02671236634906989f70eadc785658b4959 (patch) | |
tree | 187d17775bb5617dcc37b81cdfe307379b84c28e /src/rebar_digraph.erl | |
parent | a447067888deb47cad7b009d65f76bed61fda7a3 (diff) |
support single atoms for pkg deps, fetch highest version available
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) -> |