[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shall updaters fall back to other updaters?
From: |
Ludovic Courtès |
Subject: |
Re: Shall updaters fall back to other updaters? |
Date: |
Wed, 06 Jul 2022 16:16:59 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) |
Hi,
zimoun <zimon.toutoune@gmail.com> skribis:
> 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.
Nope! ‘all-modules’ *is* deterministic because it builds upon
‘scheme-files’, which is deterministic and documented as such.
> Maybe sorting ’%updaters’ would be enough; something like,
>
> (define %updaters
> ;; The list of publically-known updaters.
> (delay (sort (fold-module-public-variables (lambda (obj result)
Whether ‘fold-module-public-variables’ is deterministic depends on
whether ‘module-map’ is deterministic, which in turn depends on
‘hash-map->list’, which is not deterministic AFAICS.
So what we could do is replace uses of ‘module-map’ with a variant that
sorts variables.
That said, the only case where it can influence updater order is when
several of them are defined in the same module.
Thoughts?
Ludo’.