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

When can the algorithm use `simplify` #162

Open Eh2406 opened 7 months ago

Eh2406 commented 7 months ago

Our implementation of range just gained a new simplify method (cc #156). It would not be too hard to make this a method on DependencyProvider and so available to the Solver. Unfortunately, if done naively it breaks important set properties we rely on. What are those properties? Why does it break them? We don't know.

Before we can merge a new method to DependencyProvider we need to be able to articulate what properties it must uphold. We also need to figure out where it is safe for us to use the new method.

Hopefully by simplifying internally complex VS's we can solve the performance problems found in #135

Eh2406 commented 7 months ago

Some obvious thoughts about when it is safe/efficient to call the new simplify.

I am hoping that we can solve all the real problems using 80/20 solutions like #163. If most of the large VS come from normal patterns that we can identify and merge then we may not need a general solution for identifying all cases where it's safe to simplify.

Eh2406 commented 5 months ago

Some more thoughts: