1.18.0

Released on 2024-12-19

Changes

Type
enhancement
Tool
Elixir
Module
CLI
Description
Add experimental PowerShell scripts for `elixir`, `elixirc`, and `mix` on Windows. Those provide a safer entry point for running Elixir from other platforms
Type
enhancement
Tool
Elixir
Module
Calendar
Description
Add `Duration.to_string/1`
Type
enhancement
Tool
Elixir
Module
Code
Description
Support several migration options in `Code.format_string!/2`
Type
enhancement
Tool
Elixir
Module
Code
Description
Add parenthesis around `--` and `---` in `Code.format_string!/2` to make precedence clearer
Type
enhancement
Tool
Elixir
Module
Code
Description
Include more metadata in `Code.string_to_quoted/2` when `token_metadata: true` to help compute ranges from the AST
Type
enhancement
Tool
Elixir
Module
Code.Fragment
Description
Have `:capture_arg` as its own entry in `Code.Fragment.surround_context/2`
Type
enhancement
Tool
Elixir
Module
Config
Description
Add `Config.read_config/1`
Type
enhancement
Tool
Elixir
Module
Enumerable
Description
Add `Enum.product_by/2` and `Enum.sum_by/2`
Type
enhancement
Tool
Elixir
Module
Exception
Description
Add `MissingApplicationsError` exception to denote missing applications
Type
enhancement
Tool
Elixir
Module
JSON
Description
Add a new `JSON` module with encoding and decoding functionality
Type
enhancement
Tool
Elixir
Module
JSON
Description
Implement `JSON.Encoder` for all Calendar types
Type
enhancement
Tool
Elixir
Module
Kernel
Description
Update source code parsing to match [UTS #55](https://www.unicode.org/reports/tr55/) latest recommendations. In particular, mixed script is allowed in identifiers as long as they are separate by underscores (`_`), such as `http_сервер`. 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
Type
enhancement
Tool
Elixir
Module
Kernel
Description
Warn on bidirectional confusability in identifiers
Type
enhancement
Tool
Elixir
Module
Kernel
Description
Verify the type of the binary generators
Type
enhancement
Tool
Elixir
Module
Kernel
Description
Track the type of tuples in patterns and inside `elem/2`
Type
enhancement
Tool
Elixir
Module
Kernel
Description
Perform validation of root AST nodes in `unquote` and `unquote_splicing` to catch bugs earlier
Type
enhancement
Tool
Elixir
Module
Kernel
Description
Add source, behaviour, and record information to Docs chunk metadata
Type
enhancement
Tool
Elixir
Module
Kernel
Description
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
Type
enhancement
Tool
Elixir
Module
Kernel
Description
Allow aliases and imports to be enabled conditionally in module body
Type
enhancement
Tool
Elixir
Module
List
Description
Add `List.ends_with?/2`
Type
enhancement
Tool
Elixir
Module
Macro
Description
Improve `dbg` handling of `if/2`, `with/1` and of code blocks
Type
enhancement
Tool
Elixir
Module
Macro
Description
Add `Macro.struct_info!/2` to return struct information mirroring `mod.__info__(:struct)`
Type
enhancement
Tool
Elixir
Module
Registry
Description
Add `Registry.lock/3` for local locking
Type
enhancement
Tool
Elixir
Module
PartitionSupervisor
Description
Add `PartitionSupervisor.resize!/2` to resize the number of partitions in a supervisor (up to the limit it was started with)
Type
enhancement
Tool
Elixir
Module
Process
Description
Handle arbitrarily high integer values in `Process.sleep/1`
Type
enhancement
Tool
Elixir
Module
Protocol
Description
Add `@undefined_impl_description` to customize error message when an implementation is undefined
Type
enhancement
Tool
Elixir
Module
Protocol
Description
Add `__deriving__/1` as optional macro callback to `Protocol`, no longer requiring empty implementations
Type
enhancement
Tool
Elixir
Module
String
Description
Inspect special whitespace and zero-width characters using their Unicode representation
Type
enhancement
Tool
Elixir
Module
String
Description
Update Unicode to 16.0
Type
enhancement
Tool
ExUnit
Module
ExUnit
Description
Support parameterized tests on `ExUnit.Case`
Type
enhancement
Tool
ExUnit
Module
ExUnit
Description
Support test groups: tests in the same group never run concurrently
Type
enhancement
Tool
ExUnit
Module
ExUnit.Case
Description
Add `test_pid` as a tag
Type
enhancement
Tool
IEx
Module
IEx
Description
Add `IEx.configure(auto_reload: true)` to automatically pick up modules recompiled from other operating system processes
Type
enhancement
Tool
IEx
Module
IEx
Description
Add `:dot_iex` support to `IEx.configure/1`
Type
enhancement
Tool
IEx
Module
IEx
Description
Add report for normal/shutdown exits in IEx
Type
enhancement
Tool
Mix
Module
mix compile
Description
Ensure only a single operating system process can compile at a given time
Type
enhancement
Tool
Mix
Module
mix deps.get
Description
Ensure only a single operating system process can fetch deps at a given time
Type
enhancement
Tool
Mix
Module
mix format
Description
Add `mix format --migrate` to migrate from deprecated functionality
Type
enhancement
Tool
Mix
Module
mix format
Description
Add new options and metadata to improve formatting applying by editors and other environments
Type
enhancement
Tool
Mix
Module
mix test
Description
Taint failure manifest if requiring or compiling tests fail
Type
enhancement
Tool
Mix
Module
Mix.Project
Description
Add a `:listeners` configuration to listen to compilation events from the current and other operating system processes
Type
enhancement
Tool
Mix
Module
Mix.Task.Compiler
Description
Add API for fetching all persisted compiler diagnostics
Type
enhancement
Tool
Mix
Module
Mix.Task.Compiler
Description
Add API for fetching all compiler tasks
Type
bugfix
Tool
Elixir
Module
Code
Description
Fix delimiter metadata for single quoted atoms and remote calls in `Code.string_to_quoted/2`
Type
bugfix
Tool
Elixir
Module
Code.Formatter
Description
Fix formatter adding extra escapes to quoted remote calls
Type
bugfix
Tool
Elixir
Module
Code.Fragment
Description
Properly handle keyword keys as their own entry
Type
bugfix
Tool
Elixir
Module
Inspect.Algebra
Description
Ensure `next_break_fits` respects `line_length`
Type
bugfix
Tool
Elixir
Module
Kernel
Description
Validate AST on `unquote` and `unquote_splicing` to provide better error reports instead of failing too late inside the compiler
Type
bugfix
Tool
Elixir
Module
Kernel
Description
Avoid crashes when emitting diagnostics on code using \t for indentation
Type
bugfix
Tool
Elixir
Module
Module
Description
Include module attribute line and name when tracing its aliases
Type
bugfix
Tool
Elixir
Module
Stream
Description
Do not halt streams twice in `Stream.transform/5`
Type
bugfix
Tool
Elixir
Module
URI
Description
Fix a bug when a schemaless URI is given to `URI.merge/2`
Type
bugfix
Tool
ExUnit
Module
ExUnit.Assertions
Description
Raise if guards are used in `assert/1` with `=`
Type
bugfix
Tool
ExUnit
Module
ExUnit.Assertions
Description
Format inserted/deleted maps in list assertions
Type
bugfix
Tool
IEx
Module
IEx.Helpers
Description
`IEx.Helpers.recompile/0` will reload modules changed by other operating system processes
Type
bugfix
Tool
Mix
Module
mix compile
Description
Ensure warnings from external resources are emitted with `--all-warnings` when files do not change
Type
bugfix
Tool
Mix
Module
mix deps.compile
Description
Fix escaping issues when invoking `rebar3` in some cases
Type
bugfix
Tool
Mix
Module
mix escript
Description
Fix escript layout and support storing `priv` directories
Type
bugfix
Tool
Mix
Module
mix release
Description
Make `.app` files deterministic in releases
Type
bugfix
Tool
Mix
Module
Mix.Shell
Description
Fix `Mix.Shell` on Windows when outputting non UTF-8 characters
Type
enhancement
Tool
Elixir
Module
Inspect.Algebra
Description
`color/3` is deprecated in favor of `color_doc/3`
Type
enhancement
Tool
Elixir
Module
Inspect.Algebra
Description
`fold_doc/2` is deprecated in favor of `fold/2`
Type
enhancement
Tool
Elixir
Module
Kernel
Description
Deprecate `unless` in favor of `if`. Use `mix format --migrate` to automate the migration
Type
enhancement
Tool
Elixir
Module
Macro
Description
`Macro.struct!/2` is deprecated in favor of `Macro.struct_info!/2`
Type
enhancement
Tool
Elixir
Module
Protocol
Description
Defining `__deriving__/3` inside the `Any` implementation is deprecated, derive it inside the protocol definition itself
Type
hard_deprecation
Tool
EEx
Module
EEx
Description
`<%#` is deprecated in favor of `<%!--` or `<% #`
Type
hard_deprecation
Tool
EEx
Module
EEx
Description
`c:EEx.handle_text/2` is deprecated in favor of `c:EEx.handle_text/3`
Type
hard_deprecation
Tool
Elixir
Module
Code
Description
Setting `:warnings_as_errors` is deprecated via `Code.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 the `Code` module
Type
hard_deprecation
Tool
Elixir
Module
Enumerable
Description
Deprecate returning a two-arity function in `Enumerable.slice/1`
Type
hard_deprecation
Tool
Elixir
Module
List
Description
`List.zip/1` is deprecated in favor of `Enum.zip/1`
Type
hard_deprecation
Tool
Elixir
Module
Module
Description
Deprecate `Module.eval_quoted/3` in favor of `Code.eval_quoted/3`
Type
hard_deprecation
Tool
Elixir
Module
Range
Description
Deprecate inferring negative ranges on `Range.new/2`
Type
hard_deprecation
Tool
Elixir
Module
Tuple
Description
`Tuple.append/2` is deprecated, use `Tuple.insert_at/3` instead
Type
hard_deprecation
Tool
Mix
Module
mix cmd
Description
Deprecate `mix cmd --app APP` in favor of `mix do --app APP`
Type
hard_deprecation
Tool
Mix
Module
mix compile
Description
`:warnings_as_errors` configuration in `:elixirc_options` is deprecated. Instead pass the `--warnings-as-errors` flag to `mix compile`. Alternatively, you might alias the task: `aliases: [compile: "compile --warnings-as-errors"]`
Type
hard_deprecation
Tool
Mix
Module
mix test
Description
`:warnings_as_errors` configuration in `:test_elixirc_options` is deprecated. Instead pass the `--warnings-as-errors` flag to `mix test`. Alternatively, you might alias the task: `aliases: [test: "test --warnings-as-errors"]`
Type
hard_deprecation
Tool
Mix
Module
Mix.Tasks.Compile
Description
Deprecate `compilers/0` in favor of `Mix.Task.Compiler.compilers/0`