-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Improve the message for "Resolution Conflict" errors #8394
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
Conversation
Here's a nasty edge case that the current code does not handle at all well (based on the issue in #8131): If we have a local directory "pkg" containing the source for "pkg 0.1.0" and the user runs
Problems with this:
More work to do here... Interestingly, we didn't have any sort of test for this case. I've added one as the first stage of fixing the issues 🙂 |
Converting this to a draft so we don't accidentally merge it. |
Regarding the |
I'm pretty sure getting any closer to "what the user typed" than an absolute path is going to be far more work than the improvement in the message would justify. If the UX people find, in their research, that it is worth that effort, we can iterate on it later. I'm going to stick with absolute path for now. (Even that likely needs a new method on the |
If we’re adding a method, would it feel more comfortable to have a |
Yeah, that sounds like a nice idea :-) |
OK, I think I've fixed that case. |
return "{} {} (from {})".format( | ||
self.name, | ||
self.version, | ||
self.link.file_path |
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.
Does this work for remote links?
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.
OK, I guess that's another test to add :-)
Thanks.
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 added a fix, but couldn't work out a reasonable way to add a test. Suggestions welcome :-)
Hello! I am an automated bot and I have noticed that this pull request is not currently able to be merged. If you are able to either merge the |
7c332b4
to
1f4b538
Compare
1f4b538
to
868ba81
Compare
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.
One thought about how the cached packages/links look, rest seems OK to me.
return "{} {} (from {})".format( | ||
self.name, | ||
self.version, | ||
self.link.file_path if self.link.is_file else self.link |
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.
How does this look for cached paths?
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'll try it tomorrow, but from my recollection "annoyingly long" ;-)
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.
Can we use the original link w/ (cached)
in the name in that case?
OK to do this in a follow up, if you file an issue to aggregate all the call sites that print req.link
.
OK, I've opened #8463 for the follow-up work requested by @pradyunsg. Merging this now, as it's clearly better than what we currently have. We can easily make any further improvements in follow-up PRs. |
Fixes #8377
@nlhkabu @ei8fdb comments appreciated 🙂