summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-03-15 14:34:01 +0100
committerLudovic Courtès <ludo@gnu.org>2020-03-19 15:14:08 +0100
commitec0a8661728f915c21058076327b398ac5c38bbe (patch)
treef1f844345920a7e6f04ef133fbcc2d9dddb38e49
parentf06a26f5b594b1d1865a41facca0ea65a3837901 (diff)
inferior: Adjust to protocol (0 1).
* guix/inferior.scm (port->inferior): For protocol (0 x ...), where x >= 1, send the (() repl-version ...) form.
-rw-r--r--guix/inferior.scm9
1 files changed, 9 insertions, 0 deletions
diff --git a/guix/inferior.scm b/guix/inferior.scm
index 6b685ece30..ec8ff8ddbe 100644
--- a/guix/inferior.scm
+++ b/guix/inferior.scm
@@ -159,6 +159,15 @@ inferior."
(letrec ((result (inferior 'pipe pipe close (cons 0 rest)
(delay (%inferior-packages result))
(delay (%inferior-package-table result)))))
+
+ ;; For protocol (0 1) and later, send the protocol version we support.
+ (match rest
+ ((n _ ...)
+ (when (>= n 1)
+ (send-inferior-request '(() repl-version 0 1) result)))
+ (_
+ #t))
+
(inferior-eval '(use-modules (guix)) result)
(inferior-eval '(use-modules (gnu)) result)
(inferior-eval '(use-modules (ice-9 match)) result)