THRIFT-4478: Thrift will not build with dlang 2.078 or later (#1559)
* THRIFT-4478 Thrift will not build with dlang 2.078 or later
This fixes build errors and deprecation warnings on dmd v2.080.0.
* THRIFT-4478: Update ubuntu-artful docker build image to use DMD 2.080.0
* THRIFT-4478 Fix build failure for nonblocking
* THRIFT-4478: update readme files
diff --git a/lib/d/test/client_pool_test.d b/lib/d/test/client_pool_test.d
index 85bcb29..52207d9 100644
--- a/lib/d/test/client_pool_test.d
+++ b/lib/d/test/client_pool_test.d
@@ -409,8 +409,8 @@
)();
Thread.sleep(dur!"msecs"(20));
auto resultTuple = partialResult.finishGet();
- enforce(resultTuple._0 == ports[0 .. 2]);
- enforce(equal(map!"a.port"(cast(TestServiceException[])resultTuple._1),
+ enforce(resultTuple[0] == ports[0 .. 2]);
+ enforce(equal(map!"a.port"(cast(TestServiceException[])resultTuple[1]),
ports[3 .. $ - 1]));
}
}
diff --git a/lib/d/test/serialization_benchmark.d b/lib/d/test/serialization_benchmark.d
index 35515c8..40d0480 100644
--- a/lib/d/test/serialization_benchmark.d
+++ b/lib/d/test/serialization_benchmark.d
@@ -13,7 +13,7 @@
*/
module serialization_benchmark;
-import std.datetime : AutoStart, StopWatch;
+import std.datetime.stopwatch : AutoStart, StopWatch;
import std.math : PI;
import std.stdio;
import thrift.protocol.binary;
@@ -46,7 +46,7 @@
}
sw.stop();
- auto msecs = sw.peek().msecs;
+ auto msecs = sw.peek().total!"msecs";
writefln("Write: %s ms (%s kHz)", msecs, ITERATIONS / msecs);
}
@@ -64,7 +64,7 @@
}
sw.stop();
- auto msecs = sw.peek().msecs;
+ auto msecs = sw.peek().total!"msecs";
writefln(" Read: %s ms (%s kHz)", msecs, ITERATIONS / msecs);
}
}