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

Simplify version sets in error reports #8

Closed
wants to merge 10 commits into from

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Nov 29, 2023

Uses pubgrub-rs#156 to allow the default error reporter's messages to be simplified.

@zanieb
Copy link
Member Author

zanieb commented Nov 30, 2023

Another approach is that we can simplify the version sets during formatting using #10

@zanieb zanieb force-pushed the main branch 2 times, most recently from c4ffd26 to a1d584a Compare December 1, 2023 19:28
zanieb added a commit to astral-sh/uv that referenced this pull request Dec 1, 2023
Uses astral-sh/pubgrub#10 to drastically simplify
our reporter implementation. This will allow us to make use of upstream
improvements to the reporter e.g.
astral-sh/pubgrub#8 without multiple duplicative
pull requests.
@zanieb
Copy link
Member Author

zanieb commented Dec 6, 2023

I think it's much easier to use the new formatter type for this.

@zanieb zanieb closed this Dec 6, 2023
zanieb added a commit to astral-sh/uv that referenced this pull request Dec 12, 2023
Uses pubgrub-rs/pubgrub#156 to consolidate
version ranges in error reports using the actual available versions for
each package.

Alternative to astral-sh/pubgrub#8 which implements
this behavior as a method in the `Reporter` — here it's implemented in
our custom report formatter (#521) instead which requires no upstream
changes.

Requires astral-sh/pubgrub#11 to only retrieve the
versions for packages that will be used in the report.

This is a work in progress. Some things to do:
- ~We may want to allow lazy retrieval of the version maps from the
formatter~
- [x] We should probably create a separate error type for no solution
instead of mixing them with other resolve errors
- ~We can probably do something smarter than creating vectors to hold
the versions~
- [x] This degrades error messages when a single version is not
available, we'll need to special case that
- [x] It seems safer to coerce the error type in `resolve` instead of
`solve` if feasible
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.

1 participant