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

error messages expose a dependency relationship between a and a{marker} #5618

Closed
BurntSushi opened this issue Jul 30, 2024 · 5 comments · Fixed by #5738
Closed

error messages expose a dependency relationship between a and a{marker} #5618

BurntSushi opened this issue Jul 30, 2024 · 5 comments · Fixed by #5738
Assignees
Labels
bug Something isn't working error messages Messaging when something goes wrong resolver Related to the package resolver

Comments

@BurntSushi
Copy link
Member

For example:

  x No solution found when resolving dependencies:
  `-> Because fork-overlapping-markers-a{python_version == '3.12'}==1.0.0 depends on fork-overlapping-markers-a==1.0.0 and fork-overlapping-markers==0.0.0 depends on fork-overlapping-markers-a{python_version == '3.12'}==1.0.0, we
      can conclude that fork-overlapping-markers==0.0.0 and fork-overlapping-markers-a{python_version > '3.12'}==2.0.0 are incompatible.
      And because fork-overlapping-markers==0.0.0 depends on fork-overlapping-markers-a{python_version > '3.12'}==2.0.0, we can conclude that fork-overlapping-markers==0.0.0 cannot be used.
      And because only fork-overlapping-markers==0.0.0 is available and project==0.1.0 depends on fork-overlapping-markers, we can conclude that project==0.1.0 cannot be used.
      And because only project==0.1.0 is available and you require project, we can conclude that the requirements are unsatisfiable.

Specifically:

Because fork-overlapping-markers-a{python_version == '3.12'}==1.0.0 depends on fork-overlapping-markers-a==1.0.0

If one is familiar with internals, this makes sense, because we have specific "marker" dependencies and "normal" dependencies, and they have a dependency relationship with one another. But from an end user perspective, they probably should be treated as just one package.

@zanieb
Copy link
Member

zanieb commented Jul 30, 2024

Seems clearer than #5612

@BurntSushi
Copy link
Member Author

Haha whoops! Totally missed that one.

@charliermarsh
Copy link
Member

Does anyone have an example that produces this?

@BurntSushi
Copy link
Member Author

I think pretty much anything that doesn't produce a resolution and involves markers will do:

$ cat /tmp/requirements.in
iniconfig
iniconfig==2.0.0 ; python_version > '3.12'
iniconfig==1.0.0 ; python_version == '3.12'

$ uv pip compile /tmp/requirements.in --universal
  x No solution found when resolving dependencies:
  `-> Because iniconfig{python_version > '3.12'}==2.0.0 depends on iniconfig==2.0.0 and you require iniconfig{python_version > '3.12'}==2.0.0, we can conclude that your requirements and iniconfig{python_version == '3.12'}==1.0.0
      are incompatible.
      And because you require iniconfig{python_version == '3.12'}==1.0.0, we can conclude that the requirements are unsatisfiable.

Although I suppose this will stop producing an error once overlapping marker support lands. :P

@charliermarsh
Copy link
Member

Awesome thank you :) I was having trouble getting this exact form to appear.

@charliermarsh charliermarsh self-assigned this Aug 2, 2024
charliermarsh added a commit that referenced this issue Aug 2, 2024
## Summary

If _both_ nodes in the derivation tree are proxies, we need to remove
the _entire_ node. So, the function now returns an `Option<Tree>`
instead of taking `&mut Tree`.

Closes #5618.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working error messages Messaging when something goes wrong resolver Related to the package resolver
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants