guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#38754] [PATCH 2/2] scripts: lint: Set the %link-checker-store-conne


From: Christopher Baines
Subject: [bug#38754] [PATCH 2/2] scripts: lint: Set the %link-checker-store-connection parameter.
Date: Mon, 30 Dec 2019 23:34:21 +0000
User-agent: mu4e 1.2.0; emacs 26.3

Ludovic Courtès <address@hidden> writes:

> Christopher Baines <address@hidden> skribis:
>
>> +    (with-store store
>> +      (parameterize
>> +          ((%lint-checker-store-connection store))
>
> Actually it means that now ‘guix lint’ systematically connects to the
> daemon.

I guess that's the effect, were you meaning this would make a better
message in the commit?

> I wonder if we could arrange to open the connection lazily, and to
> somehow carry state across linter invocations.  Perhaps
> ‘check-derivation’ should be monadic, with a field in <checker>
> indicating that.  Sounds complicated though.
>
> Thoughts?

I did wonder if the code could somehow transparently be made more
efficient. Quite often database clients manage a pool of connections,
and when you perform a database operation, a connection from the pool is
checked out, and then returned once you're finished. But as you say,
this could be complicated. I think parameters can be set with
connections, and I'm not quiet sure what the interface should be.

I also did think about somehow passing the store connection in to the
lint checker more explicitly, but I'm not sure how to generalise that.

At least to me, a parameter to store the connection in seemed like a
simple if inelegant approach. I'm quite happy to look in to other
approaches though if you have thoughts on what might be good.

Thanks,

Chris

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]