Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip: experimental support for version ranges in unsat errors #28

Closed
wants to merge 2 commits into from

Conversation

aochagavia
Copy link
Contributor

@aochagavia aochagavia commented Jan 31, 2024

I won't have time to finish up this PR properly, but I'm leaving it here because at least part of it might be interesting. The second commit could probably be cherry-picked and merged without too much additional work.

Experimental support for version ranges

@wolfv was enthusiastic about the idea, but we didn't really reach a consensus about how the feature would exactly work. The first commit contains a working implementation that you could tweak further. Check out the insta snapshots of the commit to see how it affects error messages.

Proper unicode characters in error messages

This means we stop using |-- and start using ├─, and similar. There is some complexity associated to this change, because now we need to do some tracking to know which character we need (├─, └─ or ). The implementation is in the second commit, but there are a few TODOs to clean up the code. Check out the insta snapshots of the commit to see how it affects error messages.

---
The following packages are incompatible
├─ a >=2, <20 can be installed with any of the following options:
│ └─ a 19 | >=16, <=17 | >=9, <=14 | >=2, <=7
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was told that pubgrub has a implementation of a simplify algorithm for ranges like this (it would go and merge all the ranges that overlap so that the result would be the same range but expressed with fewer terms). I think in this case, it would be nice if it was simplified to >=2,<20 - although that is in fact what the "MatchSpec" above says ... so this thought might be futile anyways.

@baszalmstra
Copy link
Contributor

Closing this PR for now. We don't see an avenue forward for this as of yet.

@aochagavia aochagavia deleted the version-ranges branch September 30, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants