-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
New resolver error message is confusing if a package has inconsistent dependencies #8495
Comments
Agreed this needs a different message (but also agreed it shouldn't block beta). One question I would want to consider up front is whether the information available from a |
I was actually thinking maybe we could get away with simply not showing a package name multiple times. |
Hmm, maybe - nice bit of lateral thinking :-) Let's see what @nlhkabu thinks of that idea. |
Sorry - I must have missed this. Adding this ticket to the list of items I need to address. |
+1 on @uranusjr's solution of only showing the package name once. We could change the initial line to something like: "ERROR: Cannot install testpkg because of conflicting dependencies..." |
I agree this needs a different message, but specifically I think we need to consider the use case that the user is just trying to install a dependency that they have no control over. As is, the suggested fixes would make no sense and would be out of the users' control For example, if I'm just trying to install https://pypi.org/project/diamond-dependency/, I get:
But if I am not a maintainer/owner of that package, and I don't know much about dependency specifications, the two proposed fixes would make little to no sense to me. Even if I did know something about what that means, it would be entirely out of my control. The actual "fix" would be to reach out to the maintainer of the package, which seems related to #8492. |
Coming to this with fresh eyes, I'm wondering if what we should do here is drop the suggestions for how to fix this from the printed message. Of course, that'll mean we only provide users information for diagnosing the issues with dependency conflicts from the documentation URL. OTOH, "advanced"/"expert" users would have a reasonable idea of what to do when they see this error, and non-expert users would not be presented with non-actionable suggestions without additional context. |
Does pip have the ability to determine if a conflict is coming from a top-level (user-supplied) dependency or a sub-dependency? |
It does. Is the proposal to show different suggestions in different situations? What should the different messages be? |
Well, if it's two top-level dependencies, it's within the user's control and the message above makes sense. If either one or both are sub-dependencies, it's out of the users control, but we could maybe guide them towards communicating with the project's maintainers instead. |
Per conversation today, the next step here is to develop concrete wording for the error message change. It would be nice to have this in time for pip 20.3 but it's also okay to finish and merge it in a patch/point release after the 20.3 release. |
Cross referencing #8492 as it seems these two issues can be resolved by a single PR that involves rewriting the error message :) |
Extending/improving my proposal from #8492: Both packages top level:
At least one package top level, at least one package deeper in dep tree:
Both packages deep in dep tree:
Package conflicting with itself
Not sure this all makes sense? May also be a bit too verbose? Would appreciate your feedback on this @di, @pradyunsg, @pfmoore, @uranusjr. |
Note: if we update the error messages here, we will also need to update the documentation |
These 4 messages are clear to me @nlhkabu. They do require knowledge of concepts, language but that's another point. Do we have time to send this to a number of UX panel participants? Asking them "if you saw these messages, what is your understanding of them?" In short: To me they are satifactory. If we can test them with 8-9 users, then even better. |
I think in the “Both packages top level” it is still possible the conflicts cannot be resolved by loosening |
Updates after feedback from @pradyunsg and @uranusjr Note: It is not currently possible to display the dependency tree, but pip does know the parent of the conflicting package (or if no parent exists) Accordingly, we should update the messages to be: Conflict caused by dependencies
Conflict includes top level requirement
Package conflicting with itself
|
New issue opened to look at adding dep tree to error message: #9036 |
Per our meeting in late October we'd like to have this in the 20.3 release. |
We had another discussion in early November and decided that it might be okay to release 20.3 without fixing this. @pradyunsg you've now had more time to consider this since then, so use your judgment to retain or change this issue's blocker status. |
I have re-reviewed this issue and #8884 which is related. Given how much we've had to delay the release of 20.3 to fix issues and reduce disruption to users, and given the work still left to do before we can release it, I've decided that fixing this particular non-optimal error message is something that can wait until after the 20.3 release. |
Given this package:
This produces the following error message:
testpkg
shows up twice in the firstERROR:
message, which looks confusing. It is “correct” thattestpkg
is conflicting with itself, but we probably need to produce a message that makes more sense to humans.cc @nlhkabu @pfmoore
Note: I don’t think this should block beta since this kind of packages is already broken, and likely to be relatively rare. And the message is not that bad either; everything after the first line still makes sense in this situation.
The text was updated successfully, but these errors were encountered: