class

Molinillo::Resolver::Resolution::UnwindDetails(R, S)

Inherits Comparable < Reference < Object

Details of the state to unwind to when a conflict occurs, and the cause of the unwind @attr [Integer] state_index the index of the state to unwind to @attr [Object] state_requirement the requirement of the state we're unwinding to @attr [Array] requirement_tree for the requirement we're relaxing @attr [Array] conflicting_requirements the requirements that combined to cause the conflict @attr [Array] requirement_trees for the conflict @attr [Array] requirements_unwound_to_instead array of unwind requirements that were chosen over this unwind

Constructors

new(state_index : Int32, state_requirement : R | Nil, requirement_tree : Array(R), conflicting_requirements : Array(R), requirement_trees : Array(Array(R)), requirements_unwound_to_instead : Array(R | Nil))
Source

Instance methods

<=>(other)

We compare UnwindDetails when choosing which state to unwind to. If two options have the same state_index we prefer the one most removed from a requirement that caused the conflict. Both options would unwind to the same state, but a grandparent option will filter out fewer of its possibilities after doing so - where a state is both a parent and a grandparent to requirements that have caused a conflict this is the correct behaviour. @param [UnwindDetail] other UnwindDetail to be compared @return [Integer] integer specifying ordering

Source
all_requirements

@return [Array] array of all the requirements that led to the need for this unwind

Source
conflicting_requirements
Source
requirement_tree
Source
requirement_trees
Source
requirements_unwound_to_instead
Source
reversed_requirement_tree_index

@return [Integer] index of state requirement in reversed requirement tree (the conflicting requirement itself will be at position 0)

Source
state_index
Source
state_requirement
Source
sub_dependencies_to_avoid

@return [Array] array of sub-dependencies to avoid when choosing a new possibility for the state we've unwound to. Only relevant for non-primary unwinds

Source
unwinding_to_primary_requirement?

@return [Boolean] where the requirement of the state we're unwinding to directly caused the conflict. Note: in this case, it is impossible for the state we're unwinding to to be a parent of any of the other conflicting requirements (or we would have circularity)

Source