all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: guix-devel@gnu.org, Mathieu Othacehe <othacehe@gnu.org>,
	guix-sysadmin <guix-sysadmin@gnu.org>
Subject: Re: Dropping gzip-compressed substitutes
Date: Tue, 08 Feb 2022 21:35:16 -0500	[thread overview]
Message-ID: <87ilto22e3.fsf@gmail.com> (raw)
In-Reply-To: <87wni5xplp.fsf@elephly.net> (Ricardo Wurmus's message of "Tue, 08 Feb 2022 17:53:47 +0100")

Hi Ricardo and Mathieu,

Ricardo Wurmus <rekado@elephly.net> writes:

> Hi Mathieu,
>
> thanks for the patch!
>
>> From bd306a8b20f2033d67755dd332a5d33b2f6b822d Mon Sep 17 00:00:00 2001
>> From: Mathieu Othacehe <othacehe@gnu.org>
>> Date: Tue, 8 Feb 2022 14:28:56 +0100
>> Subject: [PATCH 1/1] store: Warn about daemon deprecation.
>>
>> * guix/deprecation.scm (warn-about-old-daemon): New procedure.
>> * guix/store.scm (build-things): Use it to warn about old daemons.
>> ---
>>  guix/deprecation.scm | 7 +++++++
>>  guix/store.scm       | 2 ++
>>  2 files changed, 9 insertions(+)
>>
>> diff --git a/guix/deprecation.scm b/guix/deprecation.scm
>> index c66c9367f6..666e178d75 100644
>> --- a/guix/deprecation.scm
>> +++ b/guix/deprecation.scm
>> @@ -1,5 +1,6 @@
>>  ;;; GNU Guix --- Functional package management for GNU
>>  ;;; Copyright © 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
>> +;;; Copyright © 2021 Mathieu Othacehe <othacehe@gnu.org>
>>  ;;;
>>  ;;; This file is part of GNU Guix.
>>  ;;;
>> @@ -24,6 +25,8 @@ (define-module (guix deprecation)
>>  
>>              define-deprecated/public
>>              define-deprecated/alias
>> +
>> +            warn-about-old-daemon
>>              warn-about-deprecation))
>>  
>>  ;;; Commentary:
>> @@ -32,6 +35,10 @@ (define-module (guix deprecation)
>>  ;;;
>>  ;;; Code:
>>  
>> +(define (warn-about-old-daemon)
>> +  (warning (G_ "Your Guix daemon is seriously outdated, please consider
>> + updating it by following the 'Upgrading Guix' documentation section.~%")))
>> +
>
> s/documention section/section in the manual/
>
> Should it also mention that staying with the old daemon means that
> binaries will no longer be available?  For example:
>
>    Your Guix daemon is no longer supported and will soon no longer be
>    able to download binary substitutes.
>
> I realize that what you proposed is a generic warning, but perhaps it’s
> better to mention a direct consequence of failing to upgrade.  (I know
> many people who will not upgrade unless they absolutely have to.)

Good idea; I modified it slightly like so:

--8<---------------cut here---------------start------------->8---
@@ -36,8 +36,9 @@ (define-module (guix deprecation)
 ;;; Code:
 
 (define (warn-about-old-daemon)
-  (warning (G_ "Your Guix daemon is seriously outdated, please consider
- updating it by following the 'Upgrading Guix' documentation section.~%")))
+  (warning (G_ "Your Guix daemon is severely outdated, and will soon cease to
+be able to download binary substitutes.  To upgrade it, refer to the
+'Upgrading Guix' section in the manual.~%")))
 
 (define* (warn-about-deprecation variable properties
                                  #:key replacement)
--8<---------------cut here---------------end--------------->8---
                                  
>> --- a/guix/store.scm
>> +++ b/guix/store.scm
>> @@ -1442,6 +1442,8 @@ (define build-things
>>                               things)))
>>              (parameterize ((current-store-protocol-version
>>                              (store-connection-version store)))
>> +              (when (< (current-store-protocol-version) 355) ;0x163
>> +                (warn-about-old-daemon))
>>                (if (>= (store-connection-minor-version store) 15)
>>                    (build store things mode)
>>                    (if (= mode (build-mode normal))
>
> Maybe add a comment here to explain why this particular protocol version
> is considered old.

I added the following:

--8<---------------cut here---------------start------------->8---
@@ -1442,7 +1442,11 @@ (define build-things
                              things)))
             (parameterize ((current-store-protocol-version
                             (store-connection-version store)))
-              (when (< (current-store-protocol-version) 355) ;0x163
+              (when (< (current-store-protocol-version) #x163)
+                ;; This corresponds to the first version bump of the daemon
+                ;; since the introduction of lzip compression support.  The
+                ;; version change happened with commit 6ef61cc4c30 on the
+                ;; 2018/10/15).
                 (warn-about-old-daemon))
               (if (>= (store-connection-minor-version store) 15)
                   (build store things mode)
--8<---------------cut here---------------end--------------->8---

And pushed with commit 96d7535b03.

Thanks for the feedback!

Maxim


  reply	other threads:[~2022-02-09  2:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-07 18:44 Dropping gzip-compressed substitutes Maxim Cournoyer
2022-02-07 20:02 ` Ricardo Wurmus
2022-02-08 13:34 ` Mathieu Othacehe
2022-02-08 14:13   ` Maxim Cournoyer
2022-02-08 16:53   ` Ricardo Wurmus
2022-02-09  2:35     ` Maxim Cournoyer [this message]
2022-02-09  5:06     ` Maxim Cournoyer
2022-02-09 10:29   ` Efraim Flashner
2022-02-14 17:50 ` Ludovic Courtès
2022-02-14 20:04   ` Attila Lendvai
2022-02-15 12:20   ` Mathieu Othacehe
2022-02-15 18:29     ` Christopher Baines
2022-02-21  5:13     ` Maxim Cournoyer
2022-02-21 11:26       ` Ricardo Wurmus
2022-02-21 20:04         ` Gábor Boskovits

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

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

  git send-email \
    --in-reply-to=87ilto22e3.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=guix-sysadmin@gnu.org \
    --cc=othacehe@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.