diff --git a/source/dub/dependency.d b/source/dub/dependency.d index b0d7db1..46ff206 100644 --- a/source/dub/dependency.d +++ b/source/dub/dependency.d @@ -229,7 +229,8 @@ if (!repository.empty) { ret ~= repository.toString~"#"; } - ret ~= versionSpec; + if (path.empty) + ret ~= versionSpec; if (optional) { if (default_) ret ~= " (optional, default)"; else ret ~= " (optional)"; @@ -237,7 +238,7 @@ // 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; diff --git a/source/dub/internal/vibecompat/inet/path.d b/source/dub/internal/vibecompat/inet/path.d index 3e844a3..3baf10d 100644 --- a/source/dub/internal/vibecompat/inet/path.d +++ b/source/dub/internal/vibecompat/inet/path.d @@ -193,7 +193,7 @@ @property size_t length() const scope @safe pure nothrow @nogc { return m_nodes.length; } /// True if the path contains no entries - @property bool empty() const { return m_nodes.length == 0; } + @property bool empty() const scope @safe pure nothrow @nogc { return m_nodes.length == 0; } /// Determines if the path ends with a slash (i.e. is a directory) @property bool endsWithSlash() const { return m_endsWithSlash; } diff --git a/test/expected-issue1037-output b/test/expected-issue1037-output index e03b110..06fdbb1 100644 --- a/test/expected-issue1037-output +++ b/test/expected-issue1037-output @@ -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