Commit 1af3c087 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

Switch to Guile-JSON 4.x.

* environment.scm <propagated-inputs>: Update to GUILE-JSON-4.
* jupyter/json.scm: Use (json parser) instead of (json).  Explain the
difference with what Guile-JSON provides.
* guix-jupyter-kernel.scm: Use (json parser) and (json builder) instead
of (json).
* guix/jupyter/kernel.scm: Likewise.
* guix/jupyter/proxy.scm: Likewise.
* jupyter/guile.scm: Likewise.
* jupyter/kernels.scm: Likewise.
* jupyter/messages.scm: Likewise.
* jupyter/servers.scm: Likewise.
* tests/guile.scm: Likewise.
* tests/kernels.scm: Likewise.
* tests/servers.scm: Likewise.
* configure.ac: Check for (json parser) rather than JSON.
parent d41d8c5f
......@@ -38,9 +38,9 @@ if test "x$have_guile_simple_zmq" != "xyes"; then
fi
dnl Check dor Guile-Json.
GUILE_MODULE_AVAILABLE([have_guile_json], [(json)])
GUILE_MODULE_AVAILABLE([have_guile_json], [(json parser)])
if test "x$have_guile_json" != "xyes"; then
AC_MSG_ERROR([Guile-Json is missing; please install it.])
AC_MSG_ERROR([Guile-JSON is missing; please install it.])
fi
dnl Check for Guile-Gcrypt >= 0.2.0.
......
......@@ -91,7 +91,7 @@
`(("guix" ,guix)
("guile" ,@(assoc-ref (package-native-inputs guix) "guile"))))
(propagated-inputs
`(("guile-json" ,guile-json-3)
`(("guile-json" ,guile-json-4)
("guile-simple-zmq" ,guile-simple-zmq)
("guile-gcrypt" ,guile-gcrypt)))
......
......@@ -16,7 +16,8 @@
;;; You should have received a copy of the GNU General Public License
;;; along with this program. If not, see <https://www.gnu.org/licenses/>.
(use-modules (json)
(use-modules (json parser)
(json builder)
(simple-zmq)
(git) ;for 'git-error-message'
(srfi srfi-1)
......
;;; Guix-kernel -- Guix kernel for Jupyter
;;; Copyright (C) 2019 Ludovic Courtès <ludovic.courtes@inria.fr>
;;; Copyright (C) 2019, 2021 Ludovic Courtès <ludovic.courtes@inria.fr>
;;;
;;; This program is free software: you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
......@@ -29,7 +29,8 @@
#:use-module ((gnu build linux-container) #:select (%namespaces))
#:use-module (srfi srfi-1)
#:use-module (ice-9 match)
#:use-module (json)
#:use-module (json parser)
#:use-module (json builder)
#:export (%language-info
%kernel-info-reply
......
;;; Guix-kernel -- Guix kernel for Jupyter
;;; Copyright (C) 2019 Ludovic Courtès <ludovic.courtes@inria.fr>
;;; Copyright (C) 2019, 2021 Ludovic Courtès <ludovic.courtes@inria.fr>
;;;
;;; This program is free software: you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
......@@ -19,7 +19,8 @@
#:use-module (jupyter messages)
#:use-module (jupyter kernels)
#:use-module (jupyter servers)
#:use-module (json)
#:use-module (json parser)
#:use-module (json builder)
#:use-module (gcrypt base16)
#:use-module ((guix build utils) #:select (delete-file-recursively))
#:use-module (srfi srfi-1)
......
;;; Guix-kernel -- Guix kernel for Jupyter
;;; Copyright (C) 2019 Ludovic Courtès <ludovic.courtes@inria.fr>
;;; Copyright (C) 2019, 2021 Ludovic Courtès <ludovic.courtes@inria.fr>
;;;
;;; This program is free software: you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
......@@ -18,7 +18,8 @@
#:use-module (jupyter messages)
#:use-module (jupyter kernels)
#:use-module (jupyter servers)
#:use-module (json)
#:use-module (json parser)
#:use-module (json builder)
#:use-module (simple-zmq)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
......
;;; Guix-kernel -- Guix kernel for Jupyter
;;; Copyright (C) 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright (C) 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This program is free software: you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
......@@ -15,7 +15,7 @@
;;; along with this program. If not, see <https://www.gnu.org/licenses/>.
(define-module (jupyter json)
#:use-module (json)
#:use-module (json parser)
#:use-module (guix records)
#:export (json
<=>
......@@ -23,7 +23,14 @@
;;; Commentary:
;;;
;;; Helpers to map JSON objects to SRFI-9 records. Taken from (guix swh).
;;; Helpers to map JSON objects to records. Taken from (guix swh).
;;; Guile-JSON 4.x includes a variant of this code. The difference is that
;;; this module builds upon the 'define-record-type*' feature of (guix
;;; records), whereas Guile-JSON builds on top of SRFI-9.
;;;
;;; Consequently, the syntax is a bit different; in particular, this variant
;;; uses the 'json' keyword to distinguish parameters of the JSON mapping
;;; from other properties of record fields, such as default values.
;;;
;;; Code:
......
;;; Guix-kernel -- Guix kernel for Jupyter
;;; Copyright (C) 2018, 2019 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr>
;;; Copyright (C) 2018, 2019 Ludovic Courtès <ludovic.courtes@inria.fr>
;;; Copyright (C) 2018, 2019, 2021 Ludovic Courtès <ludovic.courtes@inria.fr>
;;;
;;; This program is free software: you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
......@@ -25,7 +25,8 @@
#:use-module (ice-9 match)
#:use-module (ice-9 ftw)
#:use-module (simple-zmq)
#:use-module (json)
#:use-module (json parser)
#:use-module (json builder)
#:use-module (rnrs bytevectors)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-9)
......
;;; Guix-kernel -- Guix kernel for Jupyter
;;; Copyright (C) 2018 Evgeny Panfilov <epanfilov@gmail.com>
;;; Copyright (C) 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright (C) 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This program is free software: you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
......@@ -17,7 +17,8 @@
(define-module (jupyter messages)
#:use-module (simple-zmq)
#:use-module (json)
#:use-module (json parser)
#:use-module (json builder)
#:use-module (jupyter json)
#:use-module (gcrypt mac)
#:use-module (gcrypt base16)
......
......@@ -19,7 +19,7 @@
#:use-module (jupyter kernels)
#:use-module (jupyter messages)
#:use-module (simple-zmq)
#:use-module (json)
#:use-module (json parser)
#:use-module (rnrs bytevectors)
#:use-module (ice-9 match)
#:use-module (ice-9 vlist)
......
;;; Guix-kernel -- Guix kernel for Jupyter
;;; Copyright (C) 2019 Inria
;;; Copyright (C) 2019, 2021 Inria
;;;
;;; This program is free software: you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
......@@ -20,7 +20,8 @@
#:use-module (jupyter servers)
#:use-module (jupyter guile)
#:use-module (simple-zmq)
#:use-module (json)
#:use-module (json parser)
#:use-module (json builder)
#:use-module (rnrs bytevectors)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
......
;;; Guix-kernel -- Guix kernel for Jupyter
;;; Copyright (C) 2019 Inria
;;; Copyright (C) 2019, 2021 Inria
;;;
;;; This program is free software: you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
......@@ -18,7 +18,8 @@
#:use-module (jupyter kernels)
#:use-module (jupyter messages)
#:use-module (simple-zmq)
#:use-module (json)
#:use-module (json parser)
#:use-module (json builder)
#:use-module (rnrs bytevectors)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
......
;;; Guix-kernel -- Guix kernel for Jupyter
;;; Copyright (C) 2019 Inria
;;; Copyright (C) 2019, 2021 Inria
;;;
;;; This program is free software: you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
......@@ -19,7 +19,8 @@
#:use-module (jupyter messages)
#:use-module (jupyter servers)
#:use-module (simple-zmq)
#:use-module (json)
#:use-module (json parser)
#:use-module (json builder)
#:use-module (rnrs bytevectors)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment