hi: Deterministic ImportedMods in Usages
hi: Deterministic ImportedMods in Usages
The `mi_usages` field of the interface files must use a deterministic
list of `Usage`s to guarantee a deterministic interface. However, this
list was, in its origins, constructed from a `ModuleEnv` which uses a
non-deterministic ordering that was leaking into the interface.
Specifically, ImportedMods = ModuleEnv ... would get converted to a list and
then passed to `mkUsageInfo` to construct the Usages.
The solution is simple. Back `ImportedMods` with a deterministic map.
`Map Module ...` is enough, since the Ord instance for `Module` already
uses a stable, deterministic, comparison.
Fixes
Fixes #25131 (closed)
Merge request reports
Activity
requested review from @mpickering
assigned to @alt-romes
mentioned in issue #25131 (closed)
assigned to @marge-bot
unassigned @alt-romes
I will attempt to batch this MR (!13109 (closed))...
Merged in a1e42e7a
Please register or sign in to reply