unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Hartmut Goebel <h.goebel@crazy-compilers.com>,
	guix-devel <guix-devel@gnu.org>
Subject: Re: Shall updaters fall back to other updaters?
Date: Wed, 06 Jul 2022 18:24:41 +0200	[thread overview]
Message-ID: <87let6b452.fsf@gmail.com> (raw)
In-Reply-To: <87o7y22un8.fsf@gnu.org>

Hi,

On mer., 06 juil. 2022 at 16:16, Ludovic Courtès <ludo@gnu.org> wrote:

> Nope!  ‘all-modules’ *is* deterministic because it builds upon
> ‘scheme-files’, which is deterministic and documented as such.

Oh indeed!  My bad, I have overlooked that ’scheme-files’ uses
’scandir*’ instead of Guile scandir; and this scandir* defined in (guix
syscall) sorts the result.


>> 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.

Indeed, and that’s the case, no?  From [1]:

        bioconductor cran 
        savannah generic-html gnu-ftp sourceforge xorg kernel.org gnu

        cran bioconductor
        kernel.org sourceforge gnu generic-html gnu-ftp xorg savannah
       
        bioconductor cran
        sourceforge generic-html gnu-ftp savannah xorg kernel.org gnu

we see that the updaters are file-sorted (removed here) and only they
appear unsorted when defined in the same module (underlined here).


Well, I count 5 calls to ’module-map’.  Do you mean replace all of them
by ’module-map*’ which guarantees a stable order?  Or only ’module-map’
defined in ’fold-module-public-variables’ and
’fold-module-public-variables*’?


1: <https://yhetil.org/guix/9a68beb7-50f0-9998-9daf-2b036a8e9e66@crazy-compilers.com>


Cheers,
simon


  reply	other threads:[~2022-07-08 13:04 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
2022-07-06 14:16   ` Ludovic Courtès
2022-07-06 16:24     ` zimoun [this message]
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=87let6b452.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=h.goebel@crazy-compilers.com \
    --cc=ludo@gnu.org \
    /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).