Subject: Re: bug#53034: [PATCH] shell: Cache profiles even when using package specs.
From: Ludovic Courtès <[email-masked]>
To: [email-masked]
Date: Tue, 11 Jan 2022 20:37:52 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

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

> This enables profile caching not just when '-m' or '-f' is used, but
> also when package specs are passed on the command line, as in:
>
>   guix shell -D guix git
>
> It also changes profile cache keys to include the system type, which was
> previously ignored.
>
> * guix/scripts/shell.scm (options-with-caching)[single-file-for-caching]:
> Remove.
> Call 'profile-cached-gc-root' instead; adjust to accept two values.
> (profile-cache-primary-key): New procedure.
> (profile-cache-key): Remove.
> (profile-file-cache-key, profile-spec-cache-key): New procedures.
> (profile-cached-gc-root): Rewrite to include functionality formally in
> 'single-file-for-caching', but extend to handle package specs.
> * gnu/packages.scm (cache-is-authoritative?): Export.
> * guix/transformations.scm (transformation-option-key?): New procedure.

Pushed as 0552dcb294bbfed76d7a495f5e368c53f20b852a.  I adjusted
doc/guix.texi, which I had forgotten to do in the patch I posted.

Please let me how caching works for you!

Ludo’.