Skip to content

refactor(parameters): back Parameters with BTreeMap#506

Merged
janimo merged 2 commits intohellas-ai:masterfrom
georgewhewell:grw/fix/btree
Apr 28, 2026
Merged

refactor(parameters): back Parameters with BTreeMap#506
janimo merged 2 commits intohellas-ai:masterfrom
georgewhewell:grw/fix/btree

Conversation

@georgewhewell
Copy link
Copy Markdown
Contributor

Switch the underlying map of abstract_interpreter::parameters::Parameters from HashMap to BTreeMap. Sorted iteration is now intrinsic to the type; downstream call sites no longer need explicit canonical_paths/sort_unstable to get a deterministic order.

Required derives:

  • Path / PathComponent gain PartialOrd / Ord, since BTreeMap requires K: Ord. They were already Hash + Eq, so this is purely additive.

Caller updates are mechanical — HashMap::new at construction sites becomes BTreeMap::new. No behaviour change beyond iteration order being deterministic by key.

Switch the underlying map of abstract_interpreter::parameters::Parameters
from HashMap to BTreeMap. Sorted iteration is now intrinsic to the type;
downstream call sites no longer need explicit canonical_paths/sort_unstable
to get a deterministic order.

Required derives:
- Path / PathComponent gain PartialOrd / Ord, since BTreeMap requires
  K: Ord. They were already Hash + Eq, so this is purely additive.

Caller updates are mechanical — HashMap::new at construction sites becomes
BTreeMap::new. No behaviour change beyond iteration order being
deterministic by key.
@janimo janimo merged commit 2d8ebfb into hellas-ai:master Apr 28, 2026
3 checks passed
@georgewhewell georgewhewell deleted the grw/fix/btree branch April 28, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants