repl: Allow clients to send their protocol version.
authorLudovic Courtès <ludo@gnu.org>
Sun, 15 Mar 2020 13:27:09 +0000 (14:27 +0100)
committerLudovic Courtès <ludo@gnu.org>
Thu, 19 Mar 2020 14:14:08 +0000 (15:14 +0100)
commitf06a26f5b594b1d1865a41facca0ea65a3837901
treef6d0f1391b5769a6188efe75a93e6f4a450a3d42
parentac75bd010260f6a722e1723b35992b04fd79d44c
repl: Allow clients to send their protocol version.

* guix/repl.scm (send-repl-response): Add #:version.
(machine-repl): Make 'loop' an internal define with a
'version' parameter.  Pass VERSION to 'send-repl-response'.
Send (0 1) as the protocol version.
If the first element read from INPUT matches (() repl-version _ ...),
interpret it as the client's protocol version.
guix/repl.scm