Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test fix: do not depend on map order #399

Merged
merged 4 commits into from
Oct 13, 2023
Merged

Test fix: do not depend on map order #399

merged 4 commits into from
Oct 13, 2023

Conversation

jiegillet
Copy link
Contributor

@jiegillet jiegillet commented Oct 12, 2023

There was an update in OTP26:

In OTP 26, as an optimization for certain map operations, such as maps:from_list/1, maps with atom keys are now sorted in a different order. The new order is undefined and may change between different invocations of the Erlang VM.

We had some tests that relied on that order. I'm not sure I got them all since the order can vary.

The smoke test also failed on my machine because the compiler warnings were in a different order, but not on CI. I'm not sure it's related or not, but I also sorted the warnings.

@angelikatyborska
Copy link
Member

Does that mean that the warnings will be now in alphabetical order? That's a bit weird for debugging

@jiegillet
Copy link
Contributor Author

Not, it's not alphabetical order. The warnings are tuples {filepath, line, warning}, so they will be sorted by file, line, then warning. Seems like the best ordering possible :)

@angelikatyborska
Copy link
Member

Ah, that's perfect then 🙂

@jiegillet jiegillet merged commit 78cb44a into main Oct 13, 2023
6 checks passed
@jiegillet jiegillet deleted the jie-map-order branch October 13, 2023 05:11
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