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

Hi,

zimoun <zimon.toutoune@gmail.com> skribis:

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

[...]

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

Yeah, you wort right from the start: we should sort ‘%updaters’.  I’ll
push something along these lines.

(The other option I contemplated was to sort things in
‘fold-module-public-variables’, but that’s potentially costly for things
like packages, with many variables per module, so I thought we’re rather
not do it by default.)

Thanks,
Ludo’.


      reply	other threads:[~2022-07-18 11:17 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
2022-07-18 11:15       ` Ludovic Courtès [this message]

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=87mtd61xjw.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=h.goebel@crazy-compilers.com \
    --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).