jhawthorn / pub_grub

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

Use `to_s` representation of min and max when displaying ranges and unions #22

Closed deivid-rodriguez closed 1 year ago

deivid-rodriguez commented 1 year ago

In Bundler, we consider "1.12.5" and "1.12.5-x86_64-linux" different for resolution purposes, but equal when representing versions in error messages and so on.

Using strict min and max equality for range string representation leads to same weird ranges reading like "< 1.12.5, > 1.12.5".

It seems best to use the equality of string representations of mix and max to decide whether to display "=" or "<, >" for representing ranges.

Similarly for version unions.

deivid-rodriguez commented 1 year ago

Bundler PR was released so merging to get in sync with the version that we vendor in Bundler.