jhawthorn / pub_grub

🍔 A ruby implementation of the PubGrub CDCL-based version solver
MIT License
151 stars 11 forks source link

PubGrub sometimes fails to resolve conflicts and hangs infinitely #30

Open deivid-rodriguez opened 1 year ago

deivid-rodriguez commented 1 year ago

I created an integration spec that Molinillo passes, but makes PubGrub hang.

I also created a PR that slightly improves the situation by detecting the infinite loop and throwing an error.

As per the culprit, it seems to me that sometimes PubGrub is backtracking too much, but not fully sure, I need to investigate more and learn PubGrub internals well because when I integrated it into Bundler I didn't have to dig this deep 😅.

I'm opening an issue hoping @jhawthorn will know better what's going on! :)

mschoenlaub commented 1 year ago

Hey @jhawthorn,

I have some interest in SAT and at least some understanding of the PubGrub internals. However, the missing piece for me to reproduce (and maybe even fix the issue) is that I have no idea how the linked integration spec repo works.

:D

Would you care to briefly outline what I'd need to do to get a test for this particular case, based on the integration spec into this repo here?

Thanks :)

mschoenlaub commented 1 year ago

Ah, nevermind. Figured it out :)