Subject: Re: [bug#34638] [PATCH v2 3/4] inferior: Add a shared-directory field to <inferior>

From: Ludovic Courtès <[email-masked]>
Date: Thu, 26 Mar 2020 10:30:57 +0100

Christopher Baines <[email-masked]> skribis:

> ---
>  guix/inferior.scm | 25 ++++++++++++++-----------
>  1 file changed, 14 insertions(+), 11 deletions(-)

Commit log please.  :-)

> +  (pid              inferior-pid)
> +  (socket           inferior-socket)
> +  (close            inferior-close-socket)       ;procedure
> +  (shared-directory inferior-shared-directory)

Please add a margin comment like “#f | directory”.

> -(define* (port->inferior pipe #:optional (close close-port))
> +(define* (port->inferior pipe shared-directory #:optional (close close-port))
>    "Given PIPE, an input/output port, return an inferior that talks over PIPE.
>  PIPE is closed with CLOSE when 'close-inferior' is called on the returned
>  inferior."

Make ‘shared-directory’ a keyword argument?

(Otherwise there’s a user in (guix ssh) that needs to be updated.)

>           ((client . address)
>            (proxy client (store-connection-socket store))))
>         (close-port socket)
> -       (read-inferior-response inferior)))))
> +       (read-inferior-response inferior)))
> +   #:base-directory (inferior-shared-directory inferior)))

What if ‘inferior-shared-directory’ returns #f?

Otherwise LGTM.

Ludo’.