diff --git a/source/dub/dependency.d b/source/dub/dependency.d index 48bf9bf..d8daee7 100644 --- a/source/dub/dependency.d +++ b/source/dub/dependency.d @@ -241,6 +241,7 @@ bool matches(string vers) const { return matches(Version(vers)); } bool matches(const(Version) v) const { return matches(v); } bool matches(ref const(Version) v) const { + if (this == ANY) return true; //logDebug(" try match: %s with: %s", v, this); // Master only matches master if(m_versA.isBranch) { @@ -259,6 +260,8 @@ /// Merges to versions Dependency merge(ref const(Dependency) o) const { + if (this == ANY) return o; + if (o == ANY) return this; if (!this.valid || !o.valid) return INVALID; if (m_versA.isBranch != o.m_versA.isBranch) return INVALID; if (m_versB.isBranch != o.m_versB.isBranch) return INVALID; diff --git a/test/path-subpackage-ref/dub.json b/test/path-subpackage-ref/dub.json index f82433d..378acee 100644 --- a/test/path-subpackage-ref/dub.json +++ b/test/path-subpackage-ref/dub.json @@ -1,7 +1,7 @@ { "name": "test", "dependencies": { - "test:subpack": "~master" + "test:subpack": "*" }, "subPackages": [ "subpack/" diff --git a/test/subpackage-ref/dub.json b/test/subpackage-ref/dub.json index 73148a5..0f4f3cd 100644 --- a/test/subpackage-ref/dub.json +++ b/test/subpackage-ref/dub.json @@ -1,7 +1,7 @@ { "name": "test", "dependencies": { - "test:subpack": "~master" + "test:subpack": "*" }, "subPackages": [ {