Commit 743f4324 authored by Samuel Giddins's avatar Samuel Giddins

[Resolver] Use bundlers sorting heuristic

parent 4739ff19
...@@ -280,12 +280,15 @@ module Pod ...@@ -280,12 +280,15 @@ module Pod
def sort_dependencies(dependencies, activated, conflicts) def sort_dependencies(dependencies, activated, conflicts)
dependencies.sort_by do |dependency| dependencies.sort_by do |dependency|
name = name_for(dependency) name = name_for(dependency)
vertex = activated.vertex_named(name)
locked_vertex = @locked_dependencies.vertex_named(name)
[ [
activated.vertex_named(name).payload ? 0 : 1, locked_vertex ? 0 : 1,
vertex.payload ? 0 : 1,
dependency.external_source ? 0 : 1, dependency.external_source ? 0 : 1,
dependency.prerelease? ? 0 : 1, vertex.root? ? 0 : 1,
conflicts[name] ? 0 : 1,
search_for(dependency).count, search_for(dependency).count,
conflicts[name] ? 0 : 1,
] ]
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment