method
build_details_for_unwind
ruby latest stable - Class:
Bundler::Molinillo::Resolver::Resolution
Method not available on this version
This method is only available on newer versions. The first available version (v2_6_3) is shown here.
build_details_for_unwind()private
@return [UnwindDetails] Details of the nearest index to which we could unwind
# File lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb, line 332
def build_details_for_unwind
# Get the possible unwinds for the current conflict
current_conflict = conflicts[name]
binding_requirements = binding_requirements_for_conflict(current_conflict)
unwind_details = unwind_options_for_requirements(binding_requirements)
last_detail_for_current_unwind = unwind_details.sort.last
current_detail = last_detail_for_current_unwind
# Look for past conflicts that could be unwound to affect the
# requirement tree for the current conflict
relevant_unused_unwinds = unused_unwind_options.select do |alternative|
intersecting_requirements =
last_detail_for_current_unwind.all_requirements &
alternative.requirements_unwound_to_instead
next if intersecting_requirements.empty?
# Find the highest index unwind whilst looping through
current_detail = alternative if alternative > current_detail
alternative
end
# Add the current unwind options to the `unused_unwind_options` array.
# The "used" option will be filtered out during `unwind_for_conflict`.
state.unused_unwind_options += unwind_details.reject { |detail| detail.state_index == -1 }
# Update the requirements_unwound_to_instead on any relevant unused unwinds
relevant_unused_unwinds.each { |d| d.requirements_unwound_to_instead << current_detail.state_requirement }
unwind_details.each { |d| d.requirements_unwound_to_instead << current_detail.state_requirement }
current_detail
end Related methods
- Instance methods
- resolve
- Class methods
- new
- Private methods
-
activate_new_spec -
attempt_to_activate -
attempt_to_filter_existing_spec -
binding_requirement_in_set? -
binding_requirements_for_conflict -
build_details_for_unwind -
conflict_fixing_possibilities? -
create_conflict -
debug -
end_resolution -
filter_possibilities_after_unwind -
filter_possibilities_for_parent_unwind -
filter_possibilities_for_primary_unwind -
filtered_possibility_set -
find_state_for -
group_possibilities -
handle_missing_or_push_dependency_state -
indicate_progress -
initial_state -
locked_requirement_named -
locked_requirement_possibility_set -
parent_of -
possibilities_for_requirement -
possibility -
possibility_satisfies_requirements? -
process_topmost_state -
push_state_for_requirements -
raise_error_unless_state -
require_nested_dependencies_for -
requirement_for_existing_name -
requirement_tree_for -
requirement_trees -
resolve_activated_specs -
start_resolution -
state -
unwind_for_conflict -
unwind_options_for_requirements