Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: continue when encountering unknown depencies #25

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions src/solver/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,19 +215,13 @@ impl<VS: VersionSet, N: PackageName + Display, D: DependencyProvider<VS, N>> Sol
// Exclusions are negative assertions, tracked outside of the watcher system
self.negative_assertions.push((solvable_id, clause_id));

// There might be a conflict now
let conflicts = if self.decision_tracker.assigned_value(solvable_id)
== Some(true)
{
vec![clause_id]
} else {
Vec::new()
};

// The new assertion should be kept in all cases (it is returned in the
// lhs of the tuple), and a conflicts should be reported if present (rhs
// of the tuple)
return Ok((vec![clause_id], conflicts));
new_clauses.push(clause_id);

if self.decision_tracker.assigned_value(solvable_id) == Some(true) {
conflicting_clauses.push(clause_id);
}

continue;
}
}
}
Expand Down