Releases: elixir-lang/elixir
v1.19.0-rc.0
Type system improvements
Type checking of protocol dispatch and implementations
This release also adds type checking when dispatching and implementing protocols.
For example, string interpolation in Elixir uses the String.Chars
protocol. If you pass a value that does not implement said protocol, Elixir will now emit a warning accordingly.
Here is an example passing a range, which cannot be converted into a string, to an interpolation:
defmodule Example do
def my_code(first..last//step = range) do
"hello #{range}"
end
end
the above emits the following warnings:
warning: incompatible value given to string interpolation:
data
it has type:
%Range{first: term(), last: term(), step: term()}
but expected a type that implements the String.Chars protocol, it must be one of:
dynamic(
%Date{} or %DateTime{} or %NaiveDateTime{} or %Time{} or %URI{} or %Version{} or
%Version.Requirement{}
) or atom() or binary() or float() or integer() or list(term())
Warnings are also emitted if you pass a data type that does not implement the Enumerable
protocol as a generator to for-comprehensions:
defmodule Example do
def my_code(%Date{} = date) do
for(x <- date, do: x)
end
end
will emit:
warning: incompatible value given to for-comprehension:
x <- date
it has type:
%Date{year: term(), month: term(), day: term(), calendar: term()}
but expected a type that implements the Enumerable protocol, it must be one of:
dynamic(
%Date.Range{} or %File.Stream{} or %GenEvent.Stream{} or %HashDict{} or %HashSet{} or
%IO.Stream{} or %MapSet{} or %Range{} or %Stream{}
) or fun() or list(term()) or non_struct_map()
Type checking and inference of anonymous functions
Elixir v1.19 can now type infer and type check anonymous functions. Here is a trivial example:
defmodule Example do
def run do
fun = fn %{} -> :map end
fun.("hello")
end
end
The example above has an obvious typing violation, as the anonymous function expects a map but a string is given. With Elixir v1.19, the following warning is now printed:
warning: incompatible types given on function application:
fun.("hello")
given types:
binary()
but function has type:
(dynamic(map()) -> :map)
typing violation found at:
│
6 │ fun.("hello")
│ ~
│
└─ mod.exs:6:8: Example.run/0
Function captures, such as &String.to_integer/1
, will also propagate the type as of Elixir v1.19, arising more opportunity for Elixir's type system to catch bugs in our programs.
Acknowledgements
The type system was made possible thanks to a partnership between CNRS and Remote. The development work is currently sponsored by Fresha, Starfish*, and Dashbit.
Faster compile times in large projects
This release includes two compiler improvements that can lead up to 4x faster builds in large codebases.
While Elixir has always compiled the given files in project or a dependency in parallel, the compiler would sometimes be unable to use all of the machine resources efficiently. This release addresses two common limitations, delivering performance improvements that scale with codebase size and available CPU cores.
Code loading bottlenecks
Prior to this release, Elixir would load modules as soon as they were defined. However, because the Erlang part of code loading happens within a single process (the code server), this would make it a bottleneck, reducing the amount of parallelization, especially on large projects.
This release makes it so modules are loaded lazily. This reduces the pressure on the code server, making compilation up to 2x faster for large projects, and also reduces the overall amount of work done during compilation.
Implementation wise, the parallel compiler already acts as a mechanism to resolve modules during compilation, so we built on that. By making sure the compiler controls both module compilation and module loading, it can also better guarantee deterministic builds.
The only potential regression in this approach happens if you have a module, which is used at compile time and defines an @on_load
callback (typically used for NIFs) that invokes another modules within the same project. For example:
defmodule MyLib.SomeModule do
@on_load :init
def init do
MyLib.AnotherModule.do_something()
end
def something_else do
...
end
end
MyLib.SomeModule.something_else()
The reason this fails is because @on_load
callbacks are invoked within the code server and therefore they have limited ability to load additional modules. It is generally advisable to limit invocation of external modules during @on_load
callbacks but, in case it is strictly necessary, you can set @compile {:autoload, true}
in the invoked module to address this issue in a forward and backwards compatible manner.
Parallel compilation of dependencies
This release introduces a variable called MIX_OS_DEPS_COMPILE_PARTITION_COUNT
, which instructs mix deps.compile
to compile dependencies in parallel.
While fetching dependencies and compiling individual Elixir dependencies already happened in parallel, there were pathological cases where performance would be left on the table, such as compiling dependencies with native code or dependencies where one or two large file would take over most of the compilation time.
By setting MIX_OS_DEPS_COMPILE_PARTITION_COUNT
to a number greater than 1, Mix will now compile multiple dependencies at the same time, using separate OS processes. Empirical testing shows that setting it to half of the number of cores on your machine is enough to maximize resource usage. The exact speed up will depend on the number of dependencies and the number of machine cores, although some reports mention up to 4x faster compilation times. If you plan to enable it on CI or build servers, keep in mind it will most likely have a direct impact on memory usage too.
Improved pretty printing algorithm
Elixir v1.19 ships with a new pretty printing implementation that tracks limits as a whole, instead of per depth. Previous versions would track limits per depth. For example, if you had a list of lists of 4 elements and a limit of 5, it would be pretty printed as follows:
[
[1, 2, 3],
[1, 2, ...],
[1, ...],
[...],
...
]
This allows for more information to be shown at different nesting levels, which is useful for complex data structures. But it led to some pathological cases where the limit
option had little effect on actually filtering the amount of data shown. The new implementation decouples the limit handling from depth, decreasing it as it goes. Therefore, the list above with the same limit in Elixir v1.19 is now printed as:
[
[1, 2, 3],
...
]
The outer list is the first element, the first nested list is the second, followed by three numbers, reaching the limit. This gives developers more precise control over pretty printing.
Given this may reduce the amount of data printed by default, the default limit has also been increased from 50 to 100. We may further increase it in upcoming releases based on community feedback.
OpenChain certification
Elixir v1.19 is also our first release following OpenChain compliance, as previously announced. In a nutshell:
- Elixir releases now include a Source SBoM in CycloneDX 1.6 or later and SPDX 2.3 or later formats.
- Each release is attested along with the Source SBoM.
These additions offer greater transparency into the components and licenses of each release, supporting more rigorous supply chain requirements.
This work was performed by Jonatan Männchen and sponsored by the Erlang Ecosystem Foundation.
v1.19.0-rc.0 (2025-06-09)
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 con...
v1.19-latest
Automated release for latest v1.19.
main-latest
Automated release for latest main.
v1.18-latest
Automated release for latest v1.18.
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
v1.18.1
1. Enhancements
- [Kernel] Do not emit type violation warnings when comparing or matching against literals
- [Kernel] Do not validate clauses of private overridable functions
2. Bug fixes
Elixir
- [Code.Fragment] Ensure
Code.Fragment.container_cursor_to_quoted/2
with:trailing_fragment
parses expressions that were supported in previous versions - [Kernel] Do not crash when typing violation is detected on dynamic dispatch
- [Kernel] Properly annotate the source for warnings emitted by the compiler with the
@file
annotation - [Kernel] Properly annotate the source for warnings emitted by the type system with the
@file
annotation - [Kernel] Remove
:no_parens
metadata when using capture with arity on all cases - [Kernel] Ensure diagnostic traces are kept backwards compatible
ExUnit
- [ExUnit.Case] Ensure async groups do not run concurrenly while the test suite is still loading
- [ExUnit.Case] Ensure
--repeat-until-failure
can be combined with groups
Mix
- [mix compile.elixir] Store compilation results if compilation fails due to
--warnings-as-errors
- [mix deps.loadpaths] Add build lock
- [mix escript.build] Ensure build succeeds when protocol consolidation is disabled
- [Mix.Shell] Ensure encoding is properly respected on Windows and Unix systems
v1.18.0
https://elixir-lang.org/blog/2024/12/19/elixir-v1-18-0-released/
Elixir v1.18 is an impressive release with improvements across the two main efforts happening within the Elixir ecosystem right now: set-theoretic types and language servers. It also comes with built-in JSON support and adds new capabilities to its unit testing library. Here is a quick break down.
Type system improvements
The most exciting change in Elixir v1.18 is type checking of function calls, alongside gradual inference of patterns and return types. To understand how this will impact your programs, consider the following code in "lib/user.ex":
defmodule User do
defstruct [:age, :car_choice]
def drive(%User{age: age, car_choice: car}, car_choices) when age >= 18 do
if car in car_choices do
{:ok, car}
else
{:error, :no_choice}
end
end
def drive(%User{}, _car_choices) do
{:error, :not_allowed}
end
end
Elixir's type system will infer that the drive/2
function expects a %User{}
struct and returns either {:ok, dynamic()}
, {:error, :no_choice}
, or {:error, :not_allowed}
.
Therefore, the following code in a separate module (either in a separate or the same file), should emit a violation, due to an invalid argument:
User.drive({:ok, %User{}}, car_choices)
Here is the warning:
warning: incompatible types given to User.drive/2:
User.drive({:ok, %User{age: nil, car_choice: nil}}, car_choices)
given types:
{:ok, %User{age: nil, car_choice: nil}}, empty_list()
but expected one of:
dynamic(%User{age: term(), car_choice: term()}), dynamic()
where "car_choices" was given the type:
# type: empty_list()
# from: lib/foo.ex:21:17
car_choices = []
typing violation found at:
│
22 │ User.drive({:ok, %User{}}, car_choices)
│ ~
│
└─ lib/foo.ex:22:10: Example.run/0
The mismatched arguments are shown in red, if your terminal supports ANSI coloring.
And the next snippet will warn because the :error
clause will never match, as that's not a valid return type of the User.drive/2
call:
case User.drive(user, car_choices) do
{:ok, car} -> car
:error -> Logger.error("User cannot drive")
end
And here is the warning:
warning: the following clause will never match:
:error
because it attempts to match on the result of:
User.drive(user, car_choices)
which has type:
dynamic({:ok, term()} or {:error, :no_choice} or {:error, :not_allowed})
typing violation found at:
│
26 │ :error -> Logger.error("User cannot drive")
│ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│
└─ lib/foo.ex:26: Example.run/0
For more details on typing inference and the trade-offs made by the Elixir team, see our official documentation.
There are many other improvements to the type system, which we will go in detail within the official release. Meanwhile, here is a list summary of the overall improvements done to the type system:
-
Type inference of patterns (typing inference of guards will be part of an upcoming release)
-
Type checking of all language constructs, including local and remote calls, except
for
,with
, and closures -
Type checking of all functions inlined by the compiler found in
Kernel
-
Type checking of all conversion functions inlined by the compiler
-
Support for tuples and lists as composite types as well as type checking of their basic operations
-
Detection of clauses and patterns that will never match from
case
,cond
, and=
-
Detection of unused clauses in private functions
ExUnit improvements
ExUnit now supports parameterized tests to run the same test module multiple times under different parameters.
For example, Elixir ships a local, decentralized and scalable key-value process storage called Registry
. The registry can be partitioned and its implementation differs depending if partitioning is enabled or not. Therefore, during tests, we want to ensure both modes are exercised. With Elixir v1.18, we can achieve this by writing:
defmodule Registry.Test do
use ExUnit.Case,
async: true,
parameterize: [
%{partitions: 1},
%{partitions: 8}
]
# ... the actual tests ...
end
ExUnit parameterizes whole test modules. If your modules are configured to run concurrently, as above, so will the parameterized ones.
ExUnit also comes with the ability of specifying test groups. While ExUnit supports running tests concurrently, those tests must not have shared state between them. However, in large applications, it may be common for some tests to depend on some shared state, and other tests to depend on a completely separate state. For example, part of your tests may depend on Cassandra, while others depend on Redis. Prior to Elixir v1.18, these tests could not run concurrently, but in v1.18 they might as long as they are assigned to different groups. Tests modules within the same group do not run concurrently, but across groups, they might.
With features like async tests, suite partitioning, and now grouping, Elixir developers have plenty of flexibility to make the most use of their machine resources, both in development and in CI.
mix format --migrate
The mix format
command now supports an explicit --migrate
flag, which will convert constructs that have been deprecated in Elixir to their latest version. Because this flag rewrites the AST, it is not guaranteed the migrated format will always be valid when used in combination with macros that also perform AST rewriting.
As of this release, the following migrations are executed:
-
Normalize parens in bitstring modifiers - it removes unnecessary parentheses in known bitstring modifiers, for example
<<foo::binary()>>
becomes<<foo::binary>>
, or adds parentheses for custom modifiers, where<<foo::custom_type>>
becomes<<foo::custom_type()>>
. -
Charlists as sigils - formats charlists as
~c
sigils, for example'foo'
becomes~c"foo"
. -
unless
as negatedif
s - rewritesunless
expressions usingif
with a negated condition, for exampleunless foo do
becomesif !foo do
.
More migrations may be added in future releases.
JSON support
This release includes official support for JSON encoding and decoding.
Both encoder and decoder fully conform to RFC 8259 and ECMA 404 standards.
Encoding
Encoding can be done via JSON.encode!/1
and JSON.encode_to_iodata!/1
functions. The default encoding rules are applied as follows:
Elixir | JSON |
---|---|
integer() | float() |
Number |
true | false |
Boolean |
nil |
Null |
binary() |
String |
atom() |
String |
list() |
Array |
%{binary() => _} |
Object |
%{atom() => _} |
Object |
%{integer() => _} |
Object |
You may also implement the JSON.Encoder
protocol for custom data structures. Elixir already implements the protocol for all Calendar types.
If you have a struct, you can derive the implementation of the JSON.Encoder
by specifying which fields should be encoded to JSON:
@derive {JSON.Encoder, only: [...]}
defstruct ...
Decoding
Decoding can be done via JSON.decode/2
and JSON.decode!/2
functions. The default decoding rules are applied as follows:
JSON | Elixir |
---|---|
Number | integer() | float() |
Boolean | true | false |
Null | nil |
String | binary() |
Object | %{binary() => _} |
Language server listeners
4 months ago, we welcomed the Official Language Server team, with the goal of unifying the efforts behind code intelligence, tools, and editors in Elixir. Elixir v1.18 brings new features on this front by introducing locks and listeners to its compilation. Let's understand what it means.
At the moment, all language server implementations have their own compilation environment. This means that your project and dependencies during development are compiled once, for your own use, and then again for the language server. This duplicate effort could cause the language server experience to lag, when it could be relying on the already compiled artifacts of your project.
This release address by introducing a compiler lock, ensuring that only a single operating system process running Elixir compiles your project at a given moment, and by providing the ability for one operating system process to listen to the compilation results of others. In other words, different Elixir instances can now communicate over the same compilation build, instead of racing each other.
These enhancements do not only improve editor tooling, but they also directly benefit projects like IEx and Phoenix. For example, you can invoke IEx.configure(auto_reload: true)
and IEx will automatically reload modules changed elsewhere, either by a separate terminal or your IDE.
Potential incompatibilities
This release no longer supports WERL (a graphical user interface on Windows used by Erlang 25 and earlier). For a better user experience on Windows terminals, use Erlang/OTP 26+ (this is also the last Elixir release to support Erl...
v1.18.0-rc.0
1. Enhancements
Elixir
- [CLI] Add experimental PowerShell scripts for
elixir
,elixirc
, andmix
on Windows. Those provide a safer entry point for running Elixir from other platforms - [Calendar] Add
Duration.to_string/1
- [Code] Support several migration options in
Code.format_string!/2
- [Code] Add parenthesis around
--
and---
inCode.format_string!/2
to make precedence clearer - [Code] Include more metadata in
Code.string_to_quoted/2
whentoken_metadata: true
to help compute ranges from the AST - [Code.Fragment] Have
:capture_arg
as its own entry inCode.Fragment.surround_context/2
- [Config] Add
Config.read_config/1
- [Enumerable] Add
Enum.product_by/2
andEnum.sum_by/2
- [Exception] Add
MissingApplicationsError
exception to denote missing applications - [Kernel] Update source code parsing to match UTS #55 latest recommendations. In particular, mixed script is allowed in identifiers as long as they are separate by underscores (
_
), such ashttp_сервер
. Previously allowed highly restrictive identifiers, which mixed Latin and other scripts, such as the japanese word for t-shirt,Tシャツ
, now require the underscore as well - [Kernel] Warn on bidirectional confusability in identifiers
- [Kernel] Verify the type of the binary generators
- [Kernel] Track the type of tuples in patterns and inside
elem/2
- [Kernel] Perform validation of root AST nodes in
unquote
andunquote_splicing
to catch bugs earlier - [Kernel] Add source, behaviour, and record information to Docs chunk metadata
- [Kernel] Support deterministic builds in tandem with Erlang by setting
ERL_COMPILER_OPTIONS=deterministic
. Keep in mind deterministic builds strip source and other compile time information, which may be relevant for programs - [Kernel] Allow aliases and imports to be enabled conditionally in module body
- [List] Add
List.ends_with?/2
- [Macro] Improve
dbg
handling ofif/2
,with/1
and of code blocks - [Macro] Add
Macro.struct_info!/2
to return struct information mirroringmod.__info__(:struct)
- [Registry] Add
Registry.lock/3
for local locking - [PartitionSupervisor] Add
PartitionSupervisor.resize!/2
to resize the number of partitions in a supervisor (up to the limit it was started with) - [Process] Handle arbitrarily high integer values in
Process.sleep/1
- [Protocol] Add
@undefined_impl_description
to customize error message when an implementation is undefined - [Protocol] Add
__deriving__/1
as optional macro callback toProtocol
, no longer requiring empty implementations - [String] Inspect special whitespace and zero-width characters using their Unicode representation
- [String] Update Unicode to 16.0
ExUnit
- [ExUnit] Support parameterized tests on
ExUnit.Case
- [ExUnit] Support test groups: tests in the same group never run concurrently
- [ExUnit.Case] Add
test_pid
as a tag
IEx
- [IEx] Add
:dot_iex
support toIEx.configure/1
- [IEx] Add report for normal/shutdown exits in IEx
Mix
- [mix compile] Ensure only a single operating system process can compile at a given time
- [mix deps.get] Ensure only a single operating system process can fetch deps at a given time
- [mix format] Add
mix format --migrate
to migrate from deprecated functionality - [mix format] Add new options and metadata to improve formatting applying by editors and other environments
- [mix test] Taint failure manifest if requiring or compiling tests fail
- [Mix.Project] Add a
:listeners
configuration to listen to compilation events from the current and other operating system processes - [Mix.Task.Compiler] Add API for fetching all persisted compiler diagnostics
- [Mix.Task.Compiler] Add API for fetching all compiler tasks
2. Bug fixes
Elixir
- [Code] Fix delimiter metadata for single quoted atoms and remote calls in
Code.string_to_quoted/2
- [Code.Formatter] Fix formatter adding extra escapes to quoted remote calls
- [Code.Fragment] Properly handle keyword keys as their own entry
- [Inspect.Algebra] Ensure
next_break_fits
respectsline_length
- [Kernel] Validate AST on
unquote
andunquote_splicing
to provide better error reports instead of failing too late inside the compiler - [Module] Include module attribute line and name when tracing its aliases
- [Stream] Do not halt streams twice in
Stream.transform/5
- [URI] Fix a bug when a schemaless URI is given to
URI.merge/2
ExUnit
- [ExUnit.Assertions] Raise if guards are used in
assert/1
with=
- [ExUnit.Assertions] Format inserted/deleted maps in list assertions
IEx
- [IEx.Helpers]
IEx.Helpers.recompile/0
will reload modules changed by other operating system processes
Mix
- [mix compile] Ensure warnings from external resources are emitted with
--all-warnings
when files do not change - [mix deps.compile] Fix escaping issues when invoking
rebar3
in some cases - [mix escript] Fix escript layout and support storing
priv
directories - [mix release] Make
.app
files deterministic in releases - [Mix.Shell] Fix
Mix.Shell
on Windows when outputting non UTF-8 characters
3. Soft deprecations (no warnings emitted)
Elixir
- [Inspect.Algebra]
color/3
is deprecated in favor ofcolor_doc/3
- [Inspect.Algebra]
fold_doc/2
is deprecated in favor offold/2
- [Kernel] Deprecate
unless
in favor ofif
. Usemix format --migrate
to automate the migration - [Macro]
Macro.struct!/2
is deprecated in favor ofMacro.struct_info!/2
- [Protocol] Defining
__deriving__/3
inside theAny
implementation is deprecated, derive it inside the protocol definition itself
4. Hard deprecations
EEx
- [EEx]
<%#
is deprecated in favor of<%!--
or<% #
- [EEx]
c:EEx.handle_text/2
is deprecated in favor ofc:EEx.handle_text/3
Elixir
- [Code] Setting
:warnings_as_errors
is deprecated viaCode.put_compiler_option/2
. This must not affect developers, as the:warnings_as_errors
option is managed by Mix tasks, and not directly used via theCode
module - [Enumerable] Deprecate returning a two-arity function in
Enumerable.slice/1
- [List]
List.zip/1
is deprecated in favor ofEnum.zip/1
- [Module] Deprecate
Module.eval_quoted/3
in favor ofCode.eval_quoted/3
- [Range] Deprecate inferring negative ranges on
Range.new/2
- [Tuple]
Tuple.append/2
is deprecated, useTuple.insert_at/3
instead
Mix
- [mix cmd] Deprecate
mix cmd --app APP
in favor ofmix do --app APP
- [Mix.Tasks.Compile] Deprecate
compilers/0
in favor ofMix.Task.Compiler.compilers/0