-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minimal example of DUB dependency clashes
This is a simple example of the dependency resolution failure described in dlang/dub#1732. Running `dub build` fails with the error: Unresolvable dependencies to package taggedalgebraic: eventcore 0.8.43 depends on taggedalgebraic >=0.10.12 <0.12.0-0 std_data_json 0.18.3 depends on taggedalgebraic ~>0.10.1 The reported failure in fact has an easily recognizable resolution, but for some reason DUB is unable to find it. It is not 100% clear if this is the real dependency clash or not, but it is interesting to note that if `dep2` (which has no dependencies of its own) is removed from the list of dependencies of the main project, the resolution failure also disappears.
- Loading branch information
0 parents
commit 701940d
Showing
6 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "dep1", | ||
|
||
"targetType": "sourceLibrary", | ||
|
||
"dependencies": { | ||
"std-experimental-xml": ">=0.1.7 <0.2.0", | ||
"unit-threaded:assertions": ">=0.8.0 <0.10.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module dep1; | ||
|
||
string foo () | ||
{ | ||
return "foo"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "dep2", | ||
"targetType": "sourceLibrary" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module dep1; | ||
|
||
string foo () | ||
{ | ||
return "foo"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "vibe-deps-failure", | ||
"authors": ["Joseph Wakeling"], | ||
"description": "Simple example of DUB dependency resolution failure", | ||
|
||
"dependencies": { | ||
"dep1": { "path": "dep1" }, | ||
"dep2": { "path": "dep2" }, | ||
"std_data_json": ">=0.18.3 <0.19.0", | ||
"pyd": ">=0.10.5 <0.11.0", | ||
"vibe-core": ">=1.6.0 <2.0.0", | ||
"vibe-d:redis": ">=0.8.4 <0.9.0", | ||
"vibe-d:tls": ">=0.8.4 <0.9.0" | ||
}, | ||
"subConfigurations": { | ||
"pyd": "python36", | ||
"vibe-d:tls": "openssl-1.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
void main () | ||
{ | ||
import dep1 : foo; | ||
import std.stdio : writefln; | ||
writefln!"Hello, I'm just a stub for %s"(foo()); | ||
} |