sarugaku / resolvelib

Resolve abstract dependencies into concrete ones
ISC License
138 stars 31 forks source link

Speed up resolution by approximating unsatisfied names #148

Closed notatallshaw closed 8 months ago

notatallshaw commented 8 months ago

Fixes https://github.com/sarugaku/resolvelib/issues/147

Creating as a draft PR because it currently causes a lot of test failures. I don't understand yet if that's because this approach is ultimately unsound or just that some of the assumptions about how resolvelib works are broken, but resolvelib still always finds a correct resolution. If anyone has time to assist in understanding these test failures or explaining what they mean that would help, but otherwise I will figure them out.

Using @pradyunsg's https://github.com/pradyunsg/pip-resolver-benchmarks I see a significant resolution time improve of ~5.5x in the pyrax_198 scenario.

notatallshaw commented 8 months ago

Closing, as implemented this isn't right.

I think it might be possible to salvage the optimization approach, I'm make another PR once/if I have one that passes the tests.