diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-08-17 18:48:34 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-08-17 18:48:34 +0200 |
commit | c6f4fa5f577e4752d845fa3ce17c68fcd2079904 (patch) | |
tree | c2ab97710592dca9e968ee51a6def3b477087a48 /README | |
parent | 92bdf3cda0e366149aa2cb27cd44961f23ea95e6 (diff) | |
download | cuirass-c6f4fa5f577e4752d845fa3ce17c68fcd2079904.tar cuirass-c6f4fa5f577e4752d845fa3ce17c68fcd2079904.tar.gz |
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.
Diffstat (limited to 'README')
-rw-r--r-- | README | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |