Elixir is a dynamic, functional language for building scalable and maintainable applications
:defmodule
tracing event on module definitionMix.install_project_dir/0
Mix.install/2
installationMix.SCM.delete/1
Path.relative_to/2
dealt with "." as inputCode.quoted_to_algebra/2
for operator with :do key as operandString.capitalize/1
with a single codepoint$HOME
is setOfficial announcement: https://elixir-lang.org/blog/2023/12/22/elixir-v1-16-0-released/
:emit_warnings
for Code.string_to_quoted/2
MismatchedDelimiterError
for handling mismatched delimiter exceptions\r\n
:offset
option to File.stream!/2
UndefinedFunctionError
Kernel.ParallelCompiler.pmap/2
to compile multiple additional entries in parallelTrue
/False
/Nil
are used as aliases and there is no such aliasMacro.compile_apply/4
@nifs
annotation from Erlang/OTP 25@dialyzer
configurationString.replace_invalid/2
:limit
option to Task.yield_many/2
Logger.levels/0
MIX_PROFILE
to profile a list of comma separated tasks--sparse
option:applications
and :extra_applications
are used:details
when possiblelib/
and one of them is changed--sparse
optioninclude/
directory in releasesmix test test/foo_test.exs:13 test/bar_test.exs:27
Code.Fragment.surround_context/2
when matching on ->
IO.binwrite/2
on terminated device (mirroring IO.write/2
)dbg
module is a compile-time dependencyunquote/1
and the function/macro itself is unusedElixir.
in their definition@after_compile
callbacks to avoid deadlocksMacro.to_string/1
for certain ASTsFile.cwd!/0
in Path.expand/1
and Path.absname/1
Path.relative_to/2
returns a relative path when the given argument does not share a common prefix with cwd
mix archive.install
mix escript.install
File.stream!(file, options, line_or_bytes)
in favor of keeping the options as last argument, as in File.stream!(file, line_or_bytes, options)
Kernel.ParallelCompiler.async/1
in favor of Kernel.ParallelCompiler.pmap/2
Path.safe_relative_to/2
in favor of Path.safe_relative/2
Mix.Task.Compiler.Diagnostic
Date.range/3
with a negative step insteadEnum.slice/2
, give first..last//1
instead~R/.../
is deprecated in favor of ~r/.../
. This is because ~R/.../
still allowed escape codes, which did not fit the definition of uppercase sigilsString.slice/2
, give first..last//1
insteadformat_time/2
, use format_times/1
instead:leex
to be added as a compiler to run the leex
compiler:yecc
to be added as a compiler to run the yecc
compiler:emit_warnings
for Code.string_to_quoted/2
:offset
option to File.stream!/2
String.replace_invalid/2
Logger.levels/0
--sparse
option:applications
and :extra_applications
are used:details
when possible--sparse
optioninclude/
directory in releasesMacro.to_string/1
for certain ASTsFile.cwd!/0
in Path.expand/1
and Path.absname/1
Elixir v1.15 introduced a new compiler diagnostic format and the ability to print multiple error diagnostics per compilation (in addition to multiple warnings).
With Elixir v1.16, we also include code snippets in exceptions and diagnostics raised by the compiler. For example, a syntax error now includes a pointer to where the error happened:
** (SyntaxError) invalid syntax found on lib/my_app.ex:1:17:
error: syntax error before: '*'
│
1 │ [1, 2, 3, 4, 5, *]
│ ^
│
└─ lib/my_app.ex:1:17
For mismatched delimiters, it now shows both delimiters:
** (MismatchedDelimiterError) mismatched delimiter found on lib/my_app.ex:1:18:
error: unexpected token: )
│
1 │ [1, 2, 3, 4, 5, 6)
│ │ └ mismatched closing delimiter (expected "]")
│ └ unclosed delimiter
│
└─ lib/my_app.ex:1:18
Errors and warnings diagnostics also include code snippets. When possible, we will show precise spans, such as on undefined variables:
error: undefined variable "unknown_var"
│
5 │ a - unknown_var
│ ^^^^^^^^^^^
│
└─ lib/sample.ex:5:9: Sample.foo/1
Otherwise the whole line is underlined:
error: function names should start with lowercase characters or underscore, invalid name CamelCase
│
3 │ def CamelCase do
│ ^^^^^^^^^^^^^^^^
│
└─ lib/sample.ex:3
A huge thank you to Vinícius Muller for working on the new diagnostics.
Elixir's Getting Started guided has been made part of the Elixir repository and incorporated into ExDoc. This was an opportunity to revisit and unify all official guides and references.
We have also incorporated and extended the work on Understanding Code Smells in Elixir Functional Language, by Lucas Vegi and Marco Tulio Valente, from ASERG/DCC/UFMG, into the official document in the form of anti-patterns. The anti-patterns are divided into four categories: code-related, design-related, process-related, and meta-programming. Our goal is to give all developers examples of potential anti-patterns, with context and examples on how to improve their codebases.
Another ExDoc feature we have incorporated in this release is the addition of cheatsheets, starting with a cheatsheet for the Enum module. If you would like to contribute future cheatsheets to Elixir itself, feel free to start a discussion with an issue.
Finally, we have started enriching our documentation with Mermaid.js diagrams. You can find examples in the GenServer and Supervisor docs.
MismatchedDelimiterError
for handling mismatched delimiter exceptions\r\n
UndefinedFunctionError
Kernel.ParallelCompiler.pmap/2
to compile multiple additional entries in parallelTrue
/False
/Nil
are used as aliases and there is no such aliasMacro.compile_apply/4
@nifs
annotation from Erlang/OTP 25@dialyzer
configuration:limit
option to Task.yield_many/2
MIX_PROFILE
to profile a list of comma separated taskslib/
and one of them is changedmix test test/foo_test.exs:13 test/bar_test.exs:27
Code.Fragment.surround_context/2
when matching on ->
IO.binwrite/2
on terminated device (mirroring IO.write/2
)dbg
module is a compile-time dependencyunquote/1
and the function/macro itself is unusedElixir.
in their definition@after_compile
callbacks to avoid deadlocksPath.relative_to/2
returns a relative path when the given argument does not share a common prefix with cwd
File.stream!(file, options, line_or_bytes)
in favor of keeping the options as last argument, as in File.stream!(file, line_or_bytes, options)
Kernel.ParallelCompiler.async/1
in favor of Kernel.ParallelCompiler.pmap/2
Path.safe_relative_to/2
in favor of Path.safe_relative/2
Date.range/3
with a negative step insteadEnum.slice/2
, give first..last//1
instead~R/.../
is deprecated in favor of ~r/.../
. This is because ~R/.../
still allowed escape codes, which did not fit the definition of uppercase sigilsString.slice/2
, give first..last//1
insteadformat_time/2
, use format_times/1
instead:leex
to be added as a compiler to run the leex
compiler:yecc
to be added as a compiler to run the yecc
compilerThis release also includes fixes to the Windows installer.
*
in bitstringsCode.quoted_to_algebra/2
:extra_applications
declare in umbrella projects are loadedCode.Fragment.surround_context/2
for aliases and submodules of non-aliasesblake
is always availableMix.install/2
with_diagnostics
propagate warnings from inner Erlang passes--remsh
on Erlang/OTP 25 and earlier__mix_recompile__?
callbacks are properly invoked