Bug 20083 – Dub subdependency conflicts should be expressed more clearly

Status
RESOLVED
Resolution
MOVED
Severity
enhancement
Priority
P1
Component
tools
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-07-25T12:10:12Z
Last change time
2021-01-09T10:50:25Z
Assigned to
No Owner
Creator
miguel.alex.arseneault

Comments

Comment #0 by miguel.alex.arseneault — 2019-07-25T12:10:12Z
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 by pro.mathias.lang — 2020-04-14T14:39:58Z
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 by pro.mathias.lang — 2021-01-09T10:50:25Z