Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Auto merge of #6652 - bundler:seg-molinillo-0.6.6, r=segiddins
Browse files Browse the repository at this point in the history
Update vendored Molinillo to 0.6.6

See https://github.com/CocoaPods/Molinillo/releases/0.6.6
  • Loading branch information
bundlerbot committed Aug 7, 2018
2 parents 5dcfc31 + a220ba5 commit cc25eda
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,21 @@ def hash
# dependency graph?
# @return true iff there is a path following edges within this {#graph}
def path_to?(other)
equal?(other) || successors.any? { |v| v.path_to?(other) }
_path_to?(other)
end

alias descendent? path_to?

# @param [Vertex] other the vertex to check if there's a path to
# @param [Set<Vertex>] visited the vertices of {#graph} that have been visited
# @return [Boolean] whether there is a path to `other` from `self`
def _path_to?(other, visited = Set.new)
return false unless visited.add?(self)
return true if equal?(other)
successors.any? { |v| v._path_to?(other, visited) }
end
protected :_path_to?

# Is there a path from `other` to `self` following edges in the
# dependency graph?
# @return true iff there is a path following edges within this {#graph}
Expand Down
9 changes: 7 additions & 2 deletions lib/bundler/vendor/molinillo/lib/molinillo/errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class NoSuchDependencyError < ResolverError
# @param [Array<Object>] required_by @see {#required_by}
def initialize(dependency, required_by = [])
@dependency = dependency
@required_by = required_by
@required_by = required_by.uniq
super()
end

Expand Down Expand Up @@ -101,9 +101,14 @@ def message_with_trees(opts = {})
printable_requirement = opts.delete(:printable_requirement) { proc { |req| req.to_s } }
additional_message_for_conflict = opts.delete(:additional_message_for_conflict) { proc {} }
version_for_spec = opts.delete(:version_for_spec) { proc(&:to_s) }
incompatible_version_message_for_conflict = opts.delete(:incompatible_version_message_for_conflict) do
proc do |name, _conflict|
%(#{solver_name} could not find compatible versions for #{possibility_type} "#{name}":)
end
end

conflicts.sort.reduce(''.dup) do |o, (name, conflict)|
o << %(\n#{solver_name} could not find compatible versions for #{possibility_type} "#{name}":\n)
o << "\n" << incompatible_version_message_for_conflict.call(name, conflict) << "\n"
if conflict.locked_requirement
o << %( In snapshot (#{name_for_locking_dependency_source}):\n)
o << %( #{printable_requirement.call(conflict.locked_requirement)}\n)
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

module Bundler::Molinillo
# The version of Bundler::Molinillo.
VERSION = '0.6.5'.freeze
VERSION = '0.6.6'.freeze
end

0 comments on commit cc25eda

Please sign in to comment.