Skip to content

Commit

Permalink
Dependency: Change format for path-based dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Geod24 committed Jul 15, 2022
1 parent da2ca69 commit dd44365
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions source/dub/dependency.d
Original file line number Diff line number Diff line change
Expand Up @@ -229,15 +229,16 @@ struct Dependency {
if (!repository.empty) {
ret ~= repository.toString~"#";
}
ret ~= versionSpec;
if (path.empty)
ret ~= versionSpec;
if (optional) {
if (default_) ret ~= " (optional, default)";
else ret ~= " (optional)";
}

// NOTE Path is @system in vibe.d 0.7.x and in the compatibility layer
() @trusted {
if (!path.empty) ret ~= " @"~path.toNativeString();
if (!path.empty) ret ~= "@"~path.toNativeString();
} ();

return ret;
Expand Down
2 changes: 1 addition & 1 deletion test/expected-issue1037-output
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Unresolvable dependencies to package gitcompatibledubpackage:
b >=0.0.0 @DIR/b depends on gitcompatibledubpackage ~>1.0.2
b @DIR/b depends on gitcompatibledubpackage ~>1.0.2
issue1037-better-dependency-messages ~master depends on gitcompatibledubpackage 1.0.1

0 comments on commit dd44365

Please sign in to comment.