# File lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb, line 367def unwind_options_for_requirements(binding_requirements)unwind_details=[]trees=[]binding_requirements.reverse_eachdo|r|partial_tree=[r]trees<<partial_treeunwind_details<<UnwindDetails.new(-1,nil,partial_tree,binding_requirements,trees,[])# If this requirement has alternative possibilities, check if any would# satisfy the other requirements that created this conflictrequirement_state=find_state_for(r)ifconflict_fixing_possibilities?(requirement_state,binding_requirements)unwind_details<<UnwindDetails.new(states.index(requirement_state),r,partial_tree,binding_requirements,trees,[])end# Next, look at the parent of this requirement, and check if the requirement# could have been avoided if an alternative PossibilitySet had been chosenparent_r=parent_of(r)nextifparent_r.nil?partial_tree.unshift(parent_r)requirement_state=find_state_for(parent_r)ifrequirement_state.possibilities.any?{|set|!set.dependencies.include?(r)}unwind_details<<UnwindDetails.new(states.index(requirement_state),parent_r,partial_tree,binding_requirements,trees,[])end# Finally, look at the grandparent and up of this requirement, looking# for any possibilities that wouldn't create their parent requirementgrandparent_r=parent_of(parent_r)untilgrandparent_r.nil?partial_tree.unshift(grandparent_r)requirement_state=find_state_for(grandparent_r)ifrequirement_state.possibilities.any?{|set|!set.dependencies.include?(parent_r)}unwind_details<<UnwindDetails.new(states.index(requirement_state),grandparent_r,partial_tree,binding_requirements,trees,[])endparent_r=grandparent_rgrandparent_r=parent_of(parent_r)endendunwind_detailsend