Initial Release | OTP 28.0 |
Git Tag | OTP-28.0 |
Date | 2025-05-21 |
Issue Id |
|
System | OTP |
Release | 28 |
Application |
|
Potential Incompatibilities |
Highlights #
- OTP-19180
-
For various error types, the compiler now tries to suggest potential fixes by adding “did you mean …?” at the end of error messages.
When a function is used with wrong arity, the compiler will try to suggest a defined function with the same name but a different arity. For example, given the following module:
-module(typos). -export([t/0]). bar(A) -> A. bar(A,A,A) -> A. bar(A,A,A,A) -> A. t() -> bar(0, 0).
The compiler will emit the following message:
typo.erl:6:12: function bar/2 undefined, did you mean bar/1,3,4? % 6| t() -> bar(0, 0). % | ^
For compiler errors that can easily be caused by typos, the compiler will try to suggest what the correct variable or function name, could be. For example, given the following module:
-module(typos). -export([bar/2]). bar(A0, B0) -> A + B.
the compiler will emit the following error messages:
typos.erl:5:5: variable 'A' is unbound, did you mean 'A0'? % 5| A + B. % | ^ typos.erl:5:9: variable 'B' is unbound, did you mean 'B0'? % 5| A + B. % | ^
Error types that now suggest correct arities:
bad_inline
,undefined_nif
,bad_nowarn_unused_function
,bad_nowarn_bif_clash
,undefined_function
.Error types that now suggest correct names:
bad_inline
,undefined_nif
,bad_nowarn_unused_function
,undefined_on_load
,undefined_function
,undefined_record
,undefined_field
,unbound_var
.Using a function with wrong arity has higher precedence than having a typo in the function name. If the compiler can find a defined function with the same name but a different arity, it will not suggest a defined function with a close-enough name, regardless of arity.
- OTP-19184
-
- Application(s):
- compiler, debugger, stdlib, syntax_tools
- Related Id(s):
Comprehensions have been extended with zip generators according to EEP 73.
Example:
1> [A+B || A <- [1,2,3] && B <- [4,5,6]]. [5,7,9]
- OTP-19198
-
Functionality making it possible for processes to enable reception of priority messages has been introduced in accordance with EEP 76.
- OTP-19314
-
The
erl -noshell
mode has been updated to have two sub modes calledraw
andcooked
, wherecooked
is the old default behaviour andraw
can be used to bypass the line-editing support of the native terminal. Usingraw
mode it is possible to read keystrokes as they happen without the user having to press Enter. Also, theraw
mode does not echo the typed characters to stdout. An example of how to create a tic-tac-toe game using this mechanism is included in the documentation. - OTP-19317
-
- Application(s):
- compiler, debugger, stdlib, syntax_tools
- Related Id(s):
New strict generators have been added for comprehensions.
The currently existing generators are “relaxed”: they ignore terms in the right-hand side expression that do not match the left-hand side pattern.
The new strict generators fail with exception
badmatch
if a pattern doesn’t match.Examples:
Using the current relaxed generator operator
<-
, any element not matching the pattern{_,_}
will be silently discarded:1> [T || {_,_}=T <- [{ok,1},ok,{error,2}]]. [{ok,1},{error,2}]
If the intention is that all lists processed by a list comprehension must only contain tuples of size two, using the new strict version of the operator ensures that term not matching will cause a crash:
2> [T || {_,_}=T <:- [{ok,1},ok,{error,2}]]. ** exception error: no match of right hand side value ok
Using the strict generator operator to mark the intention that all list elements must match the pattern could help finding mistakes quicker if something unpexected is added to the list processed by the generator.
The strict version for bitstring generators is
<:=
. - OTP-19337
-
The
join(Binaries, Separator)
function that joins a list of binaries has been added to thebinary
module. - OTP-19364
-
- Application(s):
- dialyzer, diameter, edoc, erts, eunit, kernel, mnesia, parsetools, runtime_tools, snmp
- Related Id(s):
EEP-69: Nominal Types has been implemented. As a side effect, nominal types can encode opaque types. We changed all opaque-handling logic and improved opaque warnings in Dialyzer.
All existing Erlang type systems are structural: two types are seen as equivalent if their structures are the same. Type comparisons are based on the structures of the types, not on how the user explicitly defines them. For example, in the following example,
meter()
andfoot()
are equivalent. The two types can be used interchangeably. Neither of them differ from the basic typeinteger()
.-type meter() :: integer(). -type foot() :: integer().
Nominal typing is an alternative type system, where two types are equivalent if and only if they are declared with the same type name. The EEP proposes one new syntax -nominal for declaring nominal types. Under nominal typing,
meter()
andfoot()
are no longer compatible. Whenever a function expects typemeter()
, passing in typefoot()
would result in a Dialyzer error.-nominal meter() :: integer(). -nominal foot() :: integer().
More nominal type-checking rules can be found in the EEP. It is worth noting that most work for adding nominal types and type-checking is in
erl_types.erl
. The rest are changes that removed the previous opaque type-checking, and added an improved version of it using nominal type-checking with reworked warnings.Backwards compatibility for opaque type-checking is not preserved by this PR. Previous opaque warnings can appear with slightly different wordings. A new kind of opaque warning
opaque_union
is added, together with a Dialyzer optionno_opaque_union
to turn this kind of warnings off. - OTP-19431
-
- POTENTIAL INCOMPATIBILITY
Module
re
has been updated to use PCRE2, which is mostly backward compatible with PCRE.The most noticeable incompatibilities are
- The default character encoding is pure ASCII and not Latin1. Unicode support
is still available with options
unicode
anducp
. - Options
bsr_anycrlf
,bsr_unicode
and{newline,_}
are only set when a regex is compiled and cannot be changed at matching for precompiled regex.
- OTP-19452
-
- Application(s):
- otp, stdlib
- Related Id(s):
It is now possible to use any base for floating point numbers as described in EEP 75: Based Floating Point Literals.
Computers represent floating point numbers in binary, but such numbers are typically printed using base ten, for example 0.314159265e1. To maintain exact bit-level precision when converting numbers to and from text, it is better to use a base that matches the internally used base, such as 16 for a compact but still exact representation, or 2 for visualizing or writing down the exact internal format. One particular case where such exact representations are useful is in code generating tools.
Examples:
> 2#0.111. 0.875 > 16#fefe.fefe#e16. 1.2041849337671418e24
- OTP-19477
-
- Application(s):
- stdlib
- Related Id(s):
- OTP-19502
-
- Application(s):
- compiler
- Related Id(s):
The compiler’s alias analysis pass is now both faster and less conservative, allowing optimizations of records and binary construction to be applied in more cases.
- OTP-19538
-
- Application(s):
- stdlib
- Related Id(s):
Line numbers used to be reported in the following way:
1> lists:last([]). ** exception error: no function clause matching lists:last([]) (lists.erl, line 389)
Starting from Erlang/OTP 28, line numbers are now reported in the following way:
1> lists:last([]). ** exception error: no function clause matching lists:last([]) (lists.erl:389)
- OTP-19553
-
SPDX 2.2 Source Software-Bill-Of-Materials for Erlang/OTP compliant with NTIA minimum requirements.
The SBOM contains a root package. Inside the root package there are multiple SPDX packages. Each SPDX package corresponds to an Erlang/OTP application and the Erlang runtime system (erts). Inside each package, there may be multiple packages, such as vendor dependency packages inside the erts SPDX package.
- OTP-19556
-
- Application(s):
- stdlib
- Related Id(s):
Added functions that produce utf-8 binaries instead of iolists. New functions are:
io_lib:bformat/2
,io_lib:bformat/3
,io_lib:bfwrite/2
,io_lib:bfwrite/3
,io_lib:bwrite/2
andio_lib:bwrite_string/3
. - OTP-19609
-
An experimental API for a native debugger has been added. The main components are the following:
- A new compiler option
beam_debug_info
for the Erlang compiler. When given, most optimizations are disabled and debug information suitable for the native debugger are added to generated BEAM files. - A new
+D
emulator flag. When given, the VM becomes “debuggable”, which means that when modules that been compiled with thebeam_debug_info
option are loaded, the code is instrumented so that one can enable and disable breakpoints on executable lines. - An experimental
erl_debugger
module with a new debugging API. Essentially, it allows a single, local, process to be registered as the “debugger” process for the node. This process is the one that will receive messages notifying that a process hit a breakpoint. This way, the front-end implementation of a debugger (such as edb from WhatApp) can be decoupled from OTP. - The
erl_debugger
module also exposes new BIFs to inspectX
andY
registers of a suspended process. Together with new code-information BIFs, this let’s a debugger show the values of variables in scope for a suspended process.
- A new compiler option
- OTP-19612
-
- POTENTIAL INCOMPATIBILITY
The ancient ASN.1 modules used in
public_key
has been replaced with more modern versions, but we have strived to keep the documented Erlang API for thepublic_key
application compatible. - OTP-19627
-
- Application(s):
- kernel
- Related Id(s):
-
GH-9722, OTP-19576
Removed the default values for SCTP send (sndbuf) and receive (recbuf) buffers.
Potential Incompatibilities #
- OTP-19233
-
- Application(s):
- stdlib
- Related Id(s):
proc_lib:stop/1,3
(and in extensiongen_server:stop/3
,gen_statem:stop/3
and so on) have been updated to not throw an error if the process to be stopped exits with the same reason as given toproc_lib:stop/3
. - OTP-19285
-
- Application(s):
- compiler, erts, stdlib
- Related Id(s):
The size of an atom in the Erlang source code was limited to 255 bytes in previous releases, meaning that an atom containing only emojis could contain only 63 emojis.
While atoms are still only allowed to contain 255 characters, the number of bytes is no longer limited.
External tools that parse the
AtU8
chunk of a BEAM file directly need to be updated. Tools that usebeam_lib:chunks(Beam, [atoms])
to read the atom table will continue to work. - OTP-19290
-
- Application(s):
- asn1
- Related Id(s):
The
undec_rest
option would be ignored in generated functions for exclusive decode. The option is now respected, meaning that the return value from such functions are now three-tuples instead of a two-tuples. - OTP-19323
-
The literals chunk in BEAM is no longer compressed, resulting in slightly smaller BEAM files when a BEAM file is stripped using
beam_lib:strip_files/1
.This is a potential incompatibility for tools that read and interpret the contents of the literal chunk. One way to update such tools to work with the new format is to retrieve the chunk using
beam_lib:chunks(Beam, [literals])
. - OTP-19355
-
- Application(s):
- common_test
- Related Id(s):
The
abort_if_missing_suites
option now defaults totrue
. If you prefer the old behavior, setabort_if_missing_suites
tofalse
in your test runs. - OTP-19420
-
- Application(s):
- ssh
- Related Id(s):
CBC algorithms are not offered by default. See Configuring algorithms in SSH if you wish to enable them.
- OTP-19431
-
- HIGHLIGHT
Module
re
has been updated to use PCRE2, which is mostly backward compatible with PCRE.The most noticeable incompatibilities are
- The default character encoding is pure ASCII and not Latin1. Unicode support
is still available with options
unicode
anducp
. - Options
bsr_anycrlf
,bsr_unicode
and{newline,_}
are only set when a regex is compiled and cannot be changed at matching for precompiled regex.
- OTP-19536
-
- Application(s):
- erts
- Related Id(s):
If a process being suspended using
erlang:suspend_process()
currently is waiting in areceive ... after
expression, the timer for the timeout will now also be suspended until the process is resumed. - OTP-19597
-
- Application(s):
- stdlib
- Related Id(s):
Change automatic hibernation of static supervisors so that they will hibernate after being idle for 1 second instead of only after starting, dynamic supervisors (simple_one_for_one) will not be hibernated at all. An option to the supervisor is added to make it configurable for the application. This option defaults to 1 second for static supervisors and to infinity for the simple_one_for_one supervisors.
- OTP-19612
-
- HIGHLIGHT
The ancient ASN.1 modules used in
public_key
has been replaced with more modern versions, but we have strived to keep the documented Erlang API for thepublic_key
application compatible. - OTP-19615
-
- Application(s):
- erts
- Related Id(s):
The socket option names for built-in socket options in the module
socket
has been cleaned up.Now, for known socket options, it is only the canonical protocol names that are allowed such as
ip
for the socket option{ip,recvtos}
. Previously, due to being a protocol alias;{'IP',recvtos}
was also allowed, as was the incorrect{hopopt,recvtos}
because the protocolhopopt
on Linux has the same protocol number asip
.So, to reduce confusion, all enumerated protocol names with the same number, are not allowed for the known protocol options, only the canonical name.
OTP-28.0 #
- OTP-19452
-
- HIGHLIGHT
It is now possible to use any base for floating point numbers as described in EEP 75: Based Floating Point Literals.
Computers represent floating point numbers in binary, but such numbers are typically printed using base ten, for example 0.314159265e1. To maintain exact bit-level precision when converting numbers to and from text, it is better to use a base that matches the internally used base, such as 16 for a compact but still exact representation, or 2 for visualizing or writing down the exact internal format. One particular case where such exact representations are useful is in code generating tools.
Examples:
> 2#0.111. 0.875 > 16#fefe.fefe#e16. 1.2041849337671418e24
- OTP-19478
-
Fixed licenses in files and added ORT curations to the following apps: otp, eldap, erl_interface, eunit, parsetools, stdlib, syntax_tools, and ERTS.
- OTP-19492
-
- Related Id(s):
Fixes the sarif generation in the scan code script
- OTP-19553
-
- HIGHLIGHT
SPDX 2.2 Source Software-Bill-Of-Materials for Erlang/OTP compliant with NTIA minimum requirements.
The SBOM contains a root package. Inside the root package there are multiple SPDX packages. Each SPDX package corresponds to an Erlang/OTP application and the Erlang runtime system (erts). Inside each package, there may be multiple packages, such as vendor dependency packages inside the erts SPDX package.
- OTP-19601
-
- Related Id(s):
Fixes wrong relationship order for SPDX packages and mistaken inclusion of erts documentation in the erts test SPDX package.
- OTP-19607
-
- Related Id(s):
sbom validates copyrights to be of a specific format, as defined in the LICENSE-HEADERS.md, which will prevent mistakes in copyrights
- OTP-19629
-
- Related Id(s):
SBOM produces package url as per the Erlang Ecosystem Foundation guidelines
asn1-5.4 #
- OTP-19290
-
- POTENTIAL INCOMPATIBILITY
The
undec_rest
option would be ignored in generated functions for exclusive decode. The option is now respected, meaning that the return value from such functions are now three-tuples instead of a two-tuples. - OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers. - OTP-19612
-
- HIGHLIGHT, POTENTIAL INCOMPATIBILITY
The ancient ASN.1 modules used in
public_key
has been replaced with more modern versions, but we have strived to keep the documented Erlang API for thepublic_key
application compatible.
Full runtime dependencies of asn1-5.4
erts-14.0, kernel-9.0, stdlib-5.0
common_test-1.28 #
- OTP-19485
-
- Related Id(s):
Replaced calls to deprecated
crypto:start()
withapplication:start(crypto)
. - OTP-19604
-
- Related Id(s):
Enhance specs of timeout for improving documentation and dialyzer analysis.
- OTP-19159
-
- Related Id(s):
The overage reports in HTML can be rendered in dark mode if requested by the user’s browser.
- OTP-19355
-
- POTENTIAL INCOMPATIBILITY
The
abort_if_missing_suites
option now defaults totrue
. If you prefer the old behavior, setabort_if_missing_suites
tofalse
in your test runs. - OTP-19478
-
Fixed licenses in files and added ORT curations to the following apps: otp, eldap, erl_interface, eunit, parsetools, stdlib, syntax_tools, and ERTS.
- OTP-19480
-
- Related Id(s):
Added support for compiling Erlang/OTP for Windows on ARM64.
- OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers.
Full runtime dependencies of common_test-1.28
compiler-6.0, crypto-4.5, debugger-4.1, erts-7.0, ftp-1.0, inets-6.0, kernel-8.4, observer-2.1, runtime_tools-1.8.16, sasl-2.5, snmp-5.1.2, ssh-4.0, stdlib-4.0, syntax_tools-1.7, tools-3.2, xmerl-1.3.8
compiler-9.0 #
- OTP-19141
-
The compiler will now emit warnings when some map patterns cannot possibly match because a previous clauses matches the same pattern. For example:
mm_1(#{}) -> a; mm_1(#{b := B}) -> {b,B}. mm_2(#{a := A}) -> {a,A}; mm_2(#{a := A, b := B}) -> {b,A,B}.
The second clause of these function can never match and the compiler will now emit a warning for both of them.
Note that the compiler is not guaranteed to emit warnings for every possible map pattern that cannot match.
- OTP-19285
-
- POTENTIAL INCOMPATIBILITY
The size of an atom in the Erlang source code was limited to 255 bytes in previous releases, meaning that an atom containing only emojis could contain only 63 emojis.
While atoms are still only allowed to contain 255 characters, the number of bytes is no longer limited.
External tools that parse the
AtU8
chunk of a BEAM file directly need to be updated. Tools that usebeam_lib:chunks(Beam, [atoms])
to read the atom table will continue to work. - OTP-19323
-
- POTENTIAL INCOMPATIBILITY
The literals chunk in BEAM is no longer compressed, resulting in slightly smaller BEAM files when a BEAM file is stripped using
beam_lib:strip_files/1
.This is a potential incompatibility for tools that read and interpret the contents of the literal chunk. One way to update such tools to work with the new format is to retrieve the chunk using
beam_lib:chunks(Beam, [atoms])
- OTP-19376
-
The final validation step in the compiler will now reject modules containing functions with more than 255 arguments. No impact is expected as the emulator has always refused to load these modules.
- OTP-19485
-
- Related Id(s):
Replaced calls to deprecated
crypto:start()
withapplication:start(crypto)
. - OTP-19574
-
- Related Id(s):
Refactor code to not rely on
+nowarn_shadow_vars
. - OTP-19096
-
- Related Id(s):
The EEP-48 doc chunk embedded into
.beam
files by the compiler is nowcompressed
anddeterministic
. - OTP-19115
-
- Related Id(s):
Provided that the map argument for a
maps:put/3
call is known to the compiler to be a map, the compiler will replace such calls with the corresponding update using the map syntax. - OTP-19180
-
- HIGHLIGHT
For various error types, the compiler now tries to suggest potential fixes by adding “did you mean …?” at the end of error messages.
When a function is used with wrong arity, the compiler will try to suggest a defined function with the same name but a different arity. For example, given the following module:
-module(typos). -export([t/0]). bar(A) -> A. bar(A,A,A) -> A. bar(A,A,A,A) -> A. t() -> bar(0, 0).
The compiler will emit the following message:
typo.erl:6:12: function bar/2 undefined, did you mean bar/1,3,4? % 6| t() -> bar(0, 0). % | ^
For compiler errors that can easily be caused by typos, the compiler will try to suggest what the correct variable or function name, could be. For example, given the following module:
-module(typos). -export([bar/2]). bar(A0, B0) -> A + B.
the compiler will emit the following error messages:
typos.erl:5:5: variable 'A' is unbound, did you mean 'A0'? % 5| A + B. % | ^ typos.erl:5:9: variable 'B' is unbound, did you mean 'B0'? % 5| A + B. % | ^
Error types that now suggest correct arities:
bad_inline
,undefined_nif
,bad_nowarn_unused_function
,bad_nowarn_bif_clash
,undefined_function
.Error types that now suggest correct names:
bad_inline
,undefined_nif
,bad_nowarn_unused_function
,undefined_on_load
,undefined_function
,undefined_record
,undefined_field
,unbound_var
.Using a function with wrong arity has higher precedence than having a typo in the function name. If the compiler can find a defined function with the same name but a different arity, it will not suggest a defined function with a close-enough name, regardless of arity.
- OTP-19184
-
- HIGHLIGHT
Comprehensions have been extended with zip generators according to EEP 73.
Example:
1> [A+B || A <- [1,2,3] && B <- [4,5,6]]. [5,7,9]
- OTP-19306
-
Documentation chunks (EEP-48) has been updated to include the following reserved metadata fields:
behaviours
,group
,source_path
, andsource_annos
. The compiler has also been updated to emit this metadata. See the EEP-48 documentation for more details. - OTP-19317
-
- HIGHLIGHT
New strict generators have been added for comprehensions.
The currently existing generators are “relaxed”: they ignore terms in the right-hand side expression that do not match the left-hand side pattern.
The new strict generators fail with exception
badmatch
if a pattern doesn’t match.Examples:
Using the current relaxed generator operator
<-
, any element not matching the pattern{_,_}
will be silently discarded:1> [T || {_,_}=T <- [{ok,1},ok,{error,2}]]. [{ok,1},{error,2}]
If the intention is that all lists processed by a list comprehension must only contain tuples of size two, using the new strict version of the operator ensures that term not matching will cause a crash:
2> [T || {_,_}=T <:- [{ok,1},ok,{error,2}]]. ** exception error: no match of right hand side value ok
Using the strict generator operator to mark the intention that all list elements must match the pattern could help finding mistakes quicker if something unpexected is added to the list processed by the generator.
The strict version for bitstring generators is
<:=
. - OTP-19334
-
New options for suppressing behaviour warnings have been added:
nowarn_conflicting_behaviours
nowarn_undefined_behaviour_func
nowarn_undefined_behaviour
nowarn_undefined_behaviour_callbacks
nowarn_ill_defined_behaviour_callbacks
nowarn_ill_defined_optional_callbacks
- OTP-19339
-
Some BIFs with side-effects are optimized in
try
/catch
in the same way as guard BIFs in order to gain performance.The following BIFs that are optimized in this way:
binary_to_atom/1
,binary_to_atom/2
,binary_to_existing_atom/1
,list_to_atom/1
, andlist_to_existing_atom/1
. - OTP-19394
-
- Related Id(s):
The compiler now converts known documentation attribute metadata entries from
unicode:chardata/0
tounicode:unicode_binary/0
. - OTP-19425
-
- Related Id(s):
The
warn_deprecated_catch
option enables warnings for use of old-style catch expressions on the formcatch Expr
instead of the moderntry ... catch ... end
. To prevent new uses of uses of old catches to be added, this compiler option can be enabled on the project level and-compile(nowarn_deprecated_catch).
added to individual files that still contain old catches. - OTP-19432
-
- Related Id(s):
Defining a fun in terms of an imported function is not allowed. Before this release, the compiler would not catch this kind of error if the name of the imported function happened to be a BIF. Consider this example:
-module(fun_example). -export([foo/0, bar/0]). -import(m, [max/2, not_a_bif/0]). foo() -> fun max/2. bar() -> fun not_a_bif/0.
The compiler in Erlang/OTP 27 would generate the following messages:
fun_example.erl:9:5: function not_a_bif/0 undefined % 9| fun not_a_bif/0. % | ^ fun_example.erl:3:2: Warning: import directive overrides auto-imported BIF max/2 -- use "-compile({no_auto_import,[max/2]})." to resolve name clash % 3| -import(m, [max/2, not_a_bif/0]). % | ^
That is, there would be a (cryptic) error for
fun not_a_bif/0
, but only a warning forfun max/2
.When compiling with this release, both attempts to create a fun will result in error messages (as well as a warning):
fun_example.erl:6:5: creating a fun from imported name max/2 is not allowed % 6| fun max/2. % | ^ fun_example.erl:9:5: creating a fun from imported name not_a_bif/0 is not allowed % 9| fun not_a_bif/0. % | ^ fun_example.erl:3:2: Warning: import directive overrides auto-imported BIF max/2 -- use "-compile({no_auto_import,[max/2]})." to resolve name clash % 3| -import(m, [max/2, not_a_bif/0]). % | ^
Also, attempting to call a local function having the same name as auto-imported BIF would result in an error if the BIF was added to Erlang/OTP before R14, and a warning for newer BIFs. This has been changed to always emit a warning. For example:
-module(bif_example). -export([bar/1]). bar(B) -> is_boolean(B). is_boolean(B) -> B =:= true orelse B =:= false.
will now result in the following warning instead of an error:
if_example.erl:5:5: Warning: ambiguous call of overridden auto-imported BIF is_boolean/1 -- use erlang:is_boolean/1 or "-compile({no_auto_import,[is_boolean/1]})." to resolve name clash % 5| is_boolean(B). % | ^
- OTP-19502
-
- HIGHLIGHT
The compiler’s alias analysis pass is now both faster and less conservative, allowing optimizations of records and binary construction to be applied in more cases.
- OTP-19524
-
- Related Id(s):
BEAM files no longer include a
Meta
chunk if there are no features used. That slightly decreases the size of BEAM files, and it also ensures thatm(Module)
andbeam_lib:md5(Beam)
will match for preloaded modules. - OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers. - OTP-19609
-
- HIGHLIGHT
An experimental API for a native debugger has been added. The main components are the following:
- A new compiler option
beam_debug_info
for the Erlang compiler. When given, most optimizations are disabled and debug information suitable for the native debugger are added to generated BEAM files. - A new
+D
emulator flag. When given, the VM becomes “debuggable”, which means that when modules that been compiled with thebeam_debug_info
option are loaded, the code is instrumented so that one can enable and disable breakpoints on executable lines. - An experimental
erl_debugger
module with a new debugging API. Essentially, it allows a single, local, process to be registered as the “debugger” process for the node. This process is the one that will receive messages notifying that a process hit a breakpoint. This way, the front-end implementation of a debugger (such as edb from WhatApp) can be decoupled from OTP. - The
erl_debugger
module also exposes new BIFs to inspectX
andY
registers of a suspended process. Together with new code-information BIFs, this let’s a debugger show the values of variables in scope for a suspended process.
Full runtime dependencies of compiler-9.0
crypto-5.1, erts-13.0, kernel-8.4, stdlib-6.0
crypto-5.6 #
- OTP-19500
-
- Related Id(s):
Fixed minor potential leak of EVP_MAC when
crypto
module is unloaded. - OTP-19554
-
Added copyright and license to crypto_ec_curves.erl
- OTP-19155
-
- Related Id(s):
The
crypto:start/0
,crypto:stop/0
, andcrypto:enable_fips_mode/1
functions have been deprecated. - OTP-19156
-
- Related Id(s):
Warnings are now logged if module
crypto
with FIPS-supported OpenSSL is loaded without applicationcrypto
being loaded. In this case FIPS will be disabled even if the user had set application parameterfips_mode
. - OTP-19426
-
- Related Id(s):
The functionality of
crypto:crypto_one_time_aead/6
is now also available in the new functionscrypto:crypto_one_time_aead_init/4
andcrypto:crypto_one_time_aead/4
, which makes it possible to reuse initialization. - OTP-19480
-
- Related Id(s):
Added support for compiling Erlang/OTP for Windows on ARM64.
- OTP-19487
-
New key
fips_provider_buildinfo
in map returned bycrypto:info/0
. If present, it contains the version of the FIPS provider which may be different than the version of the rest of OpenSSL. - OTP-19510
-
- Related Id(s):
Exported
crypto
typessha3()
,hmac_hash_algorithm()
andcmac_cipher_algorithm()
. - OTP-19519
-
- Related Id(s):
When compiling C/C++ code on Unix systems, the compiler hardening flags suggested by the Open Source Security Foundation are now enabled by default. To disable them, pass
--disable-security-hardening-flags
toconfigure
. - OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers.
Full runtime dependencies of crypto-5.6
erts-9.0, kernel-6.0, stdlib-3.9
debugger-6.0 #
- OTP-19484
-
Error handling has been improved when modules fail to load.
- OTP-19184
-
- HIGHLIGHT
Comprehensions have been extended with zip generators according to EEP 73.
Example:
1> [A+B || A <- [1,2,3] && B <- [4,5,6]]. [5,7,9]
- OTP-19317
-
- HIGHLIGHT
New strict generators have been added for comprehensions.
The currently existing generators are “relaxed”: they ignore terms in the right-hand side expression that do not match the left-hand side pattern.
The new strict generators fail with exception
badmatch
if a pattern doesn’t match.Examples:
Using the current relaxed generator operator
<-
, any element not matching the pattern{_,_}
will be silently discarded:1> [T || {_,_}=T <- [{ok,1},ok,{error,2}]]. [{ok,1},{error,2}]
If the intention is that all lists processed by a list comprehension must only contain tuples of size two, using the new strict version of the operator ensures that term not matching will cause a crash:
2> [T || {_,_}=T <:- [{ok,1},ok,{error,2}]]. ** exception error: no match of right hand side value ok
Using the strict generator operator to mark the intention that all list elements must match the pattern could help finding mistakes quicker if something unpexected is added to the list processed by the generator.
The strict version for bitstring generators is
<:=
. - OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers.
Full runtime dependencies of debugger-6.0
compiler-8.0, erts-15.0, kernel-10.0, stdlib-7.0, wx-2.0
dialyzer-5.4 #
- OTP-19262
-
The
-Wno_unknown
option will now prevent a warning being printed to standard output when the command line interface is used. - OTP-19364
-
- HIGHLIGHT
EEP-69: Nominal Types has been implemented. As a side effect, nominal types can encode opaque types. We changed all opaque-handling logic and improved opaque warnings in Dialyzer.
All existing Erlang type systems are structural: two types are seen as equivalent if their structures are the same. Type comparisons are based on the structures of the types, not on how the user explicitly defines them. For example, in the following example,
meter()
andfoot()
are equivalent. The two types can be used interchangeably. Neither of them differ from the basic typeinteger()
.-type meter() :: integer(). -type foot() :: integer().
Nominal typing is an alternative type system, where two types are equivalent if and only if they are declared with the same type name. The EEP proposes one new syntax -nominal for declaring nominal types. Under nominal typing,
meter()
andfoot()
are no longer compatible. Whenever a function expects typemeter()
, passing in typefoot()
would result in a Dialyzer error.-nominal meter() :: integer(). -nominal foot() :: integer().
More nominal type-checking rules can be found in the EEP. It is worth noting that most work for adding nominal types and type-checking is in
erl_types.erl
. The rest are changes that removed the previous opaque type-checking, and added an improved version of it using nominal type-checking with reworked warnings.Backwards compatibility for opaque type-checking is not preserved by this PR. Previous opaque warnings can appear with slightly different wordings. A new kind of opaque warning
opaque_union
is added, together with a Dialyzer optionno_opaque_union
to turn this kind of warnings off. - OTP-19478
-
Fixed licenses in files and added ORT curations to the following apps: otp, eldap, erl_interface, eunit, parsetools, stdlib, syntax_tools, and ERTS.
- OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers.
Full runtime dependencies of dialyzer-5.4
compiler-8.0, erts-12.0, kernel-8.0, stdlib-5.0, syntax_tools-2.0
diameter-2.5 #
- OTP-19620
-
- Related Id(s):
With this change diameter will not crash when decoding a DiameterURI without port number.
- OTP-19364
-
- HIGHLIGHT
EEP-69: Nominal Types has been implemented. As a side effect, nominal types can encode opaque types. We changed all opaque-handling logic and improved opaque warnings in Dialyzer.
All existing Erlang type systems are structural: two types are seen as equivalent if their structures are the same. Type comparisons are based on the structures of the types, not on how the user explicitly defines them. For example, in the following example,
meter()
andfoot()
are equivalent. The two types can be used interchangeably. Neither of them differ from the basic typeinteger()
.-type meter() :: integer(). -type foot() :: integer().
Nominal typing is an alternative type system, where two types are equivalent if and only if they are declared with the same type name. The EEP proposes one new syntax -nominal for declaring nominal types. Under nominal typing,
meter()
andfoot()
are no longer compatible. Whenever a function expects typemeter()
, passing in typefoot()
would result in a Dialyzer error.-nominal meter() :: integer(). -nominal foot() :: integer().
More nominal type-checking rules can be found in the EEP. It is worth noting that most work for adding nominal types and type-checking is in
erl_types.erl
. The rest are changes that removed the previous opaque type-checking, and added an improved version of it using nominal type-checking with reworked warnings.Backwards compatibility for opaque type-checking is not preserved by this PR. Previous opaque warnings can appear with slightly different wordings. A new kind of opaque warning
opaque_union
is added, together with a Dialyzer optionno_opaque_union
to turn this kind of warnings off. - OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers. - OTP-19621
-
- Related Id(s):
With this change diameter will not use slave terminology
Full runtime dependencies of diameter-2.5
erts-10.0, kernel-3.2, ssl-9.0, stdlib-5.0
edoc-1.4 #
- OTP-19574
-
- Related Id(s):
Refactor code to not rely on
+nowarn_shadow_vars
. - OTP-19364
-
- HIGHLIGHT
EEP-69: Nominal Types has been implemented. As a side effect, nominal types can encode opaque types. We changed all opaque-handling logic and improved opaque warnings in Dialyzer.
All existing Erlang type systems are structural: two types are seen as equivalent if their structures are the same. Type comparisons are based on the structures of the types, not on how the user explicitly defines them. For example, in the following example,
meter()
andfoot()
are equivalent. The two types can be used interchangeably. Neither of them differ from the basic typeinteger()
.-type meter() :: integer(). -type foot() :: integer().
Nominal typing is an alternative type system, where two types are equivalent if and only if they are declared with the same type name. The EEP proposes one new syntax -nominal for declaring nominal types. Under nominal typing,
meter()
andfoot()
are no longer compatible. Whenever a function expects typemeter()
, passing in typefoot()
would result in a Dialyzer error.-nominal meter() :: integer(). -nominal foot() :: integer().
More nominal type-checking rules can be found in the EEP. It is worth noting that most work for adding nominal types and type-checking is in
erl_types.erl
. The rest are changes that removed the previous opaque type-checking, and added an improved version of it using nominal type-checking with reworked warnings.Backwards compatibility for opaque type-checking is not preserved by this PR. Previous opaque warnings can appear with slightly different wordings. A new kind of opaque warning
opaque_union
is added, together with a Dialyzer optionno_opaque_union
to turn this kind of warnings off. - OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers.
Full runtime dependencies of edoc-1.4
erts-11.0, inets-5.10, kernel-7.0, stdlib-4.0, syntax_tools-2.0, xmerl-1.3.7
eldap-1.2.15 #
- OTP-19604
-
- Related Id(s):
Enhance specs of timeout for improving documentation and dialyzer analysis.
- OTP-19478
-
Fixed licenses in files and added ORT curations to the following apps: otp, eldap, erl_interface, eunit, parsetools, stdlib, syntax_tools, and ERTS.
- OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers.
Full runtime dependencies of eldap-1.2.15
asn1-3.0, erts-6.0, kernel-3.0, ssl-5.3.4, stdlib-3.4
erl_interface-5.6 #
- OTP-19478
-
Fixed licenses in files and added ORT curations to the following apps: otp, eldap, erl_interface, eunit, parsetools, stdlib, syntax_tools, and ERTS.
- OTP-19480
-
- Related Id(s):
Added support for compiling Erlang/OTP for Windows on ARM64.
- OTP-19519
-
- Related Id(s):
When compiling C/C++ code on Unix systems, the compiler hardening flags suggested by the Open Source Security Foundation are now enabled by default. To disable them, pass
--disable-security-hardening-flags
toconfigure
. - OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers. - OTP-19614
-
- Related Id(s):
Update of MD5 implementation from OpenSSL version 3.1.4 to 3.5.
- OTP-16607
-
- Related Id(s):
-
OTP-16608
The
ei
API for decoding/encoding terms is not fully 64-bit compatible since terms that have a representation on the external term format larger than 2 GB cannot be handled.
erts-16.0 #
- OTP-19144
-
- Related Id(s):
ETS tables with more than 2 billion keys are now supported.
- OTP-19259
-
- Related Id(s):
The zlib library included in Erlang/OTP has been updated to version 1.3.1.
- OTP-19263
-
- Related Id(s):
to_erl
no longer clears the screen when attaching to arun_erl
session. - OTP-19285
-
- POTENTIAL INCOMPATIBILITY
The size of an atom in the Erlang source code was limited to 255 bytes in previous releases, meaning that an atom containing only emojis could contain only 63 emojis.
While atoms are still only allowed to contain 255 characters, the number of bytes is no longer limited.
External tools that parse the
AtU8
chunk of a BEAM file directly need to be updated. Tools that usebeam_lib:chunks(Beam, [atoms])
to read the atom table will continue to work. - OTP-19295
-
- Related Id(s):
Fixed a bug where
erlc
would crash if its path contained spaces. - OTP-19313
-
The
-noshell
mode has been updated to read data lazily from standard input. Before this fix any data would be read greedily which meant that Erlang could consume data not meant for it. It also meant that in order forshell:start_interactive/0
to work on Windows an API that did not support reading of Unicode characters had to be used. - OTP-19323
-
- POTENTIAL INCOMPATIBILITY
The literals chunk in BEAM is no longer compressed, resulting in slightly smaller BEAM files when a BEAM file is stripped using
beam_lib:strip_files/1
.This is a potential incompatibility for tools that read and interpret the contents of the literal chunk. One way to update such tools to work with the new format is to retrieve the chunk using
beam_lib:chunks(Beam, [literals])
. - OTP-19453
-
- Related Id(s):
Fixed
erlang:localtime_to_universaltime/2
withIsDST
set totrue
and a timezone without daylight saving (for exampleUTC
) to assume that the provided localtime does not have DST. This has always been the behaviour, but glibc versions after 2.37 changed it so that the behavior in Erlang also changed. - OTP-19454
-
- Related Id(s):
Support for the
TZ
environment variable has been added on Windows. Before this change only the time zone configured in the OS was ever used. - OTP-19488
-
Suppressed various warnings when building the emulator with recent versions of GCC
- OTP-19507
-
Fixed a bug in re:run and re:compile where the pattern parameter would be read incorrectly if it was a sub-binary.
- OTP-19518
-
Fixed a broken makefile rule that made it so that
O2
and-O2
could not be part of the directory path when building Erlang/OTP. Bug has been present since R11B released 2006. - OTP-19532
-
- Related Id(s):
Fixed the index types of modules
atomics
andcounters
frominteger()
topos_integer()
, which is more correct. - OTP-19594
-
Fix
erl
flags+Q
,+P
and+t
to not allow values greater than 4294975487. Before this fix, the runtime would either truncate the value or crash depending on which value was given. - OTP-19615
-
- POTENTIAL INCOMPATIBILITY
The socket option names for built-in socket options in the module
socket
has been cleaned up.Now, for known socket options, it is only the canonical protocol names that are allowed such as
ip
for the socket option{ip,recvtos}
. Previously, due to being a protocol alias;{'IP',recvtos}
was also allowed, as was the incorrect{hopopt,recvtos}
because the protocolhopopt
on Linux has the same protocol number asip
.So, to reduce confusion, all enumerated protocol names with the same number, are not allowed for the known protocol options, only the canonical name.
- OTP-19617
-
- Related Id(s):
-
OTP-19482
On windows, socket:sendv could incorrectly return {ok, integer()} on Windows.
- OTP-19198
-
- HIGHLIGHT
Functionality making it possible for processes to enable reception of priority messages has been introduced in accordance with EEP 76.
- OTP-19271
-
- Related Id(s):
The
trace:system/3
function has been added. It has a similar interface aserlang:system_monitor/2
but it also supports trace sessions. - OTP-19278
-
Added support for
SIGWINCH
,SIGCONT
, andSIGINFO
signals toos:set_signal/2
where available. - OTP-19314
-
- HIGHLIGHT
The
erl -noshell
mode has been updated to have two sub modes calledraw
andcooked
, wherecooked
is the old default behaviour andraw
can be used to bypass the line-editing support of the native terminal. Usingraw
mode it is possible to read keystrokes as they happen without the user having to press Enter. Also, theraw
mode does not echo the typed characters to stdout. An example of how to create a tic-tac-toe game using this mechanism is included in the documentation. - OTP-19364
-
- HIGHLIGHT
EEP-69: Nominal Types has been implemented. As a side effect, nominal types can encode opaque types. We changed all opaque-handling logic and improved opaque warnings in Dialyzer.
All existing Erlang type systems are structural: two types are seen as equivalent if their structures are the same. Type comparisons are based on the structures of the types, not on how the user explicitly defines them. For example, in the following example,
meter()
andfoot()
are equivalent. The two types can be used interchangeably. Neither of them differ from the basic typeinteger()
.-type meter() :: integer(). -type foot() :: integer().
Nominal typing is an alternative type system, where two types are equivalent if and only if they are declared with the same type name. The EEP proposes one new syntax -nominal for declaring nominal types. Under nominal typing,
meter()
andfoot()
are no longer compatible. Whenever a function expects typemeter()
, passing in typefoot()
would result in a Dialyzer error.-nominal meter() :: integer(). -nominal foot() :: integer().
More nominal type-checking rules can be found in the EEP. It is worth noting that most work for adding nominal types and type-checking is in
erl_types.erl
. The rest are changes that removed the previous opaque type-checking, and added an improved version of it using nominal type-checking with reworked warnings.Backwards compatibility for opaque type-checking is not preserved by this PR. Previous opaque warnings can appear with slightly different wordings. A new kind of opaque warning
opaque_union
is added, together with a Dialyzer optionno_opaque_union
to turn this kind of warnings off. - OTP-19369
-
- Related Id(s):
Two BIFs have been added to the
erlang
module.erlang:processes_iterator/0
returns a process iterator that can be used to iterate through the process table.erlang:process_next/1
takes in a process iterator and returns a 2-tuple, consisting of a process identifier and a new process iterator. When the process iterator runs out of processes in the process table,none
will be returned.Using these BIFs to scan the processes scales better than using
erlang:processes/0
, at the cost of giving less consistency guarantees. Process identifiers returned from consecutive calls oferlang:process_next/1
may not be a consistent snapshot of all elements existing in the table during any of the calls. A process identifier is only guaranteed to be returned from a call toerlang:processes_next/1
if it was alive before the call toerlang:processes_iterator/0
and was still alive whenerlang:processes_next/1
returnednone
. - OTP-19386
-
Improved open debug for gen_tcp_socket (connect and listen) and gen_udp_socket (open).
- OTP-19431
-
- HIGHLIGHT, POTENTIAL INCOMPATIBILITY
Module
re
has been updated to use PCRE2, which is mostly backward compatible with PCRE.The most noticeable incompatibilities are
- The default character encoding is pure ASCII and not Latin1. Unicode support
is still available with options
unicode
anducp
. - Options
bsr_anycrlf
,bsr_unicode
and{newline,_}
are only set when a regex is compiled and cannot be changed at matching for precompiled regex.
- OTP-19450
-
- Related Id(s):
When booting the runtime system on a 32-bit computer with a single core, the boot code will try to minimize the peak memory use by disabling parallel loading of BEAM files.
- OTP-19451
-
- Related Id(s):
A
socket
option{otp,select_read}
has been added that enables keeping a socket in the VM select/poll set between calls to recv functions.This increases throughput by reducing the number of calls to said functions.
- OTP-19460
-
erlc
will now write compiler warnings and errors to standard error, instead of standard output, in common with other language compilers. - OTP-19465
-
- Related Id(s):
Fixed the Windows build to always include
.pdb
files for all DLLs and executables to help with debugging. - OTP-19472
-
- Related Id(s):
Improve the naming of the (internal) esock mutex(es). It is now possible to configure (as in autoconf) the use of simple names for the esock mutex(es).
- OTP-19473
-
An optimization for appending 0 bits to a binary was removed in patch releases for OTP versions 25, 26, and 27. This optimization has been reintroduced in Erlang/OTP 28.
- OTP-19478
-
Fixed licenses in files and added ORT curations to the following apps: otp, eldap, erl_interface, eunit, parsetools, stdlib, syntax_tools, and ERTS.
- OTP-19479
-
- Related Id(s):
When using
enif_select_read
(orenif_select
withERL_NIF_SELECT_READ
) on systems with kernel polling enabled (that is most Unix systems), file descriptors that are always re-enabled as soon as they trigger are now part of a specialized pollset just asdriver_select
. This reduces the CPU usage in such scenarios as the erts does not have to re-insert the FD everytime it it triggered. As a result of this optimizationsocket
based reading uses a lot less CPU and achieves a higher throughput. - OTP-19480
-
- Related Id(s):
Added support for compiling Erlang/OTP for Windows on ARM64.
- OTP-19481
-
- Related Id(s):
The Windows installer no longer creates the
erl.ini
file, making installations redistributable. - OTP-19503
-
- Related Id(s):
Added erlang:hibernate/0, which hibernates a process without discarding the stack.
- OTP-19509
-
- Related Id(s):
The asmjit library (used by BeamJIT) has been updated to version 029075b84bf0161a761beb63e6eda519a29020db.
- OTP-19519
-
- Related Id(s):
When compiling C/C++ code on Unix systems, the compiler hardening flags suggested by the Open Source Security Foundation are now enabled by default. To disable them, pass
--disable-security-hardening-flags
toconfigure
. - OTP-19536
-
- POTENTIAL INCOMPATIBILITY
If a process being suspended using
erlang:suspend_process()
currently is waiting in areceive ... after
expression, the timer for the timeout will now also be suspended until the process is resumed. - OTP-19539
-
- Related Id(s):
A test module for TLS distribution over
socket
has been implemented. - OTP-19541
-
- Related Id(s):
Upgrade pcre2 to 10.45
- OTP-19551
-
- Related Id(s):
The
+R
emulator options has been removed. It has had any effect since Erlang/OTP R9. - OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers. - OTP-19576
-
Increase the default inet-driver buffer size(s). Also introduce kernel parameters for UDP and SCTP to change the sizes when creating (those) sockets.
- OTP-19589
-
Add
+JPperfdirectory <dir>
for specifying which directory Erlang should place perf symbol information files. - OTP-19590
-
- Related Id(s):
Allow multiple static nifs to be part of the same archive. See the NIF documentation for details.
- OTP-19591
-
- Related Id(s):
Various improvements reducing lock contention on run queues due to task stealing.
- OTP-19603
-
- Related Id(s):
The new implementation has the same behavior as the previous one. The newer compilers already have native support for FP16, so this implementation is only relevant for older compilers. For this reason, the new implementation has not been tested for speed.
- OTP-19609
-
- HIGHLIGHT
An experimental API for a native debugger has been added. The main components are the following:
- A new compiler option
beam_debug_info
for the Erlang compiler. When given, most optimizations are disabled and debug information suitable for the native debugger are added to generated BEAM files. - A new
+D
emulator flag. When given, the VM becomes “debuggable”, which means that when modules that been compiled with thebeam_debug_info
option are loaded, the code is instrumented so that one can enable and disable breakpoints on executable lines. - An experimental
erl_debugger
module with a new debugging API. Essentially, it allows a single, local, process to be registered as the “debugger” process for the node. This process is the one that will receive messages notifying that a process hit a breakpoint. This way, the front-end implementation of a debugger (such as edb from WhatApp) can be decoupled from OTP. - The
erl_debugger
module also exposes new BIFs to inspectX
andY
registers of a suspended process. Together with new code-information BIFs, this let’s a debugger show the values of variables in scope for a suspended process.
- OTP-19613
-
- Related Id(s):
Update internal
ryu
implementation to use latest version. The new version is a little bit faster in some scenarios.ryu
is used byfloat_to_list/1
and similar functions to convert floats to strings. - OTP-19614
-
- Related Id(s):
Update of MD5 implementation from OpenSSL version 3.1.4 to 3.5.
- OTP-19618
-
Small optimization in binary_to_term by not allocating an unnecessary large native stack frame.
Full runtime dependencies of erts-16.0
kernel-9.0, sasl-3.3, stdlib-4.1
et-1.7.2 #
- OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers.
Full runtime dependencies of et-1.7.2
erts-9.0, kernel-5.3, runtime_tools-1.10, stdlib-3.4, wx-1.2
eunit-2.10 #
- OTP-19630
-
- Related Id(s):
Fix so that when running tests in parallel and one test is cancelled due to a failing setup, it is report as cancelled. Before this fix the cancellation was ignored.
- OTP-19364
-
- HIGHLIGHT
EEP-69: Nominal Types has been implemented. As a side effect, nominal types can encode opaque types. We changed all opaque-handling logic and improved opaque warnings in Dialyzer.
All existing Erlang type systems are structural: two types are seen as equivalent if their structures are the same. Type comparisons are based on the structures of the types, not on how the user explicitly defines them. For example, in the following example,
meter()
andfoot()
are equivalent. The two types can be used interchangeably. Neither of them differ from the basic typeinteger()
.-type meter() :: integer(). -type foot() :: integer().
Nominal typing is an alternative type system, where two types are equivalent if and only if they are declared with the same type name. The EEP proposes one new syntax -nominal for declaring nominal types. Under nominal typing,
meter()
andfoot()
are no longer compatible. Whenever a function expects typemeter()
, passing in typefoot()
would result in a Dialyzer error.-nominal meter() :: integer(). -nominal foot() :: integer().
More nominal type-checking rules can be found in the EEP. It is worth noting that most work for adding nominal types and type-checking is in
erl_types.erl
. The rest are changes that removed the previous opaque type-checking, and added an improved version of it using nominal type-checking with reworked warnings.Backwards compatibility for opaque type-checking is not preserved by this PR. Previous opaque warnings can appear with slightly different wordings. A new kind of opaque warning
opaque_union
is added, together with a Dialyzer optionno_opaque_union
to turn this kind of warnings off. - OTP-19478
-
Fixed licenses in files and added ORT curations to the following apps: otp, eldap, erl_interface, eunit, parsetools, stdlib, syntax_tools, and ERTS.
- OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers.
Full runtime dependencies of eunit-2.10
erts-9.0, kernel-5.3, stdlib-3.4
ftp-1.2.4 #
- OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers.
Full runtime dependencies of ftp-1.2.4
erts-7.0, kernel-6.0, runtime_tools-1.15.1, ssl-10.2, stdlib-3.5
inets-9.4 #
- OTP-19485
-
- Related Id(s):
Replaced calls to deprecated
crypto:start()
withapplication:start(crypto)
. - OTP-19604
-
- Related Id(s):
Enhance specs of timeout for improving documentation and dialyzer analysis.
- OTP-19520
-
- Related Id(s):
Enhanced http client documentation.
- OTP-19521
-
- Related Id(s):
Enhance made to mod_esi documentation
- OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers. - OTP-19624
-
- Related Id(s):
Inets Makefiles now create and use dependencies files for .erl files
Full runtime dependencies of inets-9.4
erts-14.0, kernel-9.0, mnesia-4.12, public_key-1.13, runtime_tools-1.8.14, ssl-9.0, stdlib-5.0, stdlib-6.0
jinterface-1.15 #
- OTP-19308
-
- Related Id(s):
The
.class
files of jinterface are now part of the prebuilt archive using Java 8. - OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers.
kernel-10.3 #
- OTP-19228
-
- Related Id(s):
Fixed an issue where output to the shell would not print the prompt on a new line.
- OTP-19296
-
- Related Id(s):
When in
shell
is in-noshell
mode, and inlatin1
encoding mode, io requests in latin1 encoding will not be translated to unicode and back to latin1. - OTP-19297
-
- Related Id(s):
Fixed a bug where a composing unicode character would bind to a character not available to the user and deleting that character would cause a crash.
- OTP-19313
-
The
-noshell
mode has been updated to read data lazily from standard input. Before this fix any data would be read greedily which meant that Erlang could consume data not meant for it. It also meant that in order forshell:start_interactive/0
to work on Windows an API that did not support reading of Unicode characters had to be used. - OTP-19414
-
- Related Id(s):
The Erlang shell no longer crashes when a shell prompt ends with an escape sequence.
- OTP-19513
-
- Related Id(s):
code:get_doc/1
now works for cover-compiled modules. - OTP-19544
-
- Related Id(s):
-
PR-9587, OTP-19545
An infinite loop in CNAME loop detection that can cause Out Of Memory has been fixed. This affected CNAME lookup with the internal DNS resolver.
- OTP-19555
-
- Related Id(s):
The internal resolver framework has been fixed to wait with the first resolver lookup until the ERL_INETRC environment variable has been applied.
Previously, on some platform(s) (Linux) a first lookup when figuring out the domain name was always placed on the
native
resolver even if ERL_INETRC was used to disable it. - OTP-19588
-
Fix
logger:add_handler(default, ...)
to correctly replay events generated during startup when the default logger is set toundefined
in logger’s configuration parameters. - OTP-19604
-
- Related Id(s):
Enhance specs of timeout for improving documentation and dialyzer analysis.
- OTP-19627
-
- HIGHLIGHT
Removed the default values for SCTP send (sndbuf) and receive (recbuf) buffers.
- OTP-19194
-
- Related Id(s):
application:load/1
slows down as the number of directories in the code path increases because the call tocode:where_is_file/1
for the ‘.app’ file must scan each directory for the app.code_server
maintains a cache of the contents of directories in the path. Re-using that cache when searching for ‘.app’ files inapplication:load/1
may improve its runtime, especially when loading multiple applications. - OTP-19226
-
- Related Id(s):
The
Erlang SSH daemon
now uses the same backend to handle multiline functionality as the Erlang shell. - OTP-19278
-
Added support for
SIGWINCH
,SIGCONT
, andSIGINFO
signals toos:set_signal/2
where available. - OTP-19287
-
- Related Id(s):
Add
net_kernel:allowed/0
, it returns a list of nodes that are explicitly allowed to connect to the node by callingnet_kernel:allow/1
- OTP-19306
-
Documentation chunks (EEP-48) has been updated to include the following reserved metadata fields:
behaviours
,group
,source_path
, andsource_annos
. The compiler has also been updated to emit this metadata. See the EEP-48 documentation for more details. - OTP-19343
-
- Related Id(s):
The
erpc:call/3
,erpc:call/5
,erpc:multicall/3
, anderpc:multicall/5
functions now also accept an option map as last argument containing thetimeout
andalways_spawn
options. Thealways_spawn
option can be used in order to ensure that the call operation will use a newly spawned process when executing the remote call. - OTP-19364
-
- HIGHLIGHT
EEP-69: Nominal Types has been implemented. As a side effect, nominal types can encode opaque types. We changed all opaque-handling logic and improved opaque warnings in Dialyzer.
All existing Erlang type systems are structural: two types are seen as equivalent if their structures are the same. Type comparisons are based on the structures of the types, not on how the user explicitly defines them. For example, in the following example,
meter()
andfoot()
are equivalent. The two types can be used interchangeably. Neither of them differ from the basic typeinteger()
.-type meter() :: integer(). -type foot() :: integer().
Nominal typing is an alternative type system, where two types are equivalent if and only if they are declared with the same type name. The EEP proposes one new syntax -nominal for declaring nominal types. Under nominal typing,
meter()
andfoot()
are no longer compatible. Whenever a function expects typemeter()
, passing in typefoot()
would result in a Dialyzer error.-nominal meter() :: integer(). -nominal foot() :: integer().
More nominal type-checking rules can be found in the EEP. It is worth noting that most work for adding nominal types and type-checking is in
erl_types.erl
. The rest are changes that removed the previous opaque type-checking, and added an improved version of it using nominal type-checking with reworked warnings.Backwards compatibility for opaque type-checking is not preserved by this PR. Previous opaque warnings can appear with slightly different wordings. A new kind of opaque warning
opaque_union
is added, together with a Dialyzer optionno_opaque_union
to turn this kind of warnings off. - OTP-19386
-
Improved open debug for gen_tcp_socket (connect and listen) and gen_udp_socket (open).
- OTP-19401
-
- Related Id(s):
t:io:standard_error/0
has been updated to write via a NIF API instead of a port. This allows it to access the dirty-scheduler pool and make sure that writes have been written to the OSsstderr
whenio:format/3
and equivalent return. - OTP-19404
-
- Related Id(s):
Added the option
exception_on_failure
toos:cmd/2
to makeos:cmd/2
raise an exception if the command fails to execute. - OTP-19451
-
- Related Id(s):
A
socket
option{otp,select_read}
has been added that enables keeping a socket in the VM select/poll set between calls to recv functions.This increases throughput by reducing the number of calls to said functions.
- OTP-19522
-
- Related Id(s):
Add a configure chapter to the socket usage guide
- OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers. - OTP-19576
-
Increase the default inet-driver buffer size(s). Also introduce kernel parameters for UDP and SCTP to change the sizes when creating (those) sockets.
- OTP-19609
-
- HIGHLIGHT
An experimental API for a native debugger has been added. The main components are the following:
- A new compiler option
beam_debug_info
for the Erlang compiler. When given, most optimizations are disabled and debug information suitable for the native debugger are added to generated BEAM files. - A new
+D
emulator flag. When given, the VM becomes “debuggable”, which means that when modules that been compiled with thebeam_debug_info
option are loaded, the code is instrumented so that one can enable and disable breakpoints on executable lines. - An experimental
erl_debugger
module with a new debugging API. Essentially, it allows a single, local, process to be registered as the “debugger” process for the node. This process is the one that will receive messages notifying that a process hit a breakpoint. This way, the front-end implementation of a debugger (such as edb from WhatApp) can be decoupled from OTP. - The
erl_debugger
module also exposes new BIFs to inspectX
andY
registers of a suspended process. Together with new code-information BIFs, this let’s a debugger show the values of variables in scope for a suspended process.
Full runtime dependencies of kernel-10.3
crypto-5.0, erts-15.2.5, sasl-3.0, stdlib-6.0
megaco-4.8 #
- OTP-19523
-
Add missing spec and doc for exported functions.
- OTP-19403
-
Nano seconds are now used for (example) meas result presentation.
Nanoseconds are now used, for example, in
meas
result presentations. - OTP-19480
-
- Related Id(s):
Added support for compiling Erlang/OTP for Windows on ARM64.
- OTP-19519
-
- Related Id(s):
When compiling C/C++ code on Unix systems, the compiler hardening flags suggested by the Open Source Security Foundation are now enabled by default. To disable them, pass
--disable-security-hardening-flags
toconfigure
. - OTP-19570
-
Add copyright notice to files that still had none.
- OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers. - OTP-19598
-
Tweaked some of the meas examples in order to make them benchmark compatible.
Full runtime dependencies of megaco-4.8
asn1-3.0, debugger-4.0, erts-12.0, et-1.5, kernel-8.0, runtime_tools-1.8.14, stdlib-2.5
mnesia-4.24 #
- OTP-19364
-
- HIGHLIGHT
EEP-69: Nominal Types has been implemented. As a side effect, nominal types can encode opaque types. We changed all opaque-handling logic and improved opaque warnings in Dialyzer.
All existing Erlang type systems are structural: two types are seen as equivalent if their structures are the same. Type comparisons are based on the structures of the types, not on how the user explicitly defines them. For example, in the following example,
meter()
andfoot()
are equivalent. The two types can be used interchangeably. Neither of them differ from the basic typeinteger()
.-type meter() :: integer(). -type foot() :: integer().
Nominal typing is an alternative type system, where two types are equivalent if and only if they are declared with the same type name. The EEP proposes one new syntax -nominal for declaring nominal types. Under nominal typing,
meter()
andfoot()
are no longer compatible. Whenever a function expects typemeter()
, passing in typefoot()
would result in a Dialyzer error.-nominal meter() :: integer(). -nominal foot() :: integer().
More nominal type-checking rules can be found in the EEP. It is worth noting that most work for adding nominal types and type-checking is in
erl_types.erl
. The rest are changes that removed the previous opaque type-checking, and added an improved version of it using nominal type-checking with reworked warnings.Backwards compatibility for opaque type-checking is not preserved by this PR. Previous opaque warnings can appear with slightly different wordings. A new kind of opaque warning
opaque_union
is added, together with a Dialyzer optionno_opaque_union
to turn this kind of warnings off. - OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers.
Full runtime dependencies of mnesia-4.24
erts-9.0, kernel-5.3, stdlib-5.0
observer-2.18 #
- OTP-19604
-
- Related Id(s):
Enhance specs of timeout for improving documentation and dialyzer analysis.
- OTP-19528
-
- Related Id(s):
With this change etop from observer application will scroll as top from shell
- OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers.
Full runtime dependencies of observer-2.18
erts-15.0, et-1.5, kernel-10.0, runtime_tools-2.1, stdlib-5.0, wx-2.3
odbc-2.16 #
- OTP-19604
-
- Related Id(s):
Enhance specs of timeout for improving documentation and dialyzer analysis.
- OTP-19456
-
- Related Id(s):
Updated odbc configure to enable easier use of iodbc driver.
- OTP-19480
-
- Related Id(s):
Added support for compiling Erlang/OTP for Windows on ARM64.
- OTP-19519
-
- Related Id(s):
When compiling C/C++ code on Unix systems, the compiler hardening flags suggested by the Open Source Security Foundation are now enabled by default. To disable them, pass
--disable-security-hardening-flags
toconfigure
. - OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers.
Full runtime dependencies of odbc-2.16
erts-6.0, kernel-3.0, stdlib-2.0
os_mon-2.11 #
- OTP-19604
-
- Related Id(s):
Enhance specs of timeout for improving documentation and dialyzer analysis.
- OTP-19207
-
- Related Id(s):
m:disksup
will now recognize HAMMER2 volumes. - OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers.
Full runtime dependencies of os_mon-2.11
erts-14.0, kernel-9.0, sasl-4.2.1, stdlib-5.0
parsetools-2.7 #
- OTP-19364
-
- HIGHLIGHT
EEP-69: Nominal Types has been implemented. As a side effect, nominal types can encode opaque types. We changed all opaque-handling logic and improved opaque warnings in Dialyzer.
All existing Erlang type systems are structural: two types are seen as equivalent if their structures are the same. Type comparisons are based on the structures of the types, not on how the user explicitly defines them. For example, in the following example,
meter()
andfoot()
are equivalent. The two types can be used interchangeably. Neither of them differ from the basic typeinteger()
.-type meter() :: integer(). -type foot() :: integer().
Nominal typing is an alternative type system, where two types are equivalent if and only if they are declared with the same type name. The EEP proposes one new syntax -nominal for declaring nominal types. Under nominal typing,
meter()
andfoot()
are no longer compatible. Whenever a function expects typemeter()
, passing in typefoot()
would result in a Dialyzer error.-nominal meter() :: integer(). -nominal foot() :: integer().
More nominal type-checking rules can be found in the EEP. It is worth noting that most work for adding nominal types and type-checking is in
erl_types.erl
. The rest are changes that removed the previous opaque type-checking, and added an improved version of it using nominal type-checking with reworked warnings.Backwards compatibility for opaque type-checking is not preserved by this PR. Previous opaque warnings can appear with slightly different wordings. A new kind of opaque warning
opaque_union
is added, together with a Dialyzer optionno_opaque_union
to turn this kind of warnings off. - OTP-19478
-
Fixed licenses in files and added ORT curations to the following apps: otp, eldap, erl_interface, eunit, parsetools, stdlib, syntax_tools, and ERTS.
- OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers.
Full runtime dependencies of parsetools-2.7
erts-6.0, kernel-3.0, stdlib-3.4
public_key-1.18 #
- OTP-19616
-
Enable public_key to decode legacy certs using md2 hash.
- OTP-19519
-
- Related Id(s):
When compiling C/C++ code on Unix systems, the compiler hardening flags suggested by the Open Source Security Foundation are now enabled by default. To disable them, pass
--disable-security-hardening-flags
toconfigure
. - OTP-19573
-
Ignore instead of crashing unhandled entries when loading CA-certificates.
- OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers. - OTP-19612
-
- HIGHLIGHT, POTENTIAL INCOMPATIBILITY
The ancient ASN.1 modules used in
public_key
has been replaced with more modern versions, but we have strived to keep the documented Erlang API for thepublic_key
application compatible.
Full runtime dependencies of public_key-1.18
asn1-5.0, crypto-5.0, erts-13.0, kernel-8.0, stdlib-4.0
reltool-1.0.2 #
- OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers.
Full runtime dependencies of reltool-1.0.2
erts-15.0, kernel-9.0, sasl-4.2.1, stdlib-5.0, tools-2.6.14, wx-2.3
runtime_tools-2.2 #
- OTP-19364
-
- HIGHLIGHT
EEP-69: Nominal Types has been implemented. As a side effect, nominal types can encode opaque types. We changed all opaque-handling logic and improved opaque warnings in Dialyzer.
All existing Erlang type systems are structural: two types are seen as equivalent if their structures are the same. Type comparisons are based on the structures of the types, not on how the user explicitly defines them. For example, in the following example,
meter()
andfoot()
are equivalent. The two types can be used interchangeably. Neither of them differ from the basic typeinteger()
.-type meter() :: integer(). -type foot() :: integer().
Nominal typing is an alternative type system, where two types are equivalent if and only if they are declared with the same type name. The EEP proposes one new syntax -nominal for declaring nominal types. Under nominal typing,
meter()
andfoot()
are no longer compatible. Whenever a function expects typemeter()
, passing in typefoot()
would result in a Dialyzer error.-nominal meter() :: integer(). -nominal foot() :: integer().
More nominal type-checking rules can be found in the EEP. It is worth noting that most work for adding nominal types and type-checking is in
erl_types.erl
. The rest are changes that removed the previous opaque type-checking, and added an improved version of it using nominal type-checking with reworked warnings.Backwards compatibility for opaque type-checking is not preserved by this PR. Previous opaque warnings can appear with slightly different wordings. A new kind of opaque warning
opaque_union
is added, together with a Dialyzer optionno_opaque_union
to turn this kind of warnings off. - OTP-19519
-
- Related Id(s):
When compiling C/C++ code on Unix systems, the compiler hardening flags suggested by the Open Source Security Foundation are now enabled by default. To disable them, pass
--disable-security-hardening-flags
toconfigure
. - OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers. - OTP-19584
-
- Related Id(s):
With this change observer will use cheaper iterators to avoid locking when not necessary.
Full runtime dependencies of runtime_tools-2.2
erts-16.0, kernel-10.0, mnesia-4.12, stdlib-6.0
sasl-4.3 #
- OTP-19279
-
Fixed the documentation for the ExtraFiles option to
systools:make_tar/2
. - OTP-19398
-
- Related Id(s):
.appup
files are now included in releases in order to make it possible to create upgrade packages from an installed release. - OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers.
Full runtime dependencies of sasl-4.3
erts-15.0, kernel-6.0, stdlib-4.0, tools-2.6.14
snmp-5.19 #
- OTP-19364
-
- HIGHLIGHT
EEP-69: Nominal Types has been implemented. As a side effect, nominal types can encode opaque types. We changed all opaque-handling logic and improved opaque warnings in Dialyzer.
All existing Erlang type systems are structural: two types are seen as equivalent if their structures are the same. Type comparisons are based on the structures of the types, not on how the user explicitly defines them. For example, in the following example,
meter()
andfoot()
are equivalent. The two types can be used interchangeably. Neither of them differ from the basic typeinteger()
.-type meter() :: integer(). -type foot() :: integer().
Nominal typing is an alternative type system, where two types are equivalent if and only if they are declared with the same type name. The EEP proposes one new syntax -nominal for declaring nominal types. Under nominal typing,
meter()
andfoot()
are no longer compatible. Whenever a function expects typemeter()
, passing in typefoot()
would result in a Dialyzer error.-nominal meter() :: integer(). -nominal foot() :: integer().
More nominal type-checking rules can be found in the EEP. It is worth noting that most work for adding nominal types and type-checking is in
erl_types.erl
. The rest are changes that removed the previous opaque type-checking, and added an improved version of it using nominal type-checking with reworked warnings.Backwards compatibility for opaque type-checking is not preserved by this PR. Previous opaque warnings can appear with slightly different wordings. A new kind of opaque warning
opaque_union
is added, together with a Dialyzer optionno_opaque_union
to turn this kind of warnings off. - OTP-19480
-
- Related Id(s):
Added support for compiling Erlang/OTP for Windows on ARM64.
- OTP-19519
-
- Related Id(s):
When compiling C/C++ code on Unix systems, the compiler hardening flags suggested by the Open Source Security Foundation are now enabled by default. To disable them, pass
--disable-security-hardening-flags
toconfigure
. - OTP-19572
-
Add copyright notice to files that still had none.
- OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers.
Full runtime dependencies of snmp-5.19
crypto-4.6, erts-12.0, kernel-8.0, mnesia-4.12, runtime_tools-1.8.14, stdlib-5.0
ssh-5.3 #
- OTP-19324
-
The implementation of the ssh server-side supervision tree has been improved.
- OTP-19566
-
- Related Id(s):
SSH daemon accepts fun as tcpip_tunnel_in option. This provides more control over TCP connection tunnel handle by server.
- OTP-19226
-
- Related Id(s):
The
Erlang SSH daemon
now uses the same backend to handle multiline functionality as the Erlang shell. - OTP-19420
-
- POTENTIAL INCOMPATIBILITY
CBC algorithms are not offered by default. See Configuring algorithms in SSH if you wish to enable them.
- OTP-19535
-
- Related Id(s):
Daemon can be configured (bannerfun option) to send banner message at the beginning of user authentication.
- OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers. - OTP-19586
-
- Related Id(s):
For interoperability reasons, SSH ignore message with no length specified is treated as message with zero length specified - it will not cause decode error.
- OTP-19596
-
- Related Id(s):
Documentation improvements.
Full runtime dependencies of ssh-5.3
crypto-5.0, erts-14.0, kernel-10.3, public_key-1.6.1, runtime_tools-1.15.1, stdlib-5.0, stdlib-6.0
ssl-11.3 #
- OTP-19367
-
- Related Id(s):
Refactoring, minor optimizations and improved log printouts.
- OTP-19406
-
- Related Id(s):
supervisor:which_child/2
is now used to make start-up code for TLS-connections simpler and more straight forward, and to increase stability and maintainability of the ssl application. - OTP-19430
-
- Related Id(s):
The data handling for tls-v1.3 has been optimized.
- OTP-19463
-
- Related Id(s):
Added experimental socket support.
- OTP-19531
-
- Related Id(s):
Improve code health by removing dead code.
- OTP-19539
-
- Related Id(s):
A test module for TLS distribution over
socket
has been implemented. - OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers.
Full runtime dependencies of ssl-11.3
crypto-5.6, erts-16.0, inets-5.10.7, kernel-10.3, public_key-1.16.4, runtime_tools-1.15.1, stdlib-7.0
stdlib-7.0 #
- OTP-19161
-
- Related Id(s):
Shell help now orders the commands in alphabetical order.
- OTP-19233
-
- POTENTIAL INCOMPATIBILITY
proc_lib:stop/1,3
(and in extensiongen_server:stop/3
,gen_statem:stop/3
and so on) have been updated to not throw an error if the process to be stopped exits with the same reason as given toproc_lib:stop/3
. - OTP-19285
-
- POTENTIAL INCOMPATIBILITY
The size of an atom in the Erlang source code was limited to 255 bytes in previous releases, meaning that an atom containing only emojis could contain only 63 emojis.
While atoms are still only allowed to contain 255 characters, the number of bytes is no longer limited.
External tools that parse the
AtU8
chunk of a BEAM file directly need to be updated. Tools that usebeam_lib:chunks(Beam, [atoms])
to read the atom table will continue to work. - OTP-19303
-
- Related Id(s):
argparse:help/1
now acceptsunicode:chardata/0
. - OTP-19323
-
- POTENTIAL INCOMPATIBILITY
The literals chunk in BEAM is no longer compressed, resulting in slightly smaller BEAM files when a BEAM file is stripped using
beam_lib:strip_files/1
.This is a potential incompatibility for tools that read and interpret the contents of the literal chunk. One way to update such tools to work with the new format is to retrieve the chunk using
beam_lib:chunks(Beam, [atoms])
- OTP-19393
-
- Related Id(s):
The previous
digraph_utils:preorder/1
anddigraph_utils:postorder/1
did not start the traversal from root nodes. This fix makes both traversals only start or restart from a root node in one of the components, or an arbitrary node if no root node can be visited. - OTP-19413
-
- Related Id(s):
Auto-completion in the shell is now significantly faster for function parameters that uses complex custom types.
- OTP-19421
-
Stringfying a non-latin1 atom will now produce a readable string instead of encoding each character using
\x{...}
escape sequences. Example:-define(S(T), ??T). atom() -> ?S('атом').
The
atom/0
function now returns"'атом'"
instead of"'\\x{430}\\x{442}\\x{43E}\\x{43C}'"
. - OTP-19422
-
- Related Id(s):
A few minor issues were corrected in
syntax_tools
, as well in theerl_anno
module. - OTP-19427
-
m:dets
could print error messages to standard output when repairing DETS files. This has been changed to send the messages tologger
.ets:fun2ms
would print an error message to standard output as well as returning an error tuple. The printing of the message has been removed. - OTP-19441
-
The functions for converting to and from the RFC1339 date and time format would not properly handle fractional seconds for negative times.
- OTP-19485
-
- Related Id(s):
Replaced calls to deprecated
crypto:start()
withapplication:start(crypto)
. - OTP-19511
-
- Related Id(s):
Fixed a bug when calling shell completion on a reserved word followed by a ( would crash the shell.
- OTP-19514
-
- Related Id(s):
Corrected the spec of
ets:update_element/4
. - OTP-19515
-
- Related Id(s):
Corrected the spec for
ets:info/1
. - OTP-19533
-
- Related Id(s):
Fixed crash when defining records with a string field in the shell
- OTP-19540
-
- Related Id(s):
Details in the hibernation implementation and time-out handling has been improved for
gen_statem
. In particular to avoid selective receive when cancelling a time-out. - OTP-19583
-
- Related Id(s):
Fixed a bug when getting help on a module compiled without debug_info.
- OTP-19593
-
Fix
zip
extraction to wrap invalid DOS timestamps to their correct value instead of returning the actual value. Before this fix the timestamp returned could have a second greater than 59. The bug has been present since Erlang/OTP 27.1. - OTP-19604
-
- Related Id(s):
Enhance specs of timeout for improving documentation and dialyzer analysis.
- OTP-19125
-
- Related Id(s):
Singleton type variables in an union type do not make sense from Dialyzer’s point of view. The following example is ill-typed:
-spec run_test(Opts) -> term() when Opts :: {join_specs, Bool} | {test, Bool}.
This used to be reported as a warning. In OTP-28, this is an error
- OTP-19127
-
- Related Id(s):
By default, sets created by the
sets
module will now be represented as maps. - OTP-19180
-
- HIGHLIGHT
For various error types, the compiler now tries to suggest potential fixes by adding “did you mean …?” at the end of error messages.
When a function is used with wrong arity, the compiler will try to suggest a defined function with the same name but a different arity. For example, given the following module:
-module(typos). -export([t/0]). bar(A) -> A. bar(A,A,A) -> A. bar(A,A,A,A) -> A. t() -> bar(0, 0).
The compiler will emit the following message:
typo.erl:6:12: function bar/2 undefined, did you mean bar/1,3,4? % 6| t() -> bar(0, 0). % | ^
For compiler errors that can easily be caused by typos, the compiler will try to suggest what the correct variable or function name, could be. For example, given the following module:
-module(typos). -export([bar/2]). bar(A0, B0) -> A + B.
the compiler will emit the following error messages:
typos.erl:5:5: variable 'A' is unbound, did you mean 'A0'? % 5| A + B. % | ^ typos.erl:5:9: variable 'B' is unbound, did you mean 'B0'? % 5| A + B. % | ^
Error types that now suggest correct arities:
bad_inline
,undefined_nif
,bad_nowarn_unused_function
,bad_nowarn_bif_clash
,undefined_function
.Error types that now suggest correct names:
bad_inline
,undefined_nif
,bad_nowarn_unused_function
,undefined_on_load
,undefined_function
,undefined_record
,undefined_field
,unbound_var
.Using a function with wrong arity has higher precedence than having a typo in the function name. If the compiler can find a defined function with the same name but a different arity, it will not suggest a defined function with a close-enough name, regardless of arity.
- OTP-19184
-
- HIGHLIGHT
Comprehensions have been extended with zip generators according to EEP 73.
Example:
1> [A+B || A <- [1,2,3] && B <- [4,5,6]]. [5,7,9]
- OTP-19204
-
- Related Id(s):
Before restarting a child, a supervisor must check if the restart limit is reached. This adds a penalty to the overall restart time, which should be kept low. The algorithm has been optimized from 2*O(n) to O(n) behavior.
- OTP-19224
-
- Related Id(s):
Added the possibility to configure shell docs column width through the stdlib parameter
shell_docs_columns
. - OTP-19230
-
- Related Id(s):
The
io:setopts/2
function now accepts theline_history
option for more explicit handling of when to save shell history. - OTP-19231
-
- Related Id(s):
The shell now prints a help message explaining how to interrupt a running command when stuck executing a command for longer than 5 seconds.
- OTP-19250
-
- Related Id(s):
Binaries can now be used as input to
calendar:rfc3339_to_system_time/2
, and produced as output ofcalendar:system_time_to_rfc3339/2
. - OTP-19314
-
- HIGHLIGHT
The
erl -noshell
mode has been updated to have two sub modes calledraw
andcooked
, wherecooked
is the old default behaviour andraw
can be used to bypass the line-editing support of the native terminal. Usingraw
mode it is possible to read keystrokes as they happen without the user having to press Enter. Also, theraw
mode does not echo the typed characters to stdout. An example of how to create a tic-tac-toe game using this mechanism is included in the documentation. - OTP-19315
-
Added
io:get_password/0
that can read passwords from stdin when in “raw”-noshell
mode. - OTP-19317
-
- HIGHLIGHT
New strict generators have been added for comprehensions.
The currently existing generators are “relaxed”: they ignore terms in the right-hand side expression that do not match the left-hand side pattern.
The new strict generators fail with exception
badmatch
if a pattern doesn’t match.Examples:
Using the current relaxed generator operator
<-
, any element not matching the pattern{_,_}
will be silently discarded:1> [T || {_,_}=T <- [{ok,1},ok,{error,2}]]. [{ok,1},{error,2}]
If the intention is that all lists processed by a list comprehension must only contain tuples of size two, using the new strict version of the operator ensures that term not matching will cause a crash:
2> [T || {_,_}=T <:- [{ok,1},ok,{error,2}]]. ** exception error: no match of right hand side value ok
Using the strict generator operator to mark the intention that all list elements must match the pattern could help finding mistakes quicker if something unpexected is added to the list processed by the generator.
The strict version for bitstring generators is
<:=
. - OTP-19334
-
New options for suppressing behaviour warnings have been added:
nowarn_conflicting_behaviours
nowarn_undefined_behaviour_func
nowarn_undefined_behaviour
nowarn_undefined_behaviour_callbacks
nowarn_ill_defined_behaviour_callbacks
nowarn_ill_defined_optional_callbacks
- OTP-19337
-
- HIGHLIGHT
The
join(Binaries, Separator)
function that joins a list of binaries has been added to thebinary
module. - OTP-19345
-
- Related Id(s):
The
supervisor:which_child/2
function has been added to facilitate getting the pid of a sibling process; that is a process under same supervisor as the process that calls to call the new function. - OTP-19354
-
- Related Id(s):
The function
erl_anno:set_end_location/2
for setting the end location of a token has been added. - OTP-19371
-
Added a warning for calling non-exported functions with the remote function call syntax from the same module, and likewise for the remote fun syntax.
- OTP-19425
-
- Related Id(s):
The
warn_deprecated_catch
option enables warnings for use of old-style catch expressions on the formcatch Expr
instead of the moderntry ... catch ... end
. To prevent new uses of uses of old catches to be added, this compiler option can be enabled on the project level and-compile(nowarn_deprecated_catch).
added to individual files that still contain old catches. - OTP-19431
-
- HIGHLIGHT, POTENTIAL INCOMPATIBILITY
Module
re
has been updated to use PCRE2, which is mostly backward compatible with PCRE.The most noticeable incompatibilities are
- The default character encoding is pure ASCII and not Latin1. Unicode support
is still available with options
unicode
anducp
. - Options
bsr_anycrlf
,bsr_unicode
and{newline,_}
are only set when a regex is compiled and cannot be changed at matching for precompiled regex.
- OTP-19432
-
- Related Id(s):
Defining a fun in terms of an imported function is not allowed. Before this release, the compiler would not catch this kind of error if the name of the imported function happened to be a BIF. Consider this example:
-module(fun_example). -export([foo/0, bar/0]). -import(m, [max/2, not_a_bif/0]). foo() -> fun max/2. bar() -> fun not_a_bif/0.
The compiler in Erlang/OTP 27 would generate the following messages:
fun_example.erl:9:5: function not_a_bif/0 undefined % 9| fun not_a_bif/0. % | ^ fun_example.erl:3:2: Warning: import directive overrides auto-imported BIF max/2 -- use "-compile({no_auto_import,[max/2]})." to resolve name clash % 3| -import(m, [max/2, not_a_bif/0]). % | ^
That is, there would be a (cryptic) error for
fun not_a_bif/0
, but only a warning forfun max/2
.When compiling with this release, both attempts to create a fun will result in error messages (as well as a warning):
fun_example.erl:6:5: creating a fun from imported name max/2 is not allowed % 6| fun max/2. % | ^ fun_example.erl:9:5: creating a fun from imported name not_a_bif/0 is not allowed % 9| fun not_a_bif/0. % | ^ fun_example.erl:3:2: Warning: import directive overrides auto-imported BIF max/2 -- use "-compile({no_auto_import,[max/2]})." to resolve name clash % 3| -import(m, [max/2, not_a_bif/0]). % | ^
Also, attempting to call a local function having the same name as auto-imported BIF would result in an error if the BIF was added to Erlang/OTP before R14, and a warning for newer BIFs. This has been changed to always emit a warning. For example:
-module(bif_example). -export([bar/1]). bar(B) -> is_boolean(B). is_boolean(B) -> B =:= true orelse B =:= false.
will now result in the following warning instead of an error:
if_example.erl:5:5: Warning: ambiguous call of overridden auto-imported BIF is_boolean/1 -- use erlang:is_boolean/1 or "-compile({no_auto_import,[is_boolean/1]})." to resolve name clash % 5| is_boolean(B). % | ^
- OTP-19452
-
- HIGHLIGHT
It is now possible to use any base for floating point numbers as described in EEP 75: Based Floating Point Literals.
Computers represent floating point numbers in binary, but such numbers are typically printed using base ten, for example 0.314159265e1. To maintain exact bit-level precision when converting numbers to and from text, it is better to use a base that matches the internally used base, such as 16 for a compact but still exact representation, or 2 for visualizing or writing down the exact internal format. One particular case where such exact representations are useful is in code generating tools.
Examples:
> 2#0.111. 0.875 > 16#fefe.fefe#e16. 1.2041849337671418e24
- OTP-19474
-
- Related Id(s):
The callback function
handle_continue/2
ingen_server
callback modules is now cached like the others, thanks to code cleanup and optimization of the internal behaviour loop.This should only improve performance, not affect functionality.
- OTP-19476
-
- Related Id(s):
Encoding done by the
json
module has been optimized. - OTP-19477
-
- HIGHLIGHT
- OTP-19478
-
Fixed licenses in files and added ORT curations to the following apps: otp, eldap, erl_interface, eunit, parsetools, stdlib, syntax_tools, and ERTS.
- OTP-19483
-
- Related Id(s):
-
PR-9408 ```
Functions of a module can now be grouped in the shell code completion by using the group key in the -doc attribute e.g. ``` -doc(#{group=>«“Public API”»). fetch()->…
```.
Functions, callbacks and types in the module reference documentation of OTP is now grouped using this feature.
- OTP-19505
-
- Related Id(s):
Added calendar:universal_time_to_system_time/1,2 and calendar:local_time_to_system_time/1,2
- OTP-19508
-
- Related Id(s):
Improve error messages for
json:decode/1
. - OTP-19512
-
- Related Id(s):
ETS
heir
can be set without getting anETS-TRANSFER
message. Useful when the heir is a supervisor process that cannot handle custom messages. - OTP-19516
-
Added support for the Unicode 16 standard.
- OTP-19526
-
- Related Id(s):
When documenting a function or type that needs to deal with durations, usually we can document it as “time in milliseconds”. Since the
timer
family of functions (hms
,hours
,seconds
, …) all return time in milliseconds, it is useful to be able to use this type in type specifications. - OTP-19537
-
A new event time-out has been implemented in
gen_server
, that behaves more like the one ingen_statem
.See the type
gen_server:action/0
for{timeout|hibernate,...}
, and also related functions. - OTP-19538
-
- HIGHLIGHT
Line numbers used to be reported in the following way:
1> lists:last([]). ** exception error: no function clause matching lists:last([]) (lists.erl, line 389)
Starting from Erlang/OTP 28, line numbers are now reported in the following way:
1> lists:last([]). ** exception error: no function clause matching lists:last([]) (lists.erl:389)
- OTP-19541
-
- Related Id(s):
Upgrade pcre2 to 10.45
- OTP-19556
-
- HIGHLIGHT
Added functions that produce utf-8 binaries instead of iolists. New functions are:
io_lib:bformat/2
,io_lib:bformat/3
,io_lib:bfwrite/2
,io_lib:bfwrite/3
,io_lib:bwrite/2
andio_lib:bwrite_string/3
. - OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers. - OTP-19578
-
- Related Id(s):
A list of PCRE2 incompatibilities is documented in a user’s guide for stdlib.
- OTP-19597
-
- POTENTIAL INCOMPATIBILITY
Change automatic hibernation of static supervisors so that they will hibernate after being idle for 1 second instead of only after starting, dynamic supervisors (simple_one_for_one) will not be hibernated at all. An option to the supervisor is added to make it configurable for the application. This option defaults to 1 second for static supervisors and to infinity for the simple_one_for_one supervisors.
Full runtime dependencies of stdlib-7.0
compiler-5.0, crypto-4.5, erts-16.0, kernel-10.0, sasl-3.0, syntax_tools-3.2.1
syntax_tools-4.0 #
- OTP-19422
-
- Related Id(s):
A few minor issues were corrected in
syntax_tools
, as well in theerl_anno
module. - OTP-19184
-
- HIGHLIGHT
Comprehensions have been extended with zip generators according to EEP 73.
Example:
1> [A+B || A <- [1,2,3] && B <- [4,5,6]]. [5,7,9]
- OTP-19317
-
- HIGHLIGHT
New strict generators have been added for comprehensions.
The currently existing generators are “relaxed”: they ignore terms in the right-hand side expression that do not match the left-hand side pattern.
The new strict generators fail with exception
badmatch
if a pattern doesn’t match.Examples:
Using the current relaxed generator operator
<-
, any element not matching the pattern{_,_}
will be silently discarded:1> [T || {_,_}=T <- [{ok,1},ok,{error,2}]]. [{ok,1},{error,2}]
If the intention is that all lists processed by a list comprehension must only contain tuples of size two, using the new strict version of the operator ensures that term not matching will cause a crash:
2> [T || {_,_}=T <:- [{ok,1},ok,{error,2}]]. ** exception error: no match of right hand side value ok
Using the strict generator operator to mark the intention that all list elements must match the pattern could help finding mistakes quicker if something unpexected is added to the list processed by the generator.
The strict version for bitstring generators is
<:=
. - OTP-19478
-
Fixed licenses in files and added ORT curations to the following apps: otp, eldap, erl_interface, eunit, parsetools, stdlib, syntax_tools, and ERTS.
- OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers.
Full runtime dependencies of syntax_tools-4.0
compiler-9.0, erts-16.0, kernel-10.3, stdlib-7.0
tftp-1.2.3 #
- OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers.
Full runtime dependencies of tftp-1.2.3
erts-6.0, kernel-6.0, stdlib-5.0
tools-4.1.2 #
- OTP-19135
-
A crash has been eliminated in
tprof:collect/0
when unloading a module while collecting traces. - OTP-19396
-
- Related Id(s):
Improved the
indent-region
Emacs command, which could indent badly when inside multiline string. - OTP-19419
-
- Related Id(s):
eprof:start_profiling/3
can now return information about which process it failed to trace. - OTP-19517
-
- Related Id(s):
Fixed a race condition when processes cause the Cover server to be started at the same time.
- OTP-19580
-
- Related Id(s):
Fix bug in
tprof
where the session name could not be set. - OTP-19628
-
- Related Id(s):
Add
tprof
to the.app
file. - OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers.
Full runtime dependencies of tools-4.1.2
compiler-8.5, erts-15.0, erts-15.0, kernel-10.0, runtime_tools-2.1, stdlib-6.0
wx-2.5 #
- OTP-19478
-
Fixed licenses in files and added ORT curations to the following apps: otp, eldap, erl_interface, eunit, parsetools, stdlib, syntax_tools, and ERTS.
- OTP-19480
-
- Related Id(s):
Added support for compiling Erlang/OTP for Windows on ARM64.
- OTP-19519
-
- Related Id(s):
When compiling C/C++ code on Unix systems, the compiler hardening flags suggested by the Open Source Security Foundation are now enabled by default. To disable them, pass
--disable-security-hardening-flags
toconfigure
. - OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers.
Full runtime dependencies of wx-2.5
erts-12.0, kernel-8.0, stdlib-5.0
xmerl-2.1.4 #
- OTP-19534
-
- Related Id(s):
With this change all public functions in xmerl have specs.
- OTP-19575
-
- Related Id(s):
The license and copyright header has changed format to include an
SPDX-License-Identifier
. At the same time, most files have been updated to follow a uniform standard for license headers.
Full runtime dependencies of xmerl-2.1.4
erts-6.0, kernel-8.4, stdlib-2.5
Thanks To #
Adam Wight, Aleksander Lisiecki, Alexandre Rodrigues, Anders Ågren Thuné, Andrea Leopardi, Ariel Otilibili, Benedikt Reinartz, Benjamin Philip, Brujo Benavides, Chris Freeze, Christophe De Troyer, Cocoa, Dairon Medina Caro, Daniel Gorin, Daniel Kozmacs, Dániel Szoboszlay, dependabot[bot], Dmitri Vereshchagin, Dominic Letz, Douglas Vought, Egor Ignatov, Eksperimental, Frank Hunleth, Freddie Lamble, Fredrik Frantzen, Frej Drejhammar, Gary Rennie, Hichem Fantar, Ilya Klyuchnikov, iri, Isabell H, Jan Uhlig, Jean-Louis Huynen, Jean-Sébastien Pédron, João Henrique Ferreira de Freitas, Johannes Christ, Jonas Bernoulli, Jonatan Kłosko, José Valim, Juan Barrios, Julian Doherty, Keyhan Jannat Khah ☕, Kirill A. Korinsky, lucioleKi, Lukasz Samson, Maria Scott, Mario Idival, Mario Uher, Marko Mindek, Martin Davidsson, Matwey V. Kornilov, Maxim Fedorov, Michael Davis, Michael Neumann, Nelson Vides, Nicholas Moen, Onno Vos, Paul Guyot, Philip Munksgaard, preciz, Richard Carlsson, Roberto Aloi, Robin Morisset, Roeland van Batenburg, ruslandoga, Ryan Kirkman, S0AndS0, sabiwara, Sam Weaver, Sergei Shuvatov, siiky, Simon Cornish, Siri Hansen, Stavros Aronis, Stefan Grundmann, Steffen Deusch, Tobias Pfeiffer, Tomer, Vadim Yanitskiy, Vance Shipley, William Fank Thomé, williamthome, William Yang, Wojtek Mach, Wojtek Surowka, yagogarea, Yoshiyuki Kurauchi, Zero King