Browse Source

vibed: upgrade to v0.9.5 (#7577)

Hiroki Noda 2 years ago
parent
commit
d74b2a9b56

+ 2 - 2
frameworks/D/vibed/dub.json

@@ -7,9 +7,9 @@
     "Sönke Ludwig"
   ],
   "dependencies": {
-    "vibe-d": "0.9.4",
+    "vibe-d": "0.9.5",
     "mir-random": "2.2.15",
-    "vibe-d:tls": "0.9.4"
+    "vibe-d:tls": "0.9.5"
   },
   "targetType": "executable",
   "sourcePaths": [],

+ 9 - 8
frameworks/D/vibed/dub.selections.json

@@ -3,23 +3,24 @@
 	"versions": {
 		"botan": "1.12.19",
 		"botan-math": "1.0.3",
-		"derelict-pq": "4.0.0-alpha.2",
+		"derelict-pq": "4.0.0",
 		"derelict-util": "3.0.0-beta.2",
-		"diet-ng": "1.8.0",
+		"diet-ng": "1.8.1",
 		"dpq2": "1.0.17",
-		"eventcore": "0.9.18",
+		"eventcore": "0.9.20",
 		"libasync": "0.8.6",
 		"memutils": "1.0.4",
-		"mir-algorithm": "3.10.91",
-		"mir-core": "1.1.83",
+		"mir-algorithm": "3.14.19",
+		"mir-core": "1.1.111",
 		"mir-linux-kernel": "1.0.1",
 		"mir-random": "2.2.15",
 		"money": "2.3.1",
-		"openssl": "1.1.6+1.0.1g",
+		"openssl": "3.2.2",
+		"silly": "1.1.1",
 		"stdx-allocator": "2.77.5",
 		"taggedalgebraic": "0.11.22",
-		"vibe-core": "1.21.0",
-		"vibe-d": "0.9.4",
+		"vibe-core": "1.22.4",
+		"vibe-d": "0.9.5",
 		"vibe-d-postgresql": "3.1.0-rc.1"
 	}
 }

+ 10 - 3
frameworks/D/vibed/source/mongodb.d

@@ -10,6 +10,7 @@ import mir.random.engine.xorshift : Xorshift;
 
 import std.conv : ConvException, to;
 import std.array;
+import std.exception : enforce;
 
 enum worldSize = 10000;
 
@@ -70,7 +71,9 @@ class WebInterface {
 	{
 		struct Q { int _id; }
 		auto query = Q(_uniformVariable(_gen));
-		auto w = WorldResponse(_worldCollection.findOne!World(query));
+		auto world = _worldCollection.findOne!World(query);
+		enforce(!world.isNull(), "expected world, found none.");
+		auto w = WorldResponse(world.get);
 		res.writeJsonBody(w, HTTPStatus.ok, "application/json");
 	}
 
@@ -91,7 +94,9 @@ class WebInterface {
 		foreach (ref w; data) {
 			static struct Q { int _id; }
 			auto query = Q(_uniformVariable(_gen));
-			w = WorldResponse(_worldCollection.findOne!World(query));
+			auto world = _worldCollection.findOne!World(query);
+			enforce(!world.isNull(), "expected world, found none.");
+			w = WorldResponse(world.get);
 		}
 
 		// write response as JSON
@@ -123,7 +128,9 @@ class WebInterface {
 		foreach (ref w; data) {
 			static struct Q { int _id; }
 			auto query = Q(_uniformVariable(_gen));
-			w = WorldResponse(_worldCollection.findOne!World(query));
+			auto world = _worldCollection.findOne!World(query);
+			enforce(!world.isNull(), "expected world, found none.");
+			w = WorldResponse(world.get);
 
 			// update random number
 			w.randomNumber = _uniformVariable(_gen);