diff --git a/source/dub/compilers/dmd.d b/source/dub/compilers/dmd.d index 051e122..fd5b73f 100644 --- a/source/dub/compilers/dmd.d +++ b/source/dub/compilers/dmd.d @@ -217,7 +217,7 @@ case TargetType.executable: if (platform.platform.canFind("windows")) return settings.targetName ~ ".exe"; - else return settings.targetName; + else return settings.targetName.idup; case TargetType.library: case TargetType.staticLibrary: if (platform.platform.canFind("windows")) diff --git a/source/dub/compilers/gdc.d b/source/dub/compilers/gdc.d index eb753d8..71f4257 100644 --- a/source/dub/compilers/gdc.d +++ b/source/dub/compilers/gdc.d @@ -163,7 +163,7 @@ case TargetType.executable: if (platform.platform.canFind("windows")) return settings.targetName ~ ".exe"; - else return settings.targetName; + else return settings.targetName.idup; case TargetType.library: case TargetType.staticLibrary: return "lib" ~ settings.targetName ~ ".a"; diff --git a/source/dub/compilers/ldc.d b/source/dub/compilers/ldc.d index 7e77d0e..da0cdff 100644 --- a/source/dub/compilers/ldc.d +++ b/source/dub/compilers/ldc.d @@ -184,7 +184,7 @@ return settings.targetName ~ ".exe"; else if (p.canFind("wasm")) return settings.targetName ~ ".wasm"; - else return settings.targetName; + else return settings.targetName.idup; case TargetType.library: case TargetType.staticLibrary: if (p.canFind("windows") && !p.canFind("mingw")) diff --git a/source/dub/dependency.d b/source/dub/dependency.d index fe94470..da551b5 100644 --- a/source/dub/dependency.d +++ b/source/dub/dependency.d @@ -373,7 +373,7 @@ These methods are suitable for equality comparisons, as well as for using `Dependency` as a key in hash or tree maps. */ - bool opEquals(in Dependency o) + bool opEquals(const Dependency o) const { // TODO(mdondorff): Check if not comparing the path is correct for all clients. return o.m_inclusiveA == m_inclusiveA && o.m_inclusiveB == m_inclusiveB @@ -382,7 +382,7 @@ } /// ditto - int opCmp(in Dependency o) + int opCmp(const Dependency o) const { if (m_inclusiveA != o.m_inclusiveA) return m_inclusiveA < o.m_inclusiveA ? -1 : 1; if (m_inclusiveB != o.m_inclusiveB) return m_inclusiveB < o.m_inclusiveB ? -1 : 1; @@ -762,7 +762,7 @@ return compareVersions(m_version, other.m_version); } /// ditto - int opCmp(in Version other) const { return opCmp(other); } + int opCmp(const Version other) const { return opCmp(other); } /// Returns the string representation of the version/branch. string toString() const { return m_version; } diff --git a/source/dub/internal/vibecompat/core/file.d b/source/dub/internal/vibecompat/core/file.d index 26321d4..f48176b 100644 --- a/source/dub/internal/vibecompat/core/file.d +++ b/source/dub/internal/vibecompat/core/file.d @@ -28,8 +28,8 @@ @safe: std.stdio.File file; - void put(in ubyte[] bytes) @trusted { file.rawWrite(bytes); } - void put(in char[] str) { put(cast(const(ubyte)[])str); } + void put(scope const ubyte[] bytes) @trusted { file.rawWrite(bytes); } + void put(scope const char[] str) { put(cast(const(ubyte)[])str); } void put(char ch) @trusted { put((&ch)[0 .. 1]); } void put(dchar ch) { char[4] chars; put(chars[0 .. encode(chars, ch)]); } diff --git a/travis-ci.sh b/travis-ci.sh index 6297a31..6ea4a1f 100755 --- a/travis-ci.sh +++ b/travis-ci.sh @@ -10,6 +10,10 @@ dub test --compiler=${DC} -c library-nonet fi +if [ "$FRONTEND" \> 2.087.z ]; then + DFLAGS='-preview=dip1000 -w -g -debug' DMD="$(command -v $DMD)" ./build.sh +fi + function clean() { # Hard reset of the DUB local folder is necessary as some tests # currently don't properly clean themselves