From: "Ludovic Courtès" <ludo@gnu.org>
To: 40077@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>
Subject: [bug#40077] [PATCH 2/4] inferior: Adjust to protocol (0 1).
Date: Sun, 15 Mar 2020 18:15:05 +0100 [thread overview]
Message-ID: <20200315171507.22910-2-ludo@gnu.org> (raw)
In-Reply-To: <20200315171507.22910-1-ludo@gnu.org>
* 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
next prev parent reply other threads:[~2020-03-15 17:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-15 17:00 [bug#40077] [PATCH 0/4] Inferior provide stack traces along with exceptions Ludovic Courtès
2020-03-15 17:15 ` [bug#40077] [PATCH 1/4] repl: Allow clients to send their protocol version Ludovic Courtès
2020-03-15 17:15 ` Ludovic Courtès [this message]
2020-03-15 17:15 ` [bug#40077] [PATCH 3/4] repl: Return stack traces along with exceptions Ludovic Courtès
2020-03-15 17:15 ` [bug#40077] [PATCH 4/4] inferior: '&inferior-exception' includes a stack trace Ludovic Courtès
2020-03-19 14:15 ` bug#40077: [PATCH 0/4] Inferior provide stack traces along with exceptions Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200315171507.22910-2-ludo@gnu.org \
--to=ludo@gnu.org \
--cc=40077@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).