LGUG2Z e28a8b7956 fix(nixgen): make the generated output order the same on every run
The generator kept its definitions, reference counts and type bindings in
HashMap and HashSet, whose iteration order changes from run to run. The
topological sort walked the keys in that order, so which shared types were
bound before their dependents, and so how some types were written out,
changed between runs. Running the same schema eight times gave eight
different files.

Use BTreeMap and BTreeSet in generator.rs and prepare.rs so every walk is in
sorted key order. The final let block was already sorted by identifier and is
unchanged.

Verified: cargo test passes (48 tests). Running the release binary on the KDE
schema.json eight times gave one identical output; the same eight runs before
the change gave eight different outputs.
2026-10-31 08:38:06 -07:00
S
Description
No description provided
47 MiB
0 Stars 1 Watchers 0 Forks
Latest
2026-02-14 21:52:25 +01:00
Languages
Rust 98.2%
Python 0.6%
AutoHotkey 0.5%
Nix 0.5%
Just 0.2%