D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 20083 - Dub subdependency conflicts should be expressed more clearly
Summary: Dub subdependency conflicts should be expressed more clearly
Status: RESOLVED MOVED
Alias: None
Product: D
Classification: Unclassified
Component: tools (show other issues)
Version: D2
Hardware: All All
: P1 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-25 12:10 UTC by miguel.alex.arseneault
Modified: 2021-01-09 10:50 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description miguel.alex.arseneault 2019-07-25 12:10:12 UTC
I recently tried building an example project that included both derelict-sdl2 and derelict-gl3, and dub was unable to resolve their dependencies because they didn't match (gl3 wanted >=1.0.3 and sdl2 wanted ~>2.0.4.) Two problems with this:

First, dub should be able to resolve this dependency. >=1.0.3 and ~>2.0.4 should be able to be resolved to the same version of derelict-util, but for some reason that doesn't happen.

Second, the error message given was
"Unresolvable dependencies to package derelict-util:
  derelict-gl3 1.0.24 depends on derelict-util >=1.0.3
  derelict-sdl2 2.1.4 depends on derelict-util ~>2.0.4".
This error message doesn't make it clear that the problem is a version conflict, and doesn't inform the user about how to resolve the problem. A better error would be something along the lines of "Dependencies to package derelict-util could not be resolved because the following packages depend on incompatible versions of it: [LIST OF PACKAGES HERE].

I ended up having to change the dub.json of derelict-gl3 to resolve this issue.
Comment 1 Mathias LANG 2020-04-14 14:39:58 UTC
Do you have the exact dub.json you were using ? By the way I recommend you open this bug report at https://github.com/dlang/dub/
Comment 2 Mathias LANG 2021-01-09 10:50:25 UTC
Moving to https://github.com/dlang/dub/issues/1065