method
handle_conflict
v2_1_10 -
Show latest stable
-
0 notes -
Class: Resolver
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10 (0)
- 2_2_9 (0)
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
handle_conflict(dep, existing)
public
Hide source
# File lib/rubygems/resolver.rb, line 194 def handle_conflict(dep, existing) # :nodoc: # There is a conflict! We return the conflict object which will be seen by # the caller and be handled at the right level. # If the existing activation indicates that there are other possibles for # it, then issue the conflict on the dependency for the activation itself. # Otherwise, if there was a requester, issue it on the requester's # request itself. # Finally, if the existing request has no requester (toplevel) unwind to # it anyway. if existing.others_possible? conflict = Gem::Resolver::Conflict.new dep, existing elsif dep.requester depreq = dep.requester.request conflict = Gem::Resolver::Conflict.new depreq, existing, dep elsif existing.request.requester.nil? conflict = Gem::Resolver::Conflict.new dep, existing else raise Gem::DependencyError, "Unable to figure out how to unwind conflict" end @conflicts << conflict unless @conflicts.include? conflict return conflict end