diff options
author | Homu <homu@barosl.com> | 2016-09-13 09:44:39 +0900 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-09-13 18:16:03 +0200 |
commit | ea022b4bbfce2aeac17a2dccd70651514f5b9a1e (patch) | |
tree | 25e036d7c1c518d34c146a368378b03b3feedf69 | |
parent | 51ba37b725b3e4ea7212cce7ac4b3511d8ce8219 (diff) | |
download | bundler-ea022b4bbfce2aeac17a2dccd70651514f5b9a1e.tar.gz |
Auto merge of #4972 - bundler:seg-molinillo-0.5.1, r=indirect
Update vendored Molinillo to 0.5.1
See https://github.com/CocoaPods/Molinillo/releases/0.5.1
I'd love this to be a 1.13.1
(cherry picked from commit ffbb417d22592fe3b0a6e5f6008fc7eee491b027)
-rw-r--r-- | lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb | 2 | ||||
-rw-r--r-- | lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb b/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb index c44da1ce3e..f840e7ea30 100644 --- a/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb +++ b/lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Bundler::Molinillo # The version of Bundler::Molinillo. - VERSION = '0.5.0'.freeze + VERSION = '0.5.1'.freeze end diff --git a/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb b/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb index 5707e890b7..1890d95a56 100644 --- a/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb +++ b/lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb @@ -184,6 +184,8 @@ module Bundler::Molinillo raise VersionConflict.new(c) unless state activated.rewind_to(sliced_states.first || :initial_state) if sliced_states state.conflicts = c + index = states.size - 1 + @parent_of.reject! { |_, i| i >= index } end end @@ -209,7 +211,10 @@ module Bundler::Molinillo # @return [Object] the requirement that led to `requirement` being added # to the list of requirements. def parent_of(requirement) - @parent_of[requirement] + return unless requirement + return unless index = @parent_of[requirement] + return unless parent_state = @states[index] + parent_state.requirement end # @return [Object] the requirement that led to a version of a possibility @@ -418,7 +423,8 @@ module Bundler::Molinillo debug(depth) { "Requiring nested dependencies (#{nested_dependencies.join(', ')})" } nested_dependencies.each do |d| activated.add_child_vertex(name_for(d), nil, [name_for(activated_spec)], d) - @parent_of[d] = requirement + parent_index = states.size - 1 + @parent_of[d] ||= parent_index end push_state_for_requirements(requirements + nested_dependencies, !nested_dependencies.empty?) |