Releases: elixir-lang/elixir
Releases · elixir-lang/elixir
v1.19-latest
Automated release for latest v1.19.
main-latest
Automated release for latest main.
v1.19.0
Official announcement: https://elixir-lang.org/blog/2025/10/16/elixir-v1-19-0-released/
1. Enhancements
Elixir
- [Access] Add
Access.values/0
for traversing maps and keyword lists values - [Base] Add functions to verify if an encoding is valid, such as
valid16?
,valid64?
, and so forth - [Calendar] Support 2-arity options for
Calendar.strftime/3
which receives the whole data type - [Code] Add
:migrate_call_parens_on_pipe
formatter option - [Code] Add
:indentation
option toCode.string_to_quoted/2
- [Code.Fragment] Preserve more block content around cursor in
container_cursor_to_quoted
- [Code.Fragment] Add
:block_keyword_or_binary_operator
toCode.Fragment
for more precise suggestions after operators and closing terminators - [Code.Fragment] Add
Code.Fragment.lines/1
- [Enum] Provide more information on
Enum.OutOfBoundsError
- [Inspect] Allow
optional: :all
when deriving Inspect - [Inspect.Algebra] Add optimistic/pessimistic groups as a simplified implementation of
next_break_fits
- [IO.ANSI] Add ANSI codes to turn off conceal and crossed_out
- [Kernel] Raise when U+2028 and U+2029 characters are present in comments and strings to avoid line spoofing attacks
- [Kernel] Include the line for the previous clause in errors/warnings related to conflicts between defaults on function definitions
- [Kernel] Support
min/2
andmax/2
as guards - [Kernel.ParallelCompiler] Add
each_long_verification_threshold
which invokes a callback when type checking a module takes too long - [Kernel.ParallelCompiler] Include lines in
== Compilation error in file ... ==
slogans - [Macro] Print debugging results from
Macro.dbg/3
as they happen, instead of once at the end - [Macro] Add
__escape__/1
callback so structs can escape references and other runtime data types inMacro.escape/1
- [Module] Do not automatically load modules after their compilation, guaranteeing a more consistent compile time experience and drastically improving compilation times
- [OptionParser] Support the
:regex
type - [OptionParser] Enhance parsing error to display available options
- [Protocol] Type checking of protocols dispatch and implementations
- [Regex] Add
Regex.to_embed/2
which returns an embeddable representation of regex in another regex - [Regex] Raise error message when regexes are used as default values in struct fields for compatibility with Erlang/OTP 28
- [Registry] Add key-based partitioning of duplicate registries
- [String] Add
String.count/2
to count occurrences of a pattern - [String] Update to Unicode 17.0.0
ExUnit
- [ExUnit] Set a process label for each test
- [ExUnit.CaptureLog] Parallelize log dispatch when multiple processes are capturing log
- [ExUnit.Case] Add
:test_group
to the test context - [ExUnit.Doctest] Support ellipsis in doctest exceptions to match the remaining of the exception
- [ExUnit.Doctest] Add
:inspect_opts
option for doctest
IEx
- [IEx] Support multi-line prompts (due to this feature,
:continuation_prompt
and:alive_continuation_prompt
are no longer supported as IEx configuration) - [IEx.Autocomplete] Functions annotated with
@doc group: "Name"
metadata will appear within their own groups in autocompletion
Logger
- [Logger] Accept any enumerable in
Logger.metadata/1
Mix
- [mix] Add support for
MIX_PROFILE_FLAGS
to configureMIX_PROFILE
- [mix compile] Debug the compiler and type checker PID when
MIX_DEBUG=1
and compilation/verification thresholds are met - [mix compile] Add
Mix.Tasks.Compiler.reenable/1
- [mix deps.compile] Support
MIX_OS_DEPS_COMPILE_PARTITION_COUNT
for compiling deps concurrently across multiple operating system processes - [mix help] Add
mix help Mod
,mix help :mod
,mix help Mod.fun
,mix help Mod.fun/arity
, andmix help app:package
- [mix format] Add options to mix format to allow excluding of files
- [mix test] Add
--name-pattern
option tomix test
- [mix test] Allow to distinguish the exit status between warnings as errors and test failures
- [mix xref graph] Add support for
--format json
- [mix xref graph] Emit a warning if
--source
is part of a cycle - [Mix] Support the
:compilers
option - [Mix.Task.Compiler] Add
Mix.Task.Compiler.run/2
2. Bug fixes
Elixir
- [Code] Return error on invalid unicode sequences in
Code.string_to_quoted/2
instead of raising - [Code] Properly handle column annotation for
in
innot in
expressions - [DateTime] Do not truncate microseconds regardless of precision in
DateTime.diff/3
- [Enum] Fix infinite loop on
Enum.take/2
with negative index on empty enumerable - [File] Properly handle permissions errors cascading from parent in
File.mkdir_p/1
- [Inspect] Inspect ill-formed structs as maps
- [Kernel] Properly increment metadata newline when
?
is followed by a literal newline character - [Kernel]
not_a_map.key
now raisesBadMapError
for consistency with other map operations - [Protocol]
defstruct/1
anddefexception/1
are now disabled insidedefprotocol
as to not allow defining structs/exceptions alongside a protocol - [Regex] Fix
Regex.split/2
returning too many results when the chunk being split on was empty (which can happen when using features such as/K
) - [Stream] Ensure
Stream.transform/5
respects suspend command when its inner stream halts - [URI] Several fixes to
URI.merge/2
related to trailing slashes, trailing dots, and hostless base URIs
ExUnit
- [ExUnit.Assertions] Fix order of pinned variables in failure reports
- [ExUnit.Assertions] Raise if attempting to raise an assertion error with invalid message (not a binary)
- [ExUnit.Case] Do not crash on empty test unit groups
IEx
- [IEx] Abort pipelines when there is an error in any step along the way
Mix
- [mix cmd] Preserve argument quoting in subcommands by no longer performing shell expansion. To revert to the previous behaviour, pass
--shell
before the command name - [mix compile] Fix bug where reverting changes to an external resource (such as HEEx template) after a compilation error would make it so the source module would not be compiled
- [mix compile] Avoid failures when locking compilation across different users
- [mix compile] Fix race condition when renaming files used by the compilation lock
- [mix format] Ensure the formatter does not go over the specified limit in certain corner cases
- [mix release] Fix
RELEASE_SYS_CONFIG
for Windows 11 - [mix test] Ensure modules are preloaded in
mix test --slowest-modules=N
- [mix xref graph] Provide more consistent output by considering strong connected components only when computing graphs
3. Soft deprecations (no warnings emitted)
Elixir
- [Inspect.Algebra]
next_break_fits
is deprecated in favor ofoptimistic
/pessimistic
groups - [Node]
Node.start/2-3
is deprecated in favor ofNode.start/2
with a keyword list
Mix
- [mix compile]
--no-protocol-consolidation
is deprecated in favor of--no-consolidate-protocols
for consistency withmix.exs
configuration - [mix compile.protocols] Protocol consolidation is now part of
compile.elixir
and the task itself has no effect
4. Hard deprecations
Elixir
- [Code] Warn if line-break characters outside of
\r
and\r\n
are found in strings according to UX#55. This warning will be fast-tracked into an error for security reasons in Elixir v1.20, following a similar rule to bidirectional control characters. They will already raise if found in comments - [Code] The
on_undefined_variable: :warn
is deprecated. Relying on undefined variables becoming function calls will not be supported in the future - [File] Passing a callback as third argument to
File.cp/3
is deprecated, pass it as aon_conflict: callback
option instead - [File] Passing a callback as third argument to
File.cp_r/3
is deprecated, pass it as aon_conflict: callback
option instead - [Kernel] The struct update syntax, such as
%URI{uri | path: "/foo/bar"}
, now requires the given variable (or expression) to explicitly pattern match on the struct before it can be updated. This is because, thanks to the type system, pattern matching on structs can find more errors, more reliably, and we want to promote its usage. Once pattern matching is added, you may optionally convert the struct update syntax into the map update syntax%{uri | path: "/foo/bar"}
with no less of typing guarantees - [Kernel.ParallelCompiler] Passing
return_diagnostics: true
as an option is required oncompile
,compile_to_path
andrequire
Logger
- [Logger] The
:backends
configuration is deprecated, either set the:default_handler
to false or start backends in your application start callback
Mix
- [mix] The
:default_task
,:preferred_cli_env
, and:preferred_cli_target
configuration insidedef project
in yourmix.exs
has been deprecated in favor of:default_task
,:preferred_envs
and:preferred_targets
inside thedef cli
function - [mix do] Using commas as task separator in
mix do
(such asmix do foo, bar
) is deprecated, use+
instead (as inmix do foo + bar
)
v1.19.0-rc.2
1. Enhancements
Elixir
- [Regex] Raise error message when regexes are used as default values in struct fields for compatibility with Erlang/OTP 28
- [Registry] Add key-based partitioning of duplicate registries
2. Bug fixes
Elixir
- [Kernel] Address issue with type checking not completing on protocol consolidation
ExUnit
- [ExUnit] Do not crash on empty test unit groups
Mix
- [mix help] Add
mix help app:APP
- [mix test] Fix module preloading in
mix test --slowest-modules=N
v1.19.0-rc.1
1. Enhancements
Elixir
- [Kernel] Raise when U+2028 and U+2029 characters are present in comments and strings to avoid line spoofing attacks
- [Kernel] Include the line for the previous clause in errors/warnings related to conflicts between defaults on function definitions
- [Macro] Add
__escape__/1
callback so structs can escape references and other runtime data types inMacro.escape/1
- [OptionParser] Support the
:regex
type - [OptionParser] Enhance parsing error to display available options
- [String] Update to Unicode 17.0.0
ExUnit
- [ExUnit] Set a process label for each test
Logger
- [Logger] Accept any enumerable in
Logger.metadata/1
Mix
- [mix format] Add options to mix format to allow excluding of files
- [mix test] Add
--name-pattern
option tomix test
- [Mix.install/2] Support the
:compilers
option
2. Bug fixes
Elixir
- [Code] Return error on invalid unicode sequences in
Code.string_to_quoted/2
instead of raising - [Code] Properly handle column annotation for
in
innot in
expressions - [Enum] Fix infinite loop on
Enum.take/2
with negative index on empty enumerable - [Inspect] Inspect ill-formed structs as maps
- [Kernel] Properly increment metadata newline when
?
is followed by a literal newline character
ExUnit
- [ExUnit.Assertions] Fix order in ExUnit results when listing pinned variables
- [ExUnit.Assertions] Raise if attempting to raise an assertion error with invalid message (not a binary)
IEx
- [IEx] Abort pipelines when there is an error in any step along the way
Mix
- [mix compile] Fix bug where reverting changes to an external resource (such as HEEx template) after a compilation error would make it so the source module would not be compiled
- [mix compile] Avoid failures when locking compilation across different users
- [mix compile] Fix race condition when renaming files used by the compilation lock
- [mix test] Prevent
mix test
from overriding:failures_manifest_path
option
3. Hard deprecations
Elixir
- [Code] Warn if line-break characters outside of
\r
and\r\n
are found in strings according to UX#55. This warning will be fast-tracked into an error for security reasons in Elixir v1.20, following a similar rule to bidirectional control characters. They will already raise if found in comments
v1.18-latest
Automated release for latest v1.18.
v1.19.0-rc.0
1. Enhancements
Elixir
- [Access] Add
Access.values/0
for traversing maps and keyword lists values - [Base] Add functions to verify if an encoding is valid, such as
valid16?
,valid64?
, and so forth - [Calendar] Support 2-arity options for
Calendar.strftime/3
which receives the whole data type - [Code] Add
:migrate_call_parens_on_pipe
formatter option - [Code] Add
:indentation
option toCode.string_to_quoted/2
- [Code.Fragment] Preserve more block content around cursor in
container_cursor_to_quoted
- [Code.Fragment] Add
:block_keyword_or_binary_operator
toCode.Fragment
for more precise suggestions after operators and closing terminators - [Code.Fragment] Add
Code.Fragment.lines/1
- [Enum] Provide more information on
Enum.OutOfBoundsError
- [Inspect] Allow
optional: :all
when deriving Inspect - [Inspect.Algebra] Add optimistic/pessimistic groups as a simplified implementation of
next_break_fits
- [IO.ANSI] Add ANSI codes to turn off conceal and crossed_out
- [Kernel] Allow controlling which applications are used during inference
- [Kernel] Support
min/2
andmax/2
as guards - [Kernel.ParallelCompiler] Add
each_long_verification_threshold
which invokes a callback when type checking a module takes too long - [Kernel.ParallelCompiler] Include lines in
== Compilation error in file ... ==
slogans - [Macro] Print debugging results from
Macro.dbg/3
as they happen, instead of once at the end - [Module] Do not automatically load modules after their compilation, guaranteeing a more consistent compile time experience and drastically improving compilation times
- [Protocol] Type checking of protocols dispatch and implementations
- [Regex] Add
Regex.to_embed/2
which returns an embeddable representation of regex in another regex - [String] Add
String.count/2
to count occurrences of a pattern
ExUnit
- [ExUnit.CaptureLog] Parallelize log dispatch when multiple processes are capturing log
- [ExUnit.Case] Add
:test_group
to the test context - [ExUnit.Doctest] Support ellipsis in doctest exceptions to match the remaining of the exception
- [ExUnit.Doctest] Add
:inspect_opts
option for doctest
IEx
- [IEx] Support multi-line prompts (due to this feature,
:continuation_prompt
and:alive_continuation_prompt
are no longer supported as IEx configuration) - [IEx.Autocomplete] Functions annotated with
@doc group: "Name"
metadata will appear within their own groups in autocompletion
Mix
- [mix] Add support for
MIX_PROFILE_FLAGS
to configureMIX_PROFILE
- [mix compile] Debug the compiler and type checker PID when
MIX_DEBUG=1
and compilation/verification thresholds are met - [mix compile] Add
Mix.Tasks.Compiler.reenable/1
- [mix deps.compile] Support
MIX_OS_DEPS_COMPILE_PARTITION_COUNT
for compiling deps concurrently across multiple operating system processes - [mix help] Add
mix help Mod
,mix help :mod
,mix help Mod.fun
andmix help Mod.fun/arity
- [mix test] Allow to distinguish the exit status between warnings as errors and test failures
- [mix xref graph] Add support for
--format json
- [mix xref graph] Emit a warning if
--source
is part of a cycle - [M ix.Task.Compiler] Add
Mix.Task.Compiler.run/2
2. Bug fixes
Elixir
- [DateTime] Do not truncate microseconds regardless of precision in
DateTime.diff/3
- [File] Properly handle permissions errors cascading from parent in
File.mkdir_p/1
- [Kernel]
not_a_map.key
now raisesBadMapError
for consistency with other map operations - [Regex] Fix
Regex.split/2
returning too many results when the chunk being split on was empty (which can happen when using features such as/K
) - [Stream] Ensure
Stream.transform/5
respects suspend command when its inner stream halts - [URI] Several fixes to
URI.merge/2
related to trailing slashes, trailing dots, and hostless base URIs
Mix
- [mix cmd] Preserve argument quoting in subcommands
- [mix format] Ensure the formatter does not go over the specified limit in certain corner cases
- [mix release] Fix
RELEASE_SYS_CONFIG
for Windows 11 - [mix test] Preserve files with no longer filter on
mix test
- [mix xref graph] Provide more consistent output by considering strong connected components only when computing graphs
3. Soft deprecations (no warnings emitted)
Elixir
- [Inspect.Algebra]
next_break_fits
is deprecated in favor ofoptimistic
/pessimistic
groups - [Node]
Node.start/2-3
is deprecated in favor ofNode.start/2
with a keyword list
Mix
- [mix compile]
--no-protocol-consolidation
is deprecated in favor of--no-consolidate-protocols
for consistency withmix.exs
configuration - [mix compile.protocols] Protocol consolidation is now part of
compile.elixir
and has no effect
4. Hard deprecations
Elixir
- [Code] The
on_undefined_variable: :warn
is deprecated. Relying on undefined variables becoming function calls will not be supported in the future - [File] Passing a callback as third argument to
File.cp/3
is deprecated, pass it as aon_conflict: callback
option instead - [File] Passing a callback as third argument to
File.cp_r/3
is deprecated, pass it as aon_conflict: callback
option instead - [Kernel] The struct update syntax, such as
%URI{uri | path: "/foo/bar"}
is deprecated in favor of pattern matching on the struct when the variable is defined and then using the map update syntax%{uri | path: "/foo/bar"}
. Thanks to the type system, pattern matching on structs can find more errors, more reliably - [Kernel.ParallelCompiler] Passing
return_diagnostics: true
as an option is required oncompile
,compile_to_path
andrequire
Logger
- [Logger] The
:backends
configuration is deprecated, either set the:default_handler
to false or start backends in your application start callback
Mix
- [mix] The
:default_task
,:preferred_cli_env
, and:preferred_cli_target
configuration insidedef project
in yourmix.exs
has been deprecated in favor of:default_task
,:preferred_envs
and:preferred_targets
inside thedef cli
function - [mix do] Using commas as task separator in
mix do
(such asmix do foo, bar
) is deprecated, use+
instead (as inmix do foo + bar
)
v1.18.4
This release includes initial support for Erlang/OTP 28, for those who want to try it out. In such cases, you may use Elixir v1.18.4 precompiled for Erlang/OTP 27, as it is binary compatible with Erlang/OTP 28. Note, however, that Erlang/OTP 28 no longer allows regexes to be defined in the module body and interpolated into an attribute. If you do this:
@some_attribute ~r/foo/
def some_fun, do: @some_attribute
You must rewrite it to:
def some_fun, do: ~r/foo/
1. Enhancements
IEx
- [IEx.Helpers] Add
IEx.Helpers.process_info/1
which prints process information
Mix
- [mix compile] Support the
--no-listeners
option - [mix local] Retry HTTP requests with disabled middlebox comp mode depending on the failure reason
- [mix local.hex] Install Hex per OTP release
- [mix local.rebar] Install Hex per OTP release
- [mix run] Support the
--no-listeners
option
2. Bug fixes
Elixir
- [Kernel] Emit trace events for
@on_definition
callbacks - [Kernel] Emit trace events for
@on_load
callbacks - [Kernel] Emit trace events for
super
calls - [Kernel] Emit trace events for imported function calls
- [Kernel] Optimize map unions to avoid building long lists
- [Kernel] Do not crash when type checking nested bitstrings in patterns
- [Kernel] Do not crash when non-binary bitstring is given as struct default value
- [Kernel] Recompile regexes when escaped from module attributes for Erlang/OTP 28 compatibility
- [Kernel] Preserve backwards compatibility in
elixir_erl
Mix
- [mix deps.get] Ensure git checkout works when there are untracked files in the dependency
- [mix loadpaths] Do not run listeners when not checking the deps
v1.18.3
1. Enhancements
Elixir
- [JSON] Encode any JSON key to string
- [Kernel] Allow
<<_::3*8>>
in typespecs
Mix
- [mix loadpaths] Support
--no-listeners
option
2. Bug fixes
Elixir
- [CLI] Fix
--no-color
not setting:ansi_enabled
to false - [Protocol] Return correct implementation for an invalid struct pointing to
nil
- [Stream] Do not raise when
Stream.cycle/1
is explicitly halted
ExUnit
- [ExUnit.Diff] Fix regression when diffing nested improper lists
IEx
- [IEx.Autocomplete] Fix autocomplete crash when expanding struct with
__MODULE__
- [IEx.Helpers] Do not purge on
recompile
if IEx is not running
v1.18.2
1. Enhancements
Elixir
- [CLI] Add
--color
/--no-color
for enabling and disabling of ANSI colors - [Code.Fragment] Provide more AST context when invoking
container_cursor_to_quoted
with trailing fragments - [Regex] Ensure compatibility with Erlang/OTP 28+ new Regex engine
Mix
- [mix] Print compilation lock waiting message to stderr
- [mix] Add an environment variable to optionally disable compilation locking
2. Bug fixes
Elixir
- [CLI] Temporarily remove PowerShell scripts for
elixir
,elixirc
, andmix
on Windows, as they leave the shell broken after quitting Erlang
ExUnit
- [ExUnit] Fix crash when diffing bitstring specifiers
IEx
- [IEx.Autocomplete] Fix crashing whhen autocompleting structs with runtime values
Mix
- [mix] Track compilation locks per user to avoid permission errors
- [mix deps.update] Ensure Git dependencies can be upgraded by doing so against the origin