diff --git a/.travis.yml b/.travis.yml index ed95933..9a29f41 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,11 @@ matrix: include: + - d: dmd-beta + env: [FRONTEND=2.071] - d: dmd + env: [FRONTEND=2.071] + - d: dmd-2.070.2 env: [FRONTEND=2.070] - d: dmd-2.069.2 env: [FRONTEND=2.069] diff --git a/source/dub/internal/vibecompat/data/json.d b/source/dub/internal/vibecompat/data/json.d index 16a24d3..c5bb7dd 100644 --- a/source/dub/internal/vibecompat/data/json.d +++ b/source/dub/internal/vibecompat/data/json.d @@ -25,8 +25,8 @@ import std.datetime; import std.exception; import std.format; -import std.string; import std.range; +import std.string : format; import std.traits; version = JsonLineNumbers; @@ -861,6 +861,8 @@ Json parseJson(R)(ref R range, int* line = null, string filename = null) if( is(R == string) ) { + import std.string : startsWith; + Json ret; enforceJson(!range.empty, "JSON string is empty.", filename, 0); @@ -957,6 +959,8 @@ */ Json parseJsonString(string str, string filename = null) { + import std.string : strip; + auto strcopy = str; int line = 0; auto ret = parseJson(strcopy, &line, filename); @@ -979,6 +983,8 @@ } unittest { + import std.string : endsWith; + try parseJsonString(`{"a": 1`); catch (Exception e) assert(e.msg.endsWith("Missing '}' before EOF.")); try parseJsonString(`{"a": 1 x`);