Expose apis that allow implementing your own solver loop
In uv, we run our own solver loop (https://github.com/astral-sh/uv/blob/8596525d97e3e0d9b6981f7e122334bfc9f712c8/crates/uv-resolver/src/resolver/mod.rs#L317). This gives us async support, allows moving the solver into a thread, do advanced prefetching based on decisions, splitting resolutions on conflicting requirements for disjoint environments, etc.; overall we do it because we need that level of control with the complexity and performance requirements that uv has.
It would be great if pubgrub would expose a dedicated set of types and methods to allow users to implement their own solver loop if they so choose. This interface comes with caveats, most notably that you have to uphold pubgrub's invariants about the order of operations yourself.
It would be great if uv would expose a dedicated set of types and methods to allow users to implement their own solver loop if they so choose.
Do you mean "pubgrub" instead of "uv" here?
The tradeoff seems interesting indeed. The main downside I can see is the maintenance burden that it could create. If more users are encouraged to unroll everything on their own like uv did, and if they don’t share the same level of care that you guys have had, we could see a much higher rate of issues opened on this crate, which is more or less on "maintenance mode", since Jacob and I aren’t very active and only you guys are active here.
But aside from that human aspect, you have a good point, and a strong use case to back it up.
For context, this is the current difference in interfaces: https://github.com/pubgrub-rs/pubgrub/compare/dev...astral-sh:pubgrub:main
I don't worry too much about user questions, iirc @Eh2406 was concerned about the API stability of this much wider interface.