PartialSolution
The partial solution is a constantly updated solution used throughout the dependency resolution process, tracking know assignments.
PartialSolution.swift:20struct PartialSolution
Citizens in PackageGraph
Type members
Instance members
var assignments: [Assignment]
All known assignments.
var decisionLevel: Int
The current decision level.
var decisions: [DependencyResolutionNode : Version]
All known decisions.
var undecided: [Term]
A list of all packages that have been assigned, but are not yet satisfied.
func backtrack(toDecisionLevel: Int
) Backtrack to a specific decision level by dropping all assignments with a decision level which is greater.
func decide(DependencyResolutionNode, at: Version
) Create a new decision assignment and add it to the partial solution’s list of known assignments.
func derive(Term, cause: Incompatibility
) Create a new derivation assignment and add it to the partial solution’s list of known assignments.
func satisfier(for: Term
) throws -> Assignment Returns the first Assignment in this solution such that the list of assignments up to and including that entry satisfies term.
Show implementation details (2)
Hide implementation details
var _negative: [DependencyResolutionNode : Term]
Union of all negative assignments for a package.
var _positive: OrderedCollections.OrderedDictionary<DependencyResolutionNode, Term>
The intersection of all positive assignments for each package, minus any negative assignments that refer to that package.