unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 64746@debbugs.gnu.org
Cc: "Josselin Poiret" <dev@jpoiret.xyz>,
	"Tobias Geerinckx-Rice" <me@tobias.gr>,
	"Simon Tournier" <zimon.toutoune@gmail.com>,
	"Mathieu Othacehe" <othacehe@gnu.org>,
	"Ludovic Courtès" <ludo@gnu.org>,
	"Christopher Baines" <mail@cbaines.net>,
	"Ricardo Wurmus" <rekado@elephly.net>
Subject: [bug#64746] [PATCH 2/2] scripts: time-machine: Error when attempting to visit too old commits.
Date: Fri, 21 Jul 2023 22:00:18 -0400	[thread overview]
Message-ID: <87lef8hfil.fsf_-_@gmail.com> (raw)
In-Reply-To: <a058a4de3330a6f9cf41456e0781c3865dff0553.1689823648.git.maxim.cournoyer@gmail.com> (Maxim Cournoyer's message of "Thu, 20 Jul 2023 12:34:01 -0400")

Hello,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

> * doc/guix.texi (Invoking guix time-machine): Document limitation.
> * guix/scripts/time-machine.scm (%oldest-possible-commit): New variable.
> (guix-time-machine): Raise an error when the channel commit is too old.
>
> Suggested-by: Simon Tournier <zimon.toutoune@gmail.com>
> ---
>  doc/guix.texi                 |  6 ++++++
>  guix/scripts/time-machine.scm | 23 ++++++++++++++++++++++-
>  2 files changed, 28 insertions(+), 1 deletion(-)
>
> diff --git a/doc/guix.texi b/doc/guix.texi
> index 1d8ebcd72f..30fef813c0 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -5056,6 +5056,12 @@ Invoking guix time-machine
>  large number of packages; the result is cached though and subsequent
>  commands targeting the same commit are almost instantaneous.
>  
> +Due to @command{guix time-machine} relying on the ``inferiors''
> +mechanism (@pxref{Inferiors}), the oldest commit it can travel to is
> +commit @samp{2ca299caf} (``Add (guix inferior) and (guix scripts
> +repl).''), dated July 10@sup{th}, 2018.  An error is returned when
> +attempting to navigate to older commits.
> +
>  @quotation Note
>  The history of Guix is immutable and @command{guix time-machine}
>  provides the exact same software as they are in a specific Guix
> diff --git a/guix/scripts/time-machine.scm b/guix/scripts/time-machine.scm
> index d7c71ef705..36a40a1538 100644
> --- a/guix/scripts/time-machine.scm
> +++ b/guix/scripts/time-machine.scm
> @@ -2,6 +2,7 @@
>  ;;; Copyright © 2019 Konrad Hinsen <konrad.hinsen@fastmail.net>
>  ;;; Copyright © 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
>  ;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
> +;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -19,13 +20,15 @@
>  ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
>  
>  (define-module (guix scripts time-machine)
> +  #:use-module (guix channels)
> +  #:use-module (guix diagnostics)
>    #:use-module (guix ui)
>    #:use-module (guix scripts)
>    #:use-module (guix inferior)
>    #:use-module (guix store)
>    #:use-module (guix status)
>    #:use-module ((guix git)
> -                #:select (with-git-error-handling))
> +                #:select (update-cached-checkout with-git-error-handling))
>    #:use-module ((guix utils)
>                  #:select (%current-system))
>    #:use-module ((guix scripts pull)
> @@ -38,9 +41,16 @@ (define-module (guix scripts time-machine)
>    #:use-module (srfi srfi-1)
>    #:use-module (srfi srfi-11)
>    #:use-module (srfi srfi-26)
> +  #:use-module (srfi srfi-34)
>    #:use-module (srfi srfi-37)
> +  #:use-module (srfi srfi-71)
>    #:export (guix-time-machine))
>  
> +;;; The commit introducing the 'inferiors' mechanism; it is the oldest commit
> +;;; that can be travelled to.
> +(define %oldest-possible-commit
> +  "2ca299caf64489f4e1e665ec1158fb0309b0b565")

I just tried travelling to that assumed oldest commit (because it
corresponds to the introduction of the inferiors mechanism), but it
fails like:

--8<---------------cut here---------------start------------->8---
Computing Guix derivation for 'x86_64-linux'...  Backtrace:
-           5 (primitive-load "/gnu/store/b70mihsj9xx0xxp6izliqb5vm4…")
In ice-9/eval.scm:
    155:9  4 (_ _)
    159:9  3 (_ #(#(#(#(#(#(#(#(#(#(#(…) …) …) …) …) …) …) …) …) …) …))
   173:47  2 (_ #(#(#(#(#(#(#(#(#(#(#(…) …) …) …) …) …) …) …) …) …) …))
In ./guix/self.scm:
    932:4  1 (guix-derivation "/gnu/store/yfn2s94i5bvwr7j7r6xcnivwg…" …)
    903:2  0 (guile-for-build "3.0")

./guix/self.scm:903:2: In procedure guile-for-build:
Throw to key `match-error' with args `("match" "no matching pattern" "3.0")'.
Backtrace:
In ice-9/boot-9.scm:
  1752:10 19 (with-exception-handler _ _ #:unwind? _ # _)
In guix/store.scm:
   659:37 18 (thunk)
In guix/status.scm:
    839:4 17 (call-with-status-report _ _)
In guix/store.scm:
   1298:8 16 (call-with-build-handler #<procedure 7ff1daabfd20 at g…> …)
In guix/monads.scm:
    576:2 15 (run-with-store #<store-connection 256.99 7ff1dab842d0> …)
In guix/inferior.scm:
    927:8 14 (_ _)
In guix/channels.scm:
    982:2 13 (_ _)
    924:2 12 (_ _)
In guix/store.scm:
   1883:0 11 (_ _)
   1996:8 10 (_ _)
In guix/channels.scm:
   675:14  9 (_ #<store-connection 256.99 7ff1dab842d0>)
In guix/monads.scm:
    576:2  8 (run-with-store #<store-connection 256.99 7ff1dab842d0> …)
In guix/store.scm:
   1298:8  7 (call-with-build-handler _ _)
   1298:8  6 (call-with-build-handler #<procedure 7ff1db8108b8 at g…> …)
In guix/channels.scm:
   690:14  5 (_)
In guix/monads.scm:
    576:2  4 (run-with-store #<store-connection 256.99 7ff1dab842d0> …)
In ice-9/eval.scm:
   191:27  3 (_ #(#(#<directory (build-self) 7ff1da984aa0> #<pr…>) …))
In ice-9/boot-9.scm:
   2007:7  2 (error _ . _)
  1685:16  1 (raise-exception _ #:continuable? _)
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
invalid build result (#<derivation /gnu/store/rj2g4x23lqyaq16471qm94xp90slxp3h-compute-guix-derivation.drv => /gnu/store/b70mihsj9xx0xxp6izliqb5vm462yifl-compute-guix-derivation 7ff1d8b55000> "")
--8<---------------cut here---------------end--------------->8---

Is this a bug or expected?

-- 
Thanks,
Maxim




  reply	other threads:[~2023-07-22  2:01 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1689823648.git.maxim.cournoyer@gmail.com>
2023-07-20 16:34 ` [bug#64746] [PATCH 2/2] scripts: time-machine: Error when attempting to visit too old commits Maxim Cournoyer
2023-07-22  2:00   ` Maxim Cournoyer [this message]
2023-08-08 15:58     ` Ludovic Courtès
2023-08-10 14:47       ` Maxim Cournoyer
2023-08-10 16:56         ` Ludovic Courtès
2023-08-11  7:19           ` Josselin Poiret via Guix-patches via
2023-08-12 20:32             ` Ludovic Courtès
2023-08-15 18:57       ` Maxim Cournoyer
2023-08-15 16:14   ` Ludovic Courtès
2023-08-16 14:46     ` Simon Tournier
2023-08-16 18:41       ` Maxim Cournoyer
2023-08-17 14:06         ` [bug#65352] Fix time-machine and network Simon Tournier
2023-08-17 14:09           ` [bug#65352] [PATCH 1/2] guix: git: Fix the procedure reference-available? Simon Tournier
2023-08-17 14:09             ` [bug#65352] [PATCH 2/2] scripts: pull: Remove unused reference pair Simon Tournier
2023-08-17 15:41               ` [bug#65352] Fix time-machine and network Maxim Cournoyer
2023-08-17 16:08                 ` Simon Tournier
2023-08-23  2:56                   ` Maxim Cournoyer
2023-08-23  8:32                     ` Simon Tournier
2023-08-23 20:25                       ` Maxim Cournoyer
2023-08-21 14:00                 ` Ludovic Courtès
2023-08-21 15:58                   ` Maxim Cournoyer
2023-08-22 16:27                     ` Ludovic Courtès
2023-08-23  2:14                       ` Maxim Cournoyer
2023-08-21 13:57             ` Ludovic Courtès
2023-09-04  8:49             ` Ludovic Courtès
2023-09-04 11:34               ` Simon Tournier
2023-09-05 20:33                 ` Maxim Cournoyer
2023-09-05 20:48                   ` Simon Tournier
2023-09-04  9:32             ` Ludovic Courtès
2023-09-04 17:37               ` Simon Tournier
2023-09-06  0:22                 ` Maxim Cournoyer
2023-09-05 20:39               ` Maxim Cournoyer
2023-09-05 20:56                 ` Simon Tournier
2023-09-06  2:39                   ` Maxim Cournoyer
2023-09-05 13:24             ` bug#65352: " Maxim Cournoyer
2023-09-05 13:43               ` [bug#65352] " Simon Tournier
2023-09-06  0:04                 ` bug#65352: " Maxim Cournoyer
2023-09-06  0:58                   ` [bug#65352] " Simon Tournier
2023-09-06  2:00                     ` Maxim Cournoyer
2023-09-07 11:15                       ` Simon Tournier
2023-09-06 10:32           ` [bug#65352] time-machine, unavailable network or Savannah down Simon Tournier
2023-09-06 14:17             ` [bug#65352] [PATCH v2] DRAFT git: Avoid touching the network unless needed in 'reference-available?' Simon Tournier
2023-09-13 20:16               ` [bug#65352] Fix time-machine and network Ludovic Courtès
2023-09-13  0:32                 ` Simon Tournier
2023-09-14  8:50                   ` Ludovic Courtès
2023-09-14  9:04                   ` Ludovic Courtès
2023-09-14  9:42                     ` Simon Tournier
2023-09-22 13:54                       ` bug#65352: " Simon Tournier
2023-09-25  9:32                     ` [bug#65352] " Ludovic Courtès
2023-09-25  9:57                       ` Simon Tournier
2023-09-25 11:21                         ` Simon Tournier
2023-09-25 15:01                         ` Ludovic Courtès
2023-09-25 15:58                           ` Simon Tournier
2023-09-06 17:41             ` [bug#65352] time-machine, unavailable network or Savannah down Maxim Cournoyer
2023-09-06 23:21               ` Simon Tournier
2023-08-15 19:44   ` [bug#64746] [PATCH v2 1/3] git: Clarify commit relation reference in doc Maxim Cournoyer
2023-08-15 19:44     ` [bug#64746] [PATCH v2 2/3] pull: Tag commit argument with 'tag-or-commit Maxim Cournoyer
2023-08-16 15:02       ` Simon Tournier
2023-08-16 18:47         ` Maxim Cournoyer
2023-08-17 14:45           ` Simon Tournier
2023-08-17 18:16             ` Maxim Cournoyer
2023-08-17 18:47               ` Simon Tournier
2023-08-23  2:54                 ` [bug#64746] [PATCH 2/2] scripts: time-machine: Error when attempting to visit too old commits Maxim Cournoyer
2023-08-23  8:27                   ` Simon Tournier
2023-08-15 19:44     ` [bug#64746] [PATCH v2 3/3] " Maxim Cournoyer
2023-08-16 15:39       ` Simon Tournier
2023-08-17  1:41         ` bug#64746: " Maxim Cournoyer

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=87lef8hfil.fsf_-_@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=64746@debbugs.gnu.org \
    --cc=dev@jpoiret.xyz \
    --cc=ludo@gnu.org \
    --cc=mail@cbaines.net \
    --cc=me@tobias.gr \
    --cc=othacehe@gnu.org \
    --cc=rekado@elephly.net \
    --cc=zimon.toutoune@gmail.com \
    /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).