Hi,

zimoun <zimon.touto...@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 via email to