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
This was changed in OTP 26 and is documented in the release notes: https://erlang.org/download/otp_src_26.0.readme (under OTP-18414). Maps were never documented as having any particular order, and in fact maps larger than 32 keys in previous releases would have a largely unpredictable order of keys when printed (different to maps with less than 32 keys) - such order should have never been relied upon, as it was never guaranteed.
Maps can be printed sorted using io:format("~kp", [Value])., with the k and K modifiers documented in io:fwrite/3.
Update build matrices and set OTP27 as the default
* Update Linux Build matrix to favor more compilers, three latest OTP versions,
while maintaining builds from 21 to master, reducing combinations from 46 to 39
* Update Run tests on BEAM workflow to include OTP27
* Update build and test on other Linuxes to use OTP27
* Fix test_io_lib for OTP27 (including workaround for
erlang/otp#8606)
* Fix compilation with gcc-14
These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).
SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
Describe the bug
Until OTP-27, the following map:
would have the following representation:
"#{a => 1,b => 2}"
With OTP-27, the representation can non-deterministically also be:
"#{b = >2,a => 1}"
To Reproduce
mkdir /tmp/test_beam cd /tmp/test_beam
Then run the following command a dozen times:
Expected behavior
Representation should be deterministic or non-determinism should be documented (couldn't find it in OTP27 release notes).
Affected versions
OTP-27.0
Additional context
This was observed on macOS:
ProductName: macOS
ProductVersion: 14.5
BuildVersion: 23F79
with OTP-27 from MacPorts on an amd64 machine.
The text was updated successfully, but these errors were encountered: