You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which I believe is due to the (implicit) assumption that the map arg (%{class: "foo", id: "bar"}) will be iterated first by the class key and then the id key.
I believe this assumption which was previously valid is no longer valid because in the OTP team in OTP 26 made an optimization to maps which changed the iteration order of maps from being by the term order of the keys to being undefined:
"The new order is undefined and may change between different invocations of the Erlang VM." (https://www.erlang.org/blog/otp-26-highlights/#changed-ordering-of-atom-keys)
I've previously run into issues like this, and solved them by comparing the collections as sets (MapSet.equal?(s1, s2)) rather than lists, if order is not important. I'm happy to PR this change if you want it or discuss further if you have other ideas.
Thanks again for your efforts on this library.
The text was updated successfully, but these errors were encountered:
Thanks for opening this! I think it might be safer to sort the entries coming out of the map, so we get a stable ordering going forward. I'll look into this soon.
On OTP 26 (both Elixir 1.14.5 and 1.15.0) I'm getting this test failure:
which I believe is due to the (implicit) assumption that the map arg (
%{class: "foo", id: "bar"}
) will be iterated first by theclass
key and then theid
key.I believe this assumption which was previously valid is no longer valid because in the OTP team in OTP 26 made an optimization to maps which changed the iteration order of maps from being by the term order of the keys to being undefined:
"The new order is undefined and may change between different invocations of the Erlang VM." (https://www.erlang.org/blog/otp-26-highlights/#changed-ordering-of-atom-keys)
I've previously run into issues like this, and solved them by comparing the collections as sets (
MapSet.equal?(s1, s2)
) rather than lists, if order is not important. I'm happy to PR this change if you want it or discuss further if you have other ideas.Thanks again for your efforts on this library.
The text was updated successfully, but these errors were encountered: