Slide 29
Slide 29 text
ͳΜ͔ͩίʔυΛ͑Θ͔Γͦ͏Ͱ͢Ͷ !
/// Find all solutions for `constraints` with the results merged into the `assignment`.
///
/// - Parameters:
/// - constraints: The input list of constraints to solve.
/// - assignment: The assignment to merge the result into.
/// - allConstraints: An additional set of constraints on the viable solutions.
/// - allExclusions: A set of package assignments to exclude from consideration.
/// - Returns: A sequence of all valid satisfying assignment, in order of preference.
private func merge(
constraints: [Constraint],
into assignment: AssignmentSet,
subjectTo allConstraints: ConstraintSet,
excluding allExclusions: [Identifier: Set]
) -> AnySequence {
var allConstraints = allConstraints
if enablePrefetching {
// Ask all of these containers upfront to do async cloning.
for constraint in constraints {
provider.getContainer(for: constraint.identifier) { _ in }
}
}