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

nonsensical unresolvable dependencies message #2695

Closed
WebFreak001 opened this issue Sep 11, 2023 · 4 comments · Fixed by #2960
Closed

nonsensical unresolvable dependencies message #2695

WebFreak001 opened this issue Sep 11, 2023 · 4 comments · Fixed by #2960

Comments

@WebFreak001
Copy link
Member

in my project:

   Upgrading project in /home/webfreak/dev/serve-d/
Error Unresolvable dependencies to package automem:
  cachetools 0.4.1 depends on automem >=0.0.0
  concurrency 5.0.3 depends on automem 0.6.4

while obviously automem 0.6.4 would satisfy the printed constraints.

When trying to dub upgrade a package with the following recipe contents:

dependency "cachetools" version="0.4.1"
dependency "concurrency" version="5.0.3"

the error messages get even worse:

   Upgrading project in /tmp/a/
Error Unresolvable dependencies to package unit-threaded:
  automem 0.6.4 depends on unit-threaded >=0.0.0
  automem 0.6.4 depends on unit-threaded >=0.0.0
  automem 0.6.4 depends on unit-threaded >=0.0.0
  cachetools 0.4.1 depends on unit-threaded ~>0
  concurrency 5.0.3 depends on unit-threaded >=0.0.0
  concurrency 5.0.3 depends on unit-threaded >=0.0.0
  concurrency 5.0.3 depends on unit-threaded >=0.0.0
  ikod-containers 0.0.22 depends on unit-threaded >=0.0.0
@Geod24
Copy link
Member

Geod24 commented Dec 28, 2023

@WebFreak001 : That would be a good target for a unittest with the new system. Would you like to have a go at it ?

@vladimmi
Copy link

Almost a year later it's still an issue. Same, dub upgrade with serve-d:

Error Unresolvable dependencies to package libdparse:
  libddoc 0.8.0 depends on libdparse >=0.13.0 <1.0.0
  serve-d:workspace-d ~master depends on libdparse ~>0.23.0

Without even "0.0.0" stuff above it somehow fails.

@grillo-delmal
Copy link
Contributor

I also stumbled with this problem

Error Unresolvable dependencies to package mir-linux-kernel:
  mir-random 2.2.19 depends on mir-linux-kernel >=1.0.0 <1.3.0
  vibe-d:crypto 0.9.8 depends on mir-linux-kernel ~>1.0.0

But I found what the problem source is. This problem triggers if a dependency can be resolved with a higher version that it's incompatible with the dependency of a library that still has not been resolved. This means that 3 things have to happen at the same time.

  1. 2 libraries need to have the same dependency
  2. A library version of the dependency needs to exist that can resolve one of them but is too high for the other one
  3. The one that can get resolved with a higher version must be resolved first by dub

@grillo-delmal
Copy link
Contributor

grillo-delmal commented Aug 18, 2024

Here is a minimal set of files to reproduce the problem

I wrote a reproduction test case at #2959 :)

grillo-delmal added a commit to grillo-delmal/dub that referenced this issue Aug 18, 2024
grillo-delmal added a commit to grillo-delmal/dub that referenced this issue Aug 18, 2024
grillo-delmal added a commit to grillo-delmal/dub that referenced this issue Sep 5, 2024
grillo-delmal added a commit to grillo-delmal/dub that referenced this issue Sep 17, 2024
grillo-delmal added a commit to grillo-delmal/dub that referenced this issue Sep 23, 2024
grillo-delmal added a commit to grillo-delmal/dub that referenced this issue Sep 23, 2024
Geod24 pushed a commit that referenced this issue Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants