From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:53174) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jDWrs-0005A5-N5 for guix-patches@gnu.org; Sun, 15 Mar 2020 13:16:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jDWrq-0006ZW-Gc for guix-patches@gnu.org; Sun, 15 Mar 2020 13:16:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57688) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jDWrq-0006XT-30 for guix-patches@gnu.org; Sun, 15 Mar 2020 13:16:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jDWrp-00029W-Uv for guix-patches@gnu.org; Sun, 15 Mar 2020 13:16:01 -0400 Subject: [bug#40077] [PATCH 2/4] inferior: Adjust to protocol (0 1). Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Sun, 15 Mar 2020 18:15:05 +0100 Message-Id: <20200315171507.22910-2-ludo@gnu.org> In-Reply-To: <20200315171507.22910-1-ludo@gnu.org> References: <20200315171507.22910-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 40077@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= * 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