github erlang/otp OTP-25.0-rc3
OTP 25.0-rc3

latest releases: OTP-27.1.1, OTP-25.3.2.14, OTP-27.1...
2 years ago
 ---------------------------------------------------------------------
 --- HIGHLIGHTS ------------------------------------------------------
 ---------------------------------------------------------------------

  OTP-15991    Application(s): erts, stdlib
               Related Id(s): PR-5208

               Users can now configure ETS tables with the
               {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:

               https://erlang.org/bench/ets_bench_result_lock_config.html


  OTP-16702    Application(s): compiler, erts

               To enable more optimizations, BEAM files compiled with
               OTP 21 and earlier cannot be loaded in OTP 25.


  OTP-16982    Application(s): erts
               Related Id(s): PR-5020

               The signal queue of a process with
               message_queue_data=off_heap* has been optimized to
               allow parallel reception of signals from multiple
               processes.

               This is possible to do as Erlang only guarantees that
               signals (i.e., message signals and non-message signals)
               sent from a single process to another process are
               ordered in send order. However, there are no ordering
               guarantees for signals sent from different processes to
               a particular process. Therefore, several processes can
               send signals in parallel to a specific process without
               synchronizing with each other. However, such signal
               sending was previously always serialized as the senders
               had to acquire the lock for the outer signal queue of
               the receiving process. This parallel signal sending
               optimization yields much better scalability for signal
               sending than what was previously possible, see
               https://erlang.org/bench/sigq_bench_result.html for
               benchmark results.

               * Information about how to enable the
               message_queue_data=off_heap setting can be found in the
               documentation of the function erlang:process_flag/2.


  OTP-17119    Application(s): erts
               Related Id(s): PR-4869

               The JIT now works for 64-bit ARM processors.


  OTP-17151    Application(s): compiler, erts
               Related Id(s): ERIERL-590, PR-5479

               Added support for the compile attribute -nifs() to
               empower compiler and loader with information about
               which functions may be overridden as NIFs by
               erlang:load_nif/2. It is recommended to use this
               attribute in all modules that load NIF libraries.


  OTP-17351    Application(s): stdlib
               Related Id(s): GH-4673, PR-4952

               The 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, such
               as the last received message, the reason for
               terminating and more events specific to each type of
               behavior. See the respective modules documentation for
               more details.


  OTP-17481    Application(s): stdlib
               Related Id(s): PR-4811

               The 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.


  OTP-17504    Application(s): compiler, erts
               Related Id(s): GH-4971, PR-5281, PR-5752

               When binary construction using the binary syntax fails,
               the error message printed in the shell and by
               erl_error:format_exception/3,4 will contain more
               detailed information about what went wrong.


  OTP-17684    Application(s): compiler, erts
               Related Id(s): PR-5316, PR-5664

               The Erlang compiler now includes type information in
               BEAM files, and the JIT can now use that type
               information to do optimizations such as eliminating or
               simplifying type tests.


  OTP-17705    Application(s): compiler
               Related Id(s): PR-5411

               The maybe ... end construction 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 erlc or add -feature(enable, maybe_expr).
               inside the module.


  OTP-17710    Application(s): otp
               Related Id(s): PR-5597

               A new DEVELOPMENT how-to guide has been added that
               describes how to build and test Erlang/OTP when fixing
               bugs or developing new functionality.

               The makefile system has been extended to make it easier
               to run tests at different granulates directly from the
               command line. This new functionality is described in
               the development how-to.

               Using the extended makefile system, 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.


  OTP-17720    Application(s): common_test, kernel, stdlib
               Related Id(s): PR-5162

               The new module peer supersedes the slave module. The
               slave module is now deprecated and will be removed in
               OTP 27.

               peer contains an extended and more robust API for
               starting erlang nodes.


  OTP-17784    Application(s): kernel, stdlib
               Related Id(s): PR-5792

               In order to make it easier for the user to manage
               multiple outstanding asynchronous call requests, new
               functionality utilizing request identifier collections
               have been introduced in erpc, gen_server, gen_statem,
               and gen_event.


  OTP-17841    Application(s): compiler, erts
               Related Id(s): PR-5694

               When a record matching or record update fails, a
               {badrecord,ExpectedRecordTag} exception used to be
               raised. In this release, the exception has been changed
               to {badrecord,ActualValue}, where ActualValue is the
               actual that was found instead of the expected record.


  OTP-17911    Application(s): kernel
               Related Id(s): OTP-17843, PR-5611, PR-5687

               *** POTENTIAL INCOMPATIBILITY ***

               As of OTP 25, global will by default prevent
               overlapping partitions due to network issues 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.

               Prevention of overlapping partitions can be disabled
               using the prevent_overlapping_partitions kernel(6)
               parameter, making global behave like it used to do.
               This is, however, problematic for all applications
               expecting a fully connected network to be provided,
               such as for example mnesia, but also for global itself.
               A network of overlapping partitions might cause the
               internal state of global to become inconsistent. Such
               an inconsistency can remain even after such partitions
               have been brought together to form a fully connected
               network again. The effect on other applications that
               expects that a fully connected network is maintained
               may vary, but they might misbehave in very subtle hard
               to detect ways during such a partitioning. Since you
               might get hard to detect issues without this fix, you
               are strongly advised not to disable this fix. Also note
               that this fix has to be enabled on all nodes in the
               network in order to work properly.


  OTP-17953    Application(s): stdlib
               Related Id(s): PR-5621

               Added filelib:ensure_path/1 that ensures that all
               directories for the given path exists (unlike
               filelib:ensure_dir/1, which will not create the last
               segment of the path).


  OTP-17969    Application(s): stdlib
               Related Id(s): PR-5588

               The functions groups_from_list/2 and groups_from_list/3
               have been added to the maps module.


  OTP-17977    Application(s): stdlib
               Related Id(s): GH-5606, PR-5766

               The functions uniq/1 and uniq/2 for removing duplicates
               have been added to the lists module.


  OTP-17988    Application(s): compiler, kernel, stdlib, syntax_tools

               Added support for selectable features as described in
               EEP-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.


  OTP-18039    Application(s): compiler

               Change format of feature options and directives for
               better consistency. Options to erlc and the
               -compile(..) directive now has the format {feature,
               feature-name, enable | disable}. The -feature(..) now
               has the format -feature(feature-name, enable |
               disable).


 ---------------------------------------------------------------------
 --- POTENTIAL INCOMPATIBILITIES -------------------------------------
 ---------------------------------------------------------------------

  OTP-17544    Application(s): stdlib
               Related Id(s): PR-5008

               Fix gen_server:call with the first argument as self()
               to throw an error instead of failing with a timeout.

               The same fix has also been done for gen_statem:call/3,
               gen_event:sync_notify/2 and any other functionality
               relying on the internal gen:call/3 function.

               A similar fix was also done when using io:format/2 and
               the current group_leader was set to the current
               process.


  OTP-17569    Application(s): erts
               Related Id(s): PR-4793

               The growth rate of writable binaries has been adjusted
               to only increase by 20% after 16MB in size. Before this
               change the size would always double.

               This change may degrade write performance of large
               binaries.


  OTP-17627    Application(s): inets, stdlib

               Adjust uri_string:normalize behavior for URIs with
               undefined port (URI string with a port colon but no
               port value or URI map with port => undefined).

               Remove redundant normalization from http_request
               module.

               Before this change, normalize would not remove port
               subcomponent in such cases and could for example return
               "http://localhost:" URI.


  OTP-17644    Application(s): dialyzer
               Related Id(s): PR-5223

               Fixed a bug that could cause the type analyzer to enter
               an infinite loop.


  OTP-17681    Application(s): kernel
               Related Id(s): PR-5307

               The most, or at least the most used, rpc operations now
               require erpc support in order to communicate with other
               Erlang nodes. erpc was introduced in OTP 23. That is,
               rpc operations against Erlang nodes of releases prior
               to OTP 23 will fail.


  OTP-17683    Application(s): erts
               Related Id(s): PR-5306

               Distributed spawn operations now require distributed
               spawn_request() support. Distributed spawn_request()
               was introduced in OTP 23. That is, distributed spawn
               operations against Erlang nodes of releases prior to
               OTP 23 will fail.


  OTP-17821    Application(s): dialyzer
               Related Id(s): GH-5016, OTP-17554, PR-5408

               The default location of the plt has been changed from
               $HOME to filename:basedir(user_cache,"erlang").


  OTP-17866    Application(s): inets

               This change removes deprecated functions:
               http_uri:parse/1, http_uri:parse/2 and
               http_uri:scheme_defaults/0.

               This change delays until OTP-26 removal of deprecated
               functions: http_uri:encode/1 and http_uri:decode/1.

               This change marks httpd_util:decode_hex/1 and
               httpd_util:encode_hex/1 as deprecated.


  OTP-17889    Application(s): inets

               Fixed typo in Reason term returned from
               httpc_handler:handle_http_body.

               After this change, could_not_establish_ssl_tunnel atom
               is returned within Reason term.


  OTP-17894    Application(s): syntax_tools
               Related Id(s): PR-5509

               The erl_syntax_lib:analyze_attribute/1 function would
               return {Name, {Name, Value}} instead of {Name, Value}
               (which is the documented return value).


  OTP-17911    Application(s): kernel
               Related Id(s): OTP-17843, PR-5611, PR-5687

               *** HIGHLIGHT ***

               As of OTP 25, global will by default prevent
               overlapping partitions due to network issues 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.

               Prevention of overlapping partitions can be disabled
               using the prevent_overlapping_partitions kernel(6)
               parameter, making global behave like it used to do.
               This is, however, problematic for all applications
               expecting a fully connected network to be provided,
               such as for example mnesia, but also for global itself.
               A network of overlapping partitions might cause the
               internal state of global to become inconsistent. Such
               an inconsistency can remain even after such partitions
               have been brought together to form a fully connected
               network again. The effect on other applications that
               expects that a fully connected network is maintained
               may vary, but they might misbehave in very subtle hard
               to detect ways during such a partitioning. Since you
               might get hard to detect issues without this fix, you
               are strongly advised not to disable this fix. Also note
               that this fix has to be enabled on all nodes in the
               network in order to work properly.


  OTP-17920    Application(s): ssh

               The representation of Edward curves (ed25519 and ed448)
               inside ssh had a temporary representation (ed_pri and
               ed_pub).

               That is now changed to the public_key form. See the
               manual for more information.


  OTP-17921    Application(s): public_key

               The deprecated public_key functions ssh_decode/2,
               ssh_encode/2, ssh_hostkey_fingerprint/1 and
               ssh_hostkey_fingerprint/2 are removed.

               They are replaced by ssh_file:decode/2,
               ssh_file:encode/2, ssh:hostkey_fingerprint/1 and
               ssh:hostkey_fingerprint/2 respectively.

               Note that the decode/2 and encode/2 are not exact
               replacement functions, some minor changes may be
               needed. Se the manual for more information.


  OTP-17925    Application(s): stdlib
               Related Id(s): PR-5631

               The non-local function handler for the erl_eval can now
               be called with either two or three arguments. When
               called with three arguments, the first argument is the
               annotation for the node in the abstract format.

               All errors during evaluation will now be passed through
               erlang:raise/3. If the restricted shell is active and
               it does not let erlang:raise/3 through, evaluation
               errors will be printed in less clear way. See the
               documentation for restricted shell in shell.


  OTP-17950    Application(s): wx

               Added aux1Down and aux2Down fields to the wxMouseState
               record. Since one record have been changed a
               recompilation of user code might be required.


  OTP-17965    Application(s): crypto

               The infomation in error messages are increased.

               Previously the error was signaled with en error class
               exception badarg, notsup or error, and also in some
               more ways like an other exception or a return value in
               a non-standardized format.

               Now it is an error-class exception
               {notsup|badarg|error, InfoFromCfile,
               Description::string()}.

               The InfoFromCfile is a term with name and line number
               of the C-file where the error was found. This is
               primarily intended for a crypto maitntainer or an
               advanced user to find the cause of complicated errors -
               maybe in crypto itself. The contents of that term might
               be changed in the future.

               The Description is a clear text string that describes
               the error. In case of badarg and notsup the intention
               is that it should help the user to find the cause ("Bad
               key size" as an example). Specially for some error that
               are unlikely, the string may not be possible to
               understand without deep knowledge of the underlying
               cryptolib. Such messages are intended for a crypto
               maintainer.

               The first element on call stack (the S in try ... catch
               error:E:S .... end) gives more information like the
               actual argument list in the call of crypto and the
               argument number (if possible) in the call to the NIF
               inside crypto.

               The functions in crypto affected by this change are:

               sign/4, sign/5, verify/5, verify/6,

               generate_key/2, generate_key/3, compute_key/4,

               hash/2, hash/4, hash_init/1, hash_update/4,
               hash_final/1,

               mac/3,4, mac_init/3, mac_update/2, mac_final/2,

               pbkdf2_hmac/5,

               public_encrypt/4, private_decrypt/4, private_encrypt/4,
               public_decrypt/4

               This schema was introduced earlier in:

               crypto_init/3, crypto_init/4, crypto_update/2,
               crypto_final/1, crypto_get_data/1,

               crypto_one_time/4, crypto_one_time/5,
               crypto_one_time_aead/6, crypto_one_time_aead/7


  OTP-17991    Application(s): stdlib

               The function filename:safe_relative_path/1, which has
               been deprecated since OTP 25, has been removed. Use
               filelib:safe_relative_path/2 instead.


  OTP-18009    Application(s): stdlib
               Related Id(s): PR-5785

               Fixed string:next_grapheme/1 to return an empty binary
               in the tail for binary input for the last grapheme
               cluster.

Don't miss a new otp release

NewReleases is sending notifications on new releases.