Skip to content

Commit

Permalink
the smallest change to bring back pre-79 behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
Eh2406 committed Sep 6, 2024
1 parent 4b4b444 commit 341ec89
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 8 additions & 4 deletions src/internal/partial_solution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -485,12 +485,16 @@ impl<DP: DependencyProvider> PartialSolution<DP> {
.get(satisfier_package)
.expect("satisfier package not in incompat");

let start_term = accum_term.intersection(&incompat_term.negate());
let out = satisfier_pa.satisfier(satisfier_package, &start_term);

satisfied_map.insert(
satisfier_package,
satisfier_pa.satisfier(
satisfier_package,
&accum_term.intersection(&incompat_term.negate()),
),
if accum_term.subset_of(incompat_term) {
(None, 0, DecisionLevel(1))
} else {
out
},
);

// Finally, let's identify the decision level of that previous satisfier.
Expand Down
4 changes: 2 additions & 2 deletions tests/examples.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ fn confusing_with_lots_of_holes() {
};
assert_eq!(
&DefaultStringReporter::report(&derivation_tree),
r#"Because there is no available version for bar and foo 1 | 2 | 3 | 4 | 5 depends on bar, foo 1 | 2 | 3 | 4 | 5 is forbidden.
And because there is no version of foo in <1 | >1, <2 | >2, <3 | >3, <4 | >4, <5 | >5 and root 1 depends on foo, root 1 is forbidden."#
r#"Because foo 1 | 2 | 3 | 4 | 5 depends on bar and there is no version of foo in <1 | >1, <2 | >2, <3 | >3, <4 | >4, <5 | >5, foo depends on bar.
And because there is no available version for bar and root 1 depends on foo, root 1 is forbidden."#
);
derivation_tree.collapse_no_versions();
assert_eq!(
Expand Down

0 comments on commit 341ec89

Please sign in to comment.