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

Show dedicated hint for --unsafe-first-match with PyTorch index #5510

Closed
charliermarsh opened this issue Jul 27, 2024 · 4 comments · Fixed by #7645
Closed

Show dedicated hint for --unsafe-first-match with PyTorch index #5510

charliermarsh opened this issue Jul 27, 2024 · 4 comments · Fixed by #7645
Assignees
Labels
error messages Messaging when something goes wrong

Comments

@charliermarsh
Copy link
Member

This is so common that we should special-case it for a list of packages (like requests): astral-sh/rye#1282 (comment)

@charliermarsh charliermarsh added the error messages Messaging when something goes wrong label Jul 27, 2024
@charliermarsh
Copy link
Member Author

@zanieb -- For this one, do you think it's sufficient to show this if: we fail to resolve (can't find a valid version), and the failing package came from the first index, i.e., there are more indexes remaining? Is that too noisy?

@zanieb
Copy link
Member

zanieb commented Sep 22, 2024

Yeah, I think the minimal idea is that if we have a NoVersions incompatibility, there are multiple indexes, and you're using first-match we should hint. This is so common that I don't mind it being noisy to start. I think we should implement this ASAP, I started looking into it but need to figure out what index information is available to the reporter and what we have to thread

I have a few improvements in mind but am not sure what information is available, e.g.:

  • Confirm that we didn't check all of the indexes for the package (i.e., as you suggested)
  • Confirm if the package is available on a subsequent index
  • Confirm if there is a version in the range available on a subsequent index

I think with these we could provide really helpful messages.

@charliermarsh
Copy link
Member Author

Confirm if the package is available on a subsequent index

This is the hard one, because with --first-match, we don't even check subsequent indexes. So we'd either have to (1) start checking subsequent indexes, or (2) make new network requests in the error reporter.

@zanieb
Copy link
Member

zanieb commented Sep 22, 2024

I figured that might be the case, but we can try to solve that later.

I think it'd be okay to have a low-priority pool checking the subsequent indexes in the background then finish the checks if needed for a no-solution error? 🤷‍♀️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error messages Messaging when something goes wrong
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants