Skip to content

Commit a2d2c65

Browse files
njsmithEh2406
authored andcommitted
docs: more detailed msg in "cant happen" branch of satisfier (#103)
Example: thread 'main' panicked at 'internal error: entered unreachable code: while processing package trio: accum_term = 0.19 isn't a subset of incompat_term = 0.19.0, which means the last assignment should have been a decision, but instead it was a derivation. This shouldn't be possible! (Maybe your Version ordering is broken?)', /home/njs/src/pubgrub/src/internal/partial_solution.rs:411:17 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Fixes: gh-102
1 parent dabc20e commit a2d2c65

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/internal/partial_solution.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,16 @@ impl<P: Package, V: Version> PackageAssignments<P, V> {
407407
self.highest_decision_level,
408408
),
409409
AssignmentsIntersection::Derivations(_) => {
410-
panic!("This must be a decision")
410+
unreachable!(
411+
concat!(
412+
"while processing package {}: ",
413+
"accum_term = {} isn't a subset of incompat_term = {}, ",
414+
"which means the last assignment should have been a decision, ",
415+
"but instead it was a derivation. This shouldn't be possible! ",
416+
"(Maybe your Version ordering is broken?)"
417+
),
418+
package, accum_term, incompat_term
419+
)
411420
}
412421
}
413422
}

0 commit comments

Comments
 (0)