[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: |
Mon, 18 Jul 2022 13:15:47 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) |
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’.