pubgrub-rs / pubgrub

PubGrub version solving algorithm implemented in Rust
https://pubgrub-rs.github.io/pubgrub/pubgrub/
Mozilla Public License 2.0
365 stars 34 forks source link

Check the correctness of our errors in tests #132

Open Eh2406 opened 1 year ago

Eh2406 commented 1 year ago

PubGrub has good error messages, in fact that's one of its main selling points. When resolution fails you get a rich object with all the information to explain why that failure occurred. Specifically it is a derivation tree that proves that the requested resolution is impossible. Each node make some statement about a set of packages that cannot simultaneously be selected and points to two other nodes that when combined proof this note statement. The leaf nodes are statements provided to the solver by the dependency provider. The root node claims that "the requested package cannot be selected". If all of the base facts are true and all of the deductions are valid then this is a valid proof of unsatisfiedability of the requested resolution. But how can we verify that "if"?

Existing tests:

Upcoming tests:

What else could we be testing: