Skip to content

Commit 5a30d17

Browse files
committed
conflicting_activations should always apply to cx
This is a small assert, but it scuttled a pub/priv deps PR, so lets do it all the time.
1 parent 1a1ba80 commit 5a30d17

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/cargo/core/resolver/mod.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,12 @@ fn find_candidate(
983983
.any(|c| *c == ConflictReason::PublicDependency)
984984
{
985985
// we dont have abnormal situations. So we can ask `cx` for how far back we need to go.
986-
cx.is_conflicting(Some(parent.package_id()), conflicting_activations)
986+
let a = cx.is_conflicting(Some(parent.package_id()), conflicting_activations);
987+
// If the `conflicting_activations` does not apply to `cx`, then something went very wrong
988+
// in building it. But we will just fall back to laboriously trying all possibilities witch
989+
// will give us the correct answer so only `assert` if there is a developer to debug it.
990+
debug_assert!(a.is_some());
991+
a
987992
} else {
988993
None
989994
};

0 commit comments

Comments
 (0)