diff options
author | The Bundler Bot <bot@bundler.io> | 2018-08-07 06:06:05 +0000 |
---|---|---|
committer | Colby Swandale <hello@colby.fyi> | 2018-08-16 21:43:01 +1000 |
commit | 84d712d5c78bb57d5d21ce840d44743d6c4a4684 (patch) | |
tree | d68a56e98b609033ba02f6a53126aee26580393a | |
parent | da0e5e920fc82dd06b6a03f2736e5d1d2ba0a82f (diff) | |
download | bundler-84d712d5c78bb57d5d21ce840d44743d6c4a4684.tar.gz |
Auto merge of #6652 - bundler:seg-molinillo-0.6.6, r=segiddins
Update vendored Molinillo to 0.6.6
See https://github.com/CocoaPods/Molinillo/releases/0.6.6
(cherry picked from commit cc25eda74bd5ff4c04e5e5973fddce364e2eab5c)
3 files changed, 19 insertions, 4 deletions
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb b/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb index e4d016de24..7ecdc4b65a 100644 --- a/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +++ b/lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb @@ -108,11 +108,21 @@ module Bundler::Molinillo # 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} diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb b/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb index fb343250b1..ce0931f103 100644 --- a/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb +++ b/lib/bundler/vendor/molinillo/lib/molinillo/errors.rb @@ -18,7 +18,7 @@ module Bundler::Molinillo # @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 @@ -101,9 +101,14 @@ module Bundler::Molinillo 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) diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb b/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb index 3feb7be9b5..73f8fbf2ac 100644 --- a/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +++ b/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb @@ -2,5 +2,5 @@ module Bundler::Molinillo # The version of Bundler::Molinillo. - VERSION = '0.6.4'.freeze + VERSION = '0.6.6'.freeze end |