pubgrub-rs / pubgrub

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

External::NotRoot never constructed. #130

Open Eh2406 opened 1 year ago

Eh2406 commented 1 year ago

Looking at some converge data it looks like we never hit

https://github.com/pubgrub-rs/pubgrub/blob/cd91684f733e0e1d3e4fe558e6614844159a6919/src/internal/incompatibility.rs#L197-L199

This is because conflict_resolution loops until is_terminal is true

https://github.com/pubgrub-rs/pubgrub/blob/cd91684f733e0e1d3e4fe558e6614844159a6919/src/internal/incompatibility.rs#L146-L148

That is to say that we stop when we have a proof that the root package cannot be built, but do not include the last flourish of the proof that "we are required to build the root package because that's what we were asked to build". If I remember reading the original blog post correctly skipping this piece of mostly redundant information was one of the recommendations, so we could decide that this is a feature and not a bug. If we do then the next breaking release should probably remove that type from the reporting infrastructure.