[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#40077] [PATCH 2/4] inferior: Adjust to protocol (0 1).
From: |
Ludovic Courtès |
Subject: |
[bug#40077] [PATCH 2/4] inferior: Adjust to protocol (0 1). |
Date: |
Sun, 15 Mar 2020 18:15:05 +0100 |
* guix/inferior.scm (port->inferior): For protocol (0 x ...), where x >= 1,
send the (() repl-version ...) form.
---
guix/inferior.scm | 9 +++++++++
1 file changed, 9 insertions(+)
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)
--
2.25.1