Skip to content

Commit

Permalink
feat: add requirement to debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
baszalmstra committed Jan 26, 2024
1 parent 53a14d5 commit caa7d2b
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/solver/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -608,15 +608,16 @@ impl<VS: VersionSet, N: PackageName + Display, D: DependencyProvider<VS, N>> Sol
}
}

if let Some((count, (candidate, solvable_id, _clause_id))) = best_decision {
if let Some((count, (candidate, _solvable_id, clause_id))) = best_decision {
tracing::info!(
"deciding to assign {} with {} candidates (required by {})",
"deciding to assign {}, ({:?}, {} possible candidates)",
candidate.display(self.pool()),
self.clauses[clause_id].debug(self.pool()),
count,
solvable_id.display(self.pool())
);

Check warning on line 617 in src/solver/mod.rs

View workflow job for this annotation

GitHub Actions / Format and Lint

Diff in /home/runner/work/resolvo/resolvo/src/solver/mod.rs
}


// Could not find a requirement that needs satisfying.
best_decision.map(|d| d.1)
}
Expand Down Expand Up @@ -644,6 +645,7 @@ impl<VS: VersionSet, N: PackageName + Display, D: DependencyProvider<VS, N>> Sol
tracing::info!(

Check warning on line 645 in src/solver/mod.rs

View workflow job for this annotation

GitHub Actions / Format and Lint

Diff in /home/runner/work/resolvo/resolvo/src/solver/mod.rs
"╤══ Install {} at level {level} (required by {})",
solvable.display(self.pool()),

required_by.display(self.pool()),
);

Expand All @@ -669,10 +671,10 @@ impl<VS: VersionSet, N: PackageName + Display, D: DependencyProvider<VS, N>> Sol
return Err(UnsolvableOrCancelled::Cancelled(value));

Check warning on line 671 in src/solver/mod.rs

View workflow job for this annotation

GitHub Actions / Format and Lint

Diff in /home/runner/work/resolvo/resolvo/src/solver/mod.rs
}
Err(PropagationError::Conflict(
conflicting_solvable,
attempted_value,
conflicting_clause,
)) => {
conflicting_solvable,
attempted_value,
conflicting_clause,
)) => {
level = self.learn_from_conflict(
level,
conflicting_solvable,
Expand Down

0 comments on commit caa7d2b

Please sign in to comment.