-
Notifications
You must be signed in to change notification settings - Fork 793
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 available versions to simplify unsat error reports #547
Conversation
136a57f
to
5ce943a
Compare
With astral-sh/pubgrub#12 this does not degrade error messages anymore. |
Ready for review but the PubGrub changes should be merged first. Additionally, we don't have a test case that's changed by this :) that is my next priority. |
Request me as a reviewer if ready :) |
#[error("{package} {version} depends on itself")] | ||
SelfDependency { | ||
/// Package whose dependencies we want. | ||
package: Box<PubGrubPackage>, | ||
/// Version of the package for which we want the dependencies. | ||
version: Box<PubGrubVersion>, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that is an error type in pubgrub, but fwiw we don't consider this an error (it's surprisingly popular in python packaging)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great it'd probably be good to remove it then
582b42b
to
f060641
Compare
Fix PubGrub commit
f060641
to
2a841c4
Compare
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 formatterWe can probably do something smarter than creating vectors to hold the versionsresolve
instead ofsolve
if feasible