Closed thbar closed 4 months ago
Amazing, thanks. That's good to know didn't realize they weren't ordered. Not sure how I didn't run into that before
Amazing, thanks. That's good to know didn't realize they weren't ordered. Not sure how I didn't run into that before
No problem, it's a common issue, and it depends on your language or OS maybe even (if I remember well).
Thanks for accepting the fixes! Happy to contribute more :smile:
On my platform (Mac M1), I had failures on a number of tests while running just
mix test
.For the reference, here is my current setup:
Since I want to contribute a bit to this project, this was a good first issue :smile:.
The root cause is that
Map.keys
order is not guaranteed (see references below).This PR fixes a couple of those (the ones happening on my machine) - note that I didn't run the full suite, only
mix test
basic suite.EDIT: I didn't see a
CHANGELOG
on the project yet, it could be useful in the future to document such changes.References
A couple of references on that topic:
https://hexdocs.pm/elixir/keywords-and-maps.html
And also:
https://fly.io/phoenix-files/taking-control-of-map-sort-order-in-elixir/