unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: Hartmut Goebel <h.goebel@crazy-compilers.com>,
	guix-devel <guix-devel@gnu.org>
Subject: Re: Shall updaters fall back to other updaters?
Date: Mon, 04 Jul 2022 16:02:14 +0200	[thread overview]
Message-ID: <86tu7xyo0p.fsf@gmail.com> (raw)
In-Reply-To: <71902b16-4c29-c2f3-c99b-c103f3f6647c@crazy-compilers.com>

Hi,

On Thu, 30 Jun 2022 at 10:58, Hartmut Goebel <h.goebel@crazy-compilers.com> wrote:

> BTW 2: Which updater is used for each package is non-deterministic.

From (guix discovery), ’all-modules’ is not deterministic because it
depends on how the filesystem tree is walked.

Therefore, indeed ’importer-modules’ from (guix upstream) is not sorted
and the order is non-deterministic.

(Note that ’fold-packages’ from (guix packages) is not determining too,
if I remember correctly.)


Well, make ’all-modules’ deterministic requires some benchmark because
it could like to some time penalty; even if the order does not matter.
Some commands are already enough slow for adding an extra penalty. ;-)

Maybe sorting ’%updaters’ would be enough; something like,

--8<---------------cut here---------------start------------->8---
(define %updaters
  ;; The list of publically-known updaters.
  (delay (sort (fold-module-public-variables (lambda (obj result)
                                               (if (upstream-updater? obj)
                                                   (cons obj result)
                                                   result))
                                             '()
                                             (importer-modules))
               (lambda (u1 u2)
                 (string<?
                  (upstream-updater-name u1) (upstream-updater-name u2))))))
--8<---------------cut here---------------end--------------->8---


Cheers,
simon



  parent reply	other threads:[~2022-07-04 14:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-30  8:58 Shall updaters fall back to other updaters? Hartmut Goebel
2022-06-30  9:10 ` Maxime Devos
2022-07-01 13:15 ` Ludovic Courtès
2022-07-03  8:12   ` Hartmut Goebel
2022-07-03 15:11     ` Kaelyn
2022-07-04 12:33       ` Hartmut Goebel
2022-07-04 14:02 ` zimoun [this message]
2022-07-06 14:16   ` Ludovic Courtès
2022-07-06 16:24     ` zimoun
2022-07-18 11:15       ` 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=86tu7xyo0p.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=h.goebel@crazy-compilers.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).