unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: 56441@debbugs.gnu.org
Subject: bug#56441: guix time-machine broken by profiles speed-up
Date: Fri, 08 Jul 2022 22:42:13 +0200	[thread overview]
Message-ID: <871quvtjyy.fsf_-_@gnu.org> (raw)
In-Reply-To: <87fsjbzxo5.fsf@elephly.net> (Ricardo Wurmus's message of "Fri, 08 Jul 2022 12:46:47 +0200")

Ricardo Wurmus <rekado@elephly.net> skribis:

> Attached is a patch that attempts to build the manifest in an inferior.
> This fails because manifest->gexp returns a gexp that we can’t get out
> of the inferior to pass to build-profile.

Thanks for sharing!  This sounded like the “right” approach, but there’s
a part that made me feel uneasy about it:

> +    (define (manifest-gexp)
> +      (pk 'man-gexp
> +          (if inferior-guix
> +              (let* ((inferior (open-inferior inferior-guix))
> +                     (result
> +                      ;; TODO: this doesn't work because we can't lift the
> +                      ;; gexp out of the inferior.
> +                      (inferior-eval `(begin
> +                                        (use-modules (guix profiles)
> +                                                     (guix derivations))
> +                                        ((@@ (guix profiles) manifest->gexp)
> +                                         (manifest
> +                                          (list
> +                                           ,@(map (lambda (entry)
> +                                                    `(manifest-entry
> +                                                       (name ,(manifest-entry-name entry))
> +                                                       (version ,(manifest-entry-version entry))
> +                                                       (output ,(manifest-entry-output entry))
> +                                                       (item (read-derivation-from-file
> +                                                              ,(derivation-file-name
> +                                                                (manifest-entry-item entry))))))
> +                                                  (manifest-entries manifest))))))

Here we have to rely on a larger part of the API: a subset of (guix
profiles) and (guix derivations).

Conversely, in (guix channels), the only assumption made about the API
implemented by the other Guix (which might be older or might be newer)
is the ‘generate-package-cache’ procedure.  It’s a small requirement, so
potentially easier to satisfy in future versions for a long time.


When dealing with these time travel issues, I feel we have difficult
choices to make.  It’s a bit of an unusual requirement that we have.

Ludo’.




  reply	other threads:[~2022-07-08 20:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-07 16:42 bug#56441: guix time-machine broken by profiles speed-up zimoun
2022-07-07 17:29 ` Ricardo Wurmus
2022-07-07 17:52   ` Ricardo Wurmus
2022-07-08  8:52     ` Ludovic Courtès
2022-07-08 10:36       ` Ludovic Courtès
2022-07-08 14:34         ` bug#56441: Time travel doesn't resist profile format changes zimoun
2022-07-08 16:13           ` Ludovic Courtès
2022-07-08 22:01         ` bug#56441: guix time-machine broken by profiles speed-up Ludovic Courtès
2022-07-08 10:46 ` bug#56441: Time travel doesn't resist profile format changes Ricardo Wurmus
2022-07-08 20:42   ` Ludovic Courtès [this message]
     [not found] ` <handler.56441.D56441.165731768325904.notifdone@debbugs.gnu.org>
2022-07-11  8:27   ` bug#56441: guix time-machine broken by profiles speed-up Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871quvtjyy.fsf_-_@gnu.org \
    --to=ludo@gnu.org \
    --cc=56441@debbugs.gnu.org \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).