<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<h1>OTP 25-rc2</h1>
<p>Erlang/OTP 25-rc2 is the second release candidate of three before the OTP 25.0 release.</p>
<p>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
<a href="https://github.com/erlang/otp/issues" class="inline-onebox">Issues · erlang/otp · GitHub</a> or by posting to
<a href="https://erlangforums.com">Erlangforums</a> or the mailing list <a href="mailto:erlang-questions@erlang.org">
erlang-questions@erlang.org</a>.</p>
<p>All artifacts for the release can be downloaded from the <a href="https://github.com/erlang/otp/releases/tag/OTP-25.0-rc2">
Erlang/OTP Github</a> release and you can view the new documentation at <a href="https://erlang.org/documentation/doc-13.0-rc2/doc/" class="inline-onebox">
Erlang/OTP 25.0</a>. You can also install the latest release using <a href="https://github.com/kerl/kerl">
kerl</a> like this: <code>kerl build 25.0-rc2 25.0-rc2</code>.</p>
<p>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.</p>
<p>Many thanks to all contributors!</p>
<p>Below are some highlights of the release:</p>
<h2><a class="anchor" href="https://erlangforums.com/t/otp-25-0-rc2-release-candidate-2-is-released/1246#highlights-rc2-2"></a>Highlights rc2</h2>
<h3><a class="anchor" href="https://erlangforums.com/t/otp-25-0-rc2-release-candidate-2-is-released/1246#stdlib-3"></a>stdlib</h3>
<ul>
<li>New function <code>filelib:ensure_path/1</code> will ensure that all directories for the given path exists</li><li>New functions <code>groups_from_list/2</code> and <code>groups_from_list/3</code> in the
<code>maps</code> module</li><li>New functions <code>uniq/1</code> <code>uniq/2</code> in the lists module</li></ul>
<h3><a class="anchor" href="https://erlangforums.com/t/otp-25-0-rc2-release-candidate-2-is-released/1246#compiler-kernel-stdlib-syntax_tools-4"></a>compiler, kernel, stdlib, syntax_tools</h3>
<ul>
<li>Added support for selectable features as described in <a href="https://www.erlang.org/eeps/eep-0060">
<code>EEP-60</code></a>. Features can be enabled/disabled during compilation with options (ordinary and +term) to
<code>erlc</code> as well as with directives in the file. Similar options can be used to
<code>erl</code> for enabling/disabling features allowed at runtime. The new <code>
maybe</code> expression <a href="https://www.erlang.org/eeps/eep-0049"><code>EEP-49</code></a> is fully supported as the feature maybe_expr.</li></ul>
<p>For more details about new features and potential incompatibilities see</p>
<ul>
<li><a href="https://erlang.org/download/otp_src_25.0-rc2.readme">https://erlang.org/download/otp_src_25.0-rc2.readme</a></li></ul>
<h2><a class="anchor" href="https://erlangforums.com/t/otp-25-0-rc2-release-candidate-2-is-released/1246#highlights-rc1-5"></a>Highlights rc1</h2>
<h3><a class="anchor" href="https://erlangforums.com/t/otp-25-0-rc2-release-candidate-2-is-released/1246#erts-jit-6"></a>erts & jit</h3>
<ul>
<li>The JIT now works for 64-bit ARM processors.</li><li>The JIT now does type-based optimizations based on type information in the BEAM files.</li><li>Improved the JIT’s support for external tools like <code>perf</code> and <code>
gdb</code>, allowing them to show line numbers and even the original Erlang source code when that can be found.</li></ul>
<h3><a class="anchor" href="https://erlangforums.com/t/otp-25-0-rc2-release-candidate-2-is-released/1246#erts-stdlib-kernel-7"></a>erts, stdlib, kernel</h3>
<ul>
<li>Users can now configure ETS tables with the <code>{write_concurrency, auto}</code> 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
<code>{decentralized_counters, true}</code> option is enabled by default when <code>
{write_concurrency, auto}</code> is active.Benchmark results comparing this option with the other ETS optimization options are available here:
<a href="https://erlang.org/bench/ets_bench_result_lock_config.html">benchmarks</a>.</li><li>To enable more optimizations, BEAM files compiled with OTP 21 and earlier cannot be loaded in OTP 25.</li><li>The signal queue of a process with the process flag <code>message_queue_data=off_heap</code> 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. <a href="https://erlang.org/bench/sigq_bench_result.html">See benchmark</a>.</li><li>The Erlang installation directory is now relocatable on the file system given that the paths in the installation’s RELEASES file are paths that are relative to the installations root directory.</li><li>A new option called <code>short</code> has been added to the functions <code>
erlang:float_to_list/2</code> and <code>erlang:float_to_binary/2</code>. This option creates the shortest correctly rounded string representation of the given float that can be converted back to the same float again.</li><li>Introduction of <code>quote/1</code> and <code>unquote/1</code> functions in the
<code>uri_string</code> module - a replacement for the deprecated functions <code>
http_uri:encode</code> and <code>http_uri:decode</code>.</li><li>The new module <code>peer</code> supersedes the <code>slave</code> module. The
<code>slave</code> module is now deprecated and will be removed in OTP 27.</li><li><code>global</code> 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
<code>kernel</code> configuration parameter <code>prevent_overlapping_partitions</code> to
<code>false</code>. Doing this will retain the same behavior as in OTP 24 and earlier.</li><li>The <code>format_status/2</code> callback for <code>gen_server</code>, <code>
gen_statem</code> and <code>gen_event</code> has been deprecated in favor of the new
<code>format_status/1</code> callback.The new callback adds the possibility to limit and change many more things than the just the state.</li><li>The <code>timer</code> module has been modernized and made more efficient, which makes the timer server less susceptible to being overloaded. The
<code>timer:sleep/1</code> function now accepts an arbitrarily large integer.</li></ul>
<h3><a class="anchor" href="https://erlangforums.com/t/otp-25-0-rc2-release-candidate-2-is-released/1246#compiler-8"></a>Compiler</h3>
<ul>
<li>The <code>maybe ... end</code> construction as proposed in <a href="https://www.erlang.org/eeps/eep-0049">
<code>EEP-49</code></a> has been implemented. It can simplify complex code where otherwise deeply nested cases would have to be used.To enable
<code>maybe</code>, give the option <code>{enable_feature,maybe_expr}</code> 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.</li><li>When a record matching or record update fails, a <code>{badrecord, ExpectedRecordTag}</code> exception used to be raised. In this release, the exception has been changed to
<code>{badrecord, ActualValue}</code>, where <code>ActualValue</code> is the value that was found instead of the expected record.</li><li>Add compile attribute <code>-nifs()</code> to empower compiler and loader with information about which functions may be overridden as NIFs by
<code>erlang:load_nif/2</code>.</li><li>Improved and more detailed error messages when binary construction with the binary syntax fails. This applies both for error messages in the shell and for
<code>erl_error:format_exception/3,4</code>.</li></ul>
<h3><a class="anchor" href="https://erlangforums.com/t/otp-25-0-rc2-release-candidate-2-is-released/1246#crypto-9"></a>Crypto</h3>
<ul>
<li>Add <code>crypto:hash_equals/2</code> which is a constant time comparision of hashvalues.</li></ul>
<h3><a class="anchor" href="https://erlangforums.com/t/otp-25-0-rc2-release-candidate-2-is-released/1246#dialyzer-10"></a>Dialyzer</h3>
<ul>
<li>Optimize operations in the <code>erl_types</code> module. Parallelize the Dialyzer pass remote.</li><li>Added the <code>missing_return</code> and <code>extra_return</code> options to raise warnings when specifications differ from inferred types. These are similar to, but not quite as verbose as overspecs and underspecs.</li><li>Dialyzer now better understands the types for <code>min/2</code>, <code>max/2</code>, and
<code>erlang:raise/3</code>. Because of that, Dialyzer can potentially generate new warnings. In particular, functions that use
<code>erlang:raise/3</code> could now need a spec with a <code>no_return()</code> return type to avoid an unwanted warning.</li></ul>
<h3><a class="anchor" href="https://erlangforums.com/t/otp-25-0-rc2-release-candidate-2-is-released/1246#misc-11"></a>Misc</h3>
<ul>
<li>A new <a href="https://github.com/erlang/otp/blob/master/HOWTO/DEVELOPMENT.md">
DEVELOPMENT HOWTO guide</a> has been added that describes how to build and test Erlang/OTP when fixing bugs or developing new functionality.</li><li>Testing has been added to the Github actions run for each opened PR so that more bugs are caught earlier when bug fixes and new features are proposed.</li></ul>
<p>For more details about new features and potential incompatibilities see</p>
<ul>
<li><a href="https://erlang.org/download/otp_src_25.0-rc1.readme">https://erlang.org/download/otp_src_25.0-rc1.readme</a></li></ul>
<br>
</div>
</body>
</html>