diff options
author | Hemant Kumar <gethemant@gmail.com> | 2013-07-22 03:27:26 +0530 |
---|---|---|
committer | Hemant Kumar <gethemant@gmail.com> | 2013-07-22 03:27:26 +0530 |
commit | 7a98d5dee816a34ae898a840023334f7d2bdc466 (patch) | |
tree | 4436465c63145c485d125aa0a31ca2966290d012 | |
parent | d7b260d2fbb78bd8b2e765eb0ad37e65451ed1ea (diff) | |
download | bundler-fix-backtracking-from-child.tar.gz |
Fix problem with realworld bundler specsfix-backtracking-from-child
-rw-r--r-- | lib/bundler/resolver.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/bundler/resolver.rb b/lib/bundler/resolver.rb index 6f467ae619..43156714aa 100644 --- a/lib/bundler/resolver.rb +++ b/lib/bundler/resolver.rb @@ -247,7 +247,7 @@ module Bundler parent = current.required_by.last if parent && other_versions_of_parent = search(parent) - if other_versions_of_parent.length <=1 + if parent.required_by.empty? && other_versions_of_parent.length <=1 parent = existing.required_by.last if existing.respond_to?(:required_by) end end @@ -277,7 +277,6 @@ module Bundler # Fetch all gem versions matching the requirement matching_versions = search(current) - # If we found no versions that match the current requirement if matching_versions.empty? # If this is a top-level Gemfile requirement @@ -316,7 +315,6 @@ module Bundler conflict = resolve_requirement(spec_group, current, reqs.dup, activated.dup, depth) conflicts << conflict if conflict end - # We throw the conflict up the dependency chain if it has not been # resolved (in @errors), thus avoiding branches of the tree that have no effect # on this conflict. Note that if the tree has multiple conflicts, we don't |