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

Use a custom pubgrub report formatter #521

Merged
merged 4 commits into from
Dec 1, 2023
Merged

Use a custom pubgrub report formatter #521

merged 4 commits into from
Dec 1, 2023

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Nov 30, 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 zanieb marked this pull request as ready for review December 1, 2023 19:36
@zanieb zanieb merged commit 2a8544d into main Dec 1, 2023
3 checks passed
@zanieb zanieb deleted the zb/pubgrub-formatter branch December 1, 2023 19:36
zanieb added a commit 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.

2 participants