Subject: Re: [bug#45409] [PATCH v3 3/3] guix: Split (guix substitutes) from (guix scripts substitute).

From: Christopher Baines <[email-masked]>
Date: Sat, 16 Jan 2021 14:18:41 +0000

Ludovic Courtès <[email-masked]> writes:

>> I think it's possible to separate it out if some of the error handling
>> is pushed down in to the http procedures, and if when they get an error
>> indicating the connection is unusable, they close the port.
>
> Ideally the (web …) modules would do that (that’s what you mean, right?)
> but then we’d have to wait for Guile proper to implement these things.

Well, I'm unsure, all I'm trying to do at the moment is push the
connection handling down in to http-multiple-get [1].

1: https://issues.guix.info/45409#22

While thinking about this just now, I think there's the possibility of
connection caching causing issues in process-substitution. I'm guessing
the exceptions could occur anywhere from in http-fetch where it calls
http-get, to back in process-substitution where it finishes reading from
the port (I'm unsure where, I loose track of where the port is used).

There was a little bit more error handling previously, as the use of
fetch was wrapped in with-cached-connection, but given that the response
body hasn't been read by this point, I don't think the previous state
was very safe either.

>> I've pushed some rough commits for this to this branch:
>>
>>   https://git.cbaines.net/guix/log/?h=prepare-to-move-guix-scripts-substitute-code
>>
>> I'm still struggling with the tests, currently make check hangs, I think
>> on the challenge tests, and I don't currently have a plan to work out
>> why the test is hanging.
>
> Overall the approach LGTM.
>
> How about first getting (guix narinfo) in ‘master’ (the bits we agreed
> on), and then tackling the rest so that it’s less daunting?

I've pushed the (guix narinfo) addition now, with the patch that changed
the unauthorized substitute handling.

> Also, I’d like to get the zstd patches in.  :-)

I've rebased on master, tweaked the commit messages, and send a set of
v4 patches and while they don't create the (guix substitutes) module, I
think they unpick the bits I'd like to move out from the code doing the
connection caching.

Thanks,

Chris