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

Special-case resolver error messages in uv add #11538

Open
zanieb opened this issue Feb 15, 2025 · 0 comments
Open

Special-case resolver error messages in uv add #11538

zanieb opened this issue Feb 15, 2025 · 0 comments
Labels
error messages Messaging when something goes wrong

Comments

@zanieb
Copy link
Member

zanieb commented Feb 15, 2025

This example from https://www.bitecode.dev/p/a-year-of-uv-pros-cons-and-should is chosen to demonstrate our resolver error messages, but honestly I think it's not great :)

❯ uv add httpie==2
  × No solution found when resolving dependencies for split (python_full_version >= '3.10'):
  ╰─▶ Because httpie==2.0.0 depends on requests>=2.22.0 and your project depends on httpie==2, we can conclude that your project depends on requests>=2.22.0.
      And because your project depends on requests==1, we can conclude that your project's requirements are unsatisfiable.
  help: If you want to add the package regardless of the failed resolution, provide the `--frozen` flag to skip locking and syncing.

Because httpie==2.0.0 depends on requests>=2.22.0 and your project depends on httpie==2, we can conclude that your project depends on requests>=2.22.0.

Our project doesn't depend on httpie==2 yet, we're trying to add it. Under the hood, we add it as a dependency and solve — but we could special case the added packages .

It'd also be nice to avoid repeating a clause with mixed representations of the version "httpie==2.0.0" and "httpie==2". This might be hard though.

@zanieb zanieb added the error messages Messaging when something goes wrong label Feb 15, 2025
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

No branches or pull requests

1 participant