Skip to content

Commit 1533574

Browse files
committed
the smallest change to bring back pre-79 behavior
1 parent 51d38dd commit 1533574

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/internal/partial_solution.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -485,12 +485,16 @@ impl<DP: DependencyProvider> PartialSolution<DP> {
485485
.get(satisfier_package)
486486
.expect("satisfier package not in incompat");
487487

488+
let start_term = accum_term.intersection(&incompat_term.negate());
489+
let out = satisfier_pa.satisfier(satisfier_package, &start_term);
490+
488491
satisfied_map.insert(
489492
satisfier_package,
490-
satisfier_pa.satisfier(
491-
satisfier_package,
492-
&accum_term.intersection(&incompat_term.negate()),
493-
),
493+
if accum_term.subset_of(incompat_term) {
494+
(None, 0, DecisionLevel(1))
495+
} else {
496+
out
497+
},
494498
);
495499

496500
// Finally, let's identify the decision level of that previous satisfier.

tests/examples.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ fn confusing_with_lots_of_holes() {
237237
};
238238
assert_eq!(
239239
&DefaultStringReporter::report(&derivation_tree),
240-
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.
241-
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."#
240+
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.
241+
And because there is no available version for bar and root 1 depends on foo, root 1 is forbidden."#
242242
);
243243
derivation_tree.collapse_no_versions();
244244
assert_eq!(

0 commit comments

Comments
 (0)