Skip to content

Conversation

@jacobtread
Copy link

Description

Replaces the usages of HashMap with IndexMap for the outputs of "file_stems", "file_suffixes", and "file_icons". Leaves the original hashmap step in place but adds an additional Vec step where all the entries are added then sorted by key before being inserted into an IndexMap (which maintains the sort order)

This ensures that a consistent order is maintained when producing the outputs, this way when creating releases for the beared-icon-theme.json file instead of a seeing a very large set of changes in the git output (Because of the hashmap key order changing) you'll now instead see only diffs for the parts that have actually changed, making it more clear what's changed

Changes

  • Add indexmap dependency
  • Replace "file_stems", "file_suffixes", and "file_icons" types with IndexMap instead of HashMap for maintaining insertion order
  • Add sorting over map keys to maintain a consistent order

Replaces the usages of HashMap with IndexMap for the outputs of
"file_stems", "file_suffixes", and "file_icons". Leaves the original
hashmap step in place but adds an additional Vec step where all the
entries are added then sorted by key before being inserted into an
IndexMap (which maintains the sort order)

This ensures that a consistent order is maintained when producing the
outputs, this way when creating releases for the beared-icon-theme.json
file instead of a seeing a very large set of changes in the git output
(Because of the hashmap key order changing) you'll now instead see only
diffs for the parts that have actually changed, making it more clear
what's changed
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.

1 participant