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 /examples | |
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 'examples')
0 files changed, 0 insertions, 0 deletions