Erlang/OTP 25-rc2 is the second release candidate of three before the OTP 25.0 release.
The intention with this release is to get feedback from our users. All feedback is welcome, even if it is only to say that it works for you. We encourage users to try it out and give us feedback either by creating an issue here Issues · erlang/otp · GitHub or by posting to Erlangforums or the mailing list erlang-q...@erlang.org.
All artifacts for the release can be downloaded from the
Erlang/OTP Github release and you can view the new documentation at
Erlang/OTP 25.0. You can also install the latest release using
kerl like this: kerl build 25.0-rc2 25.0-rc2
.
Erlang/OTP 25 is a new major release with new features, improvements as well as a few incompatibilities. Some of the new features are highlighted below.
Many thanks to all contributors!
Below are some highlights of the release:
filelib:ensure_path/1
will ensure that all directories for the given path existsgroups_from_list/2
and groups_from_list/3
in the
maps
moduleuniq/1
uniq/2
in the lists moduleEEP-60
. Features can be enabled/disabled during compilation with options (ordinary and +term) to
erlc
as well as with directives in the file. Similar options can be used to
erl
for enabling/disabling features allowed at runtime. The new
maybe
expression EEP-49
is fully supported as the feature maybe_expr.For more details about new features and potential incompatibilities see
perf
and
gdb
, allowing them to show line numbers and even the original Erlang source code when that can be found.{write_concurrency, auto}
option. This option forces tables to automatically change the number of locks that are used at run-time depending on how much concurrency is detected. The
{decentralized_counters, true}
option is enabled by default when
{write_concurrency, auto}
is active.Benchmark results comparing this option with the other ETS optimization options are available here:
benchmarks.message_queue_data=off_heap
has been optimized to allow parallel reception of signals from multiple processes. This can improve performance when many processes are sending in parallel to one
process. See benchmark.short
has been added to the functions
erlang:float_to_list/2
and erlang:float_to_binary/2
. This option creates the shortest correctly rounded string representation of the given float that can be converted back to the same float again.quote/1
and unquote/1
functions in the
uri_string
module - a replacement for the deprecated functions
http_uri:encode
and http_uri:decode
.peer
supersedes the slave
module. The
slave
module is now deprecated and will be removed in OTP 27.global
will now by default prevent overlapping partitions due to network issues. This is done by actively disconnecting from nodes that reports that they have lost connections to other nodes. This will cause fully connected partitions to form
instead of leaving the network in a state with overlapping partitions.It is possible to turn off the new behavior by setting the the
kernel
configuration parameter prevent_overlapping_partitions
to
false
. Doing this will retain the same behavior as in OTP 24 and earlier.format_status/2
callback for gen_server
,
gen_statem
and gen_event
has been deprecated in favor of the new
format_status/1
callback.The new callback adds the possibility to limit and change many more things than the just the state.timer
module has been modernized and made more efficient, which makes the timer server less susceptible to being overloaded. The
timer:sleep/1
function now accepts an arbitrarily large integer.maybe ... end
construction as proposed in
EEP-49
has been implemented. It can simplify complex code where otherwise deeply nested cases would have to be used.To enable
maybe
, give the option {enable_feature,maybe_expr}
to the compiler. The exact option to use will change in a coming release candidate and then it will also be possible to use from inside the module being compiled.{badrecord, ExpectedRecordTag}
exception used to be raised. In this release, the exception has been changed to
{badrecord, ActualValue}
, where ActualValue
is the value that was found instead of the expected record.-nifs()
to empower compiler and loader with information about which functions may be overridden as NIFs by
erlang:load_nif/2
.erl_error:format_exception/3,4
.crypto:hash_equals/2
which is a constant time comparision of hashvalues.erl_types
module. Parallelize the Dialyzer pass remote.missing_return
and extra_return
options to raise warnings when specifications differ from inferred types. These are similar to, but not quite as verbose as overspecs and underspecs.min/2
, max/2
, and
erlang:raise/3
. Because of that, Dialyzer can potentially generate new warnings. In particular, functions that use
erlang:raise/3
could now need a spec with a no_return()
return type to avoid an unwanted warning.For more details about new features and potential incompatibilities see