From c6f4fa5f577e4752d845fa3ce17c68fcd2079904 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 17 Aug 2019 18:48:34 +0200 Subject: Switch to Guile-JSON 3.x. Guile-JSON 3.x is incompatible with Guile-JSON 1.x, which we relied on until now: it maps JSON dictionaries to alists (instead of hash tables), and JSON arrays to vectors (instead of lists). This commit is about adjusting all the existing code to this new mapping. * src/cuirass/http.scm (evaluation->json-object): New procedure. (handle-builds-request): Pass the result through 'list->vector'. (handle-builds-search-request): Likewise. (url-handler): Likewise for /jobsets, /specifications, /api/evaluations, and /build. For /api/evaluations, use 'evaluation->json-object'. * src/cuirass/utils.scm (object->json-scm): Add 'vector?' case. * tests/http.scm (hash-table-keys, hash-table=?): Remove. (evaluations-query-result): Use vectors for JSON arrays. ("object->json-string"): Expects alists instead of hash tables. ("/build/1"): Use 'lset=' instead of 'hash-table=?'. ("/api/latestbuilds?nr=1&jobset=guix"): Likewise, and expect alists instead of hash tables. ("/api/latestbuilds?nr=1&jobset=gnu"): Likewise. ("/api/evaluations?nr=1"): Likewise. * README: Mention Guile-JSON 3.x. --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README') diff --git a/README b/README index 98824cf..58200f6 100644 --- a/README +++ b/README @@ -9,7 +9,7 @@ Cuirass currently depends on the following packages: - GNU Guile 2.0.9 or later - GNU Guix (and all its development dependencies) - GNU Make - - Guile-JSON + - Guile-JSON 3.x - Guile-SQLite3 - Guile-Git - Fibers -- cgit v1.2.3