Skip to content

Commit 177dc8a

Browse files
committed
Release v1.19.0
1 parent bba8835 commit 177dc8a

File tree

5 files changed

+56
-103
lines changed

5 files changed

+56
-103
lines changed

CHANGELOG.md

Lines changed: 48 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ While Elixir has always compiled the given files in project or a dependency in p
122122

123123
### Code loading bottlenecks
124124

125-
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.
125+
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 parallelization, especially on large projects.
126126

127-
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.
127+
This release makes it so modules are loaded lazily. This reduces the pressure on the code server and the amount of work during compilation, with reports of more than two times faster compilation for large projects. The benefits depend on the codebase size and the number of CPU cores available.
128128

129129
Implementation wise, [the parallel compiler already acts as a mechanism to resolve modules during compilation](https://elixir-lang.org/blog/2012/04/24/a-peek-inside-elixir-s-parallel-compiler/), so we built on that. By making sure the compiler controls both module compilation and module loading, it can also better guarantee deterministic builds.
130130

@@ -140,7 +140,7 @@ defmodule MyLib.SomeModule do
140140
end
141141
```
142142

143-
Because the spawned module is not visible by the compiler, it won't be able to load `MyLib.SomeOtherModule`. You have two options, either use `Kernel.ParallelCompiler.pmap/2` or explicitly call `Code.ensure_loaded!(MyLib.SomeOtherModule)` before spawning the process that uses said module.
143+
Because the spawned process is not visible to the compiler, it won't be able to load `MyLib.SomeOtherModule`. You have two options, either use `Kernel.ParallelCompiler.pmap/2` or explicitly call `Code.ensure_compiled!(MyLib.SomeOtherModule)` before spawning the process that uses said module.
144144

145145
The second one is related to `@on_load` callbacks (typically used for [NIFs](https://www.erlang.org/doc/system/nif.html)) that invoke other modules defined within the same project. For example:
146146

@@ -162,13 +162,13 @@ MyLib.SomeModule.something_else()
162162

163163
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.
164164

165-
Both snippets above could actually lead to non-deterministic compilation in the past, and as a result of these changes, compilating these cases are now deterministic.
165+
Both snippets above could actually lead to non-deterministic compilation failures in the past, and as a result of these changes, compiling these cases are now deterministic.
166166

167167
### Parallel compilation of dependencies
168168

169169
This release introduces a variable called `MIX_OS_DEPS_COMPILE_PARTITION_COUNT`, which instructs `mix deps.compile` to compile dependencies in parallel.
170170

171-
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.
171+
While fetching dependencies and compiling individual Elixir dependencies already happened in parallel, as outlined in the previous section, there were pathological cases where performance gains would be left on the table, such as when compiling dependencies with native code or dependencies where one or two large files would take most of the compilation time.
172172

173173
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.
174174

@@ -201,9 +201,9 @@ Given this may reduce the amount of data printed by default, the default limit h
201201

202202
## Erlang/OTP 28 support
203203

204-
Elixir v1.19 officially supports Erlang/OTP 28.1+ and later. In order to support the new Erlang/OTP 28 representation for regular expressions, structs can now control how they are escaped by defining a `__escape__/1` callback that must return AST.
204+
Elixir v1.19 officially supports Erlang/OTP 28.1+ and later. In order to support the new Erlang/OTP 28 representation for regular expressions, structs can now control how they are escaped into abstract syntax trees by defining a `__escape__/1` callback.
205205

206-
On the other, the new representation for regular expressions implies they can no longer be used as default values for struct fields. Instead of this:
206+
On the other hand, the new representation for regular expressions implies they can no longer be used as default values for struct fields. Instead of this:
207207

208208
```elixir
209209
defmodule Foo do
@@ -232,92 +232,9 @@ Elixir v1.19 is also our first release following OpenChain compliance, [as previ
232232

233233
These additions offer greater transparency into the components and licenses of each release, supporting more rigorous supply chain requirements.
234234

235-
This work was performed by Jonatan Männchen and sponsored by the Erlang Ecosystem Foundation.
235+
This work was performed by [Jonatan Männchen](https://maennchen.dev) and sponsored by the [Erlang Ecosystem Foundation](https://erlef.org).
236236

237-
## v1.19.0-rc.2 (2025-10-07)
238-
239-
### 1. Enhancements
240-
241-
#### Elixir
242-
243-
* [Regex] Raise error message when regexes are used as default values in struct fields for compatibility with Erlang/OTP 28
244-
* [Registry] Add key-based partitioning of duplicate registries
245-
246-
### 2. Bug fixes
247-
248-
#### Elixir
249-
250-
* [Kernel] Address issue with type checking not completing on protocol consolidation
251-
252-
#### ExUnit
253-
254-
* [ExUnit] Do not crash on empty test unit groups
255-
256-
#### Mix
257-
258-
* [mix help] Add `mix help app:APP`
259-
* [mix test] Fix module preloading in `mix test --slowest-modules=N`
260-
261-
## v1.19.0-rc.1 (2025-10-05)
262-
263-
### 1. Enhancements
264-
265-
#### Elixir
266-
267-
* [Kernel] Raise when U+2028 and U+2029 characters are present in comments and strings to avoid line spoofing attacks
268-
* [Kernel] Include the line for the previous clause in errors/warnings related to conflicts between defaults on function definitions
269-
* [Macro] Add `__escape__/1` callback so structs can escape references and other runtime data types in `Macro.escape/1`
270-
* [OptionParser] Support the `:regex` type
271-
* [OptionParser] Enhance parsing error to display available options
272-
* [String] Update to Unicode 17.0.0
273-
274-
#### ExUnit
275-
276-
* [ExUnit] Set a process label for each test
277-
278-
#### Logger
279-
280-
* [Logger] Accept any enumerable in `Logger.metadata/1`
281-
282-
#### Mix
283-
284-
* [mix format] Add options to mix format to allow excluding of files
285-
* [mix test] Add `--name-pattern` option to `mix test`
286-
* [Mix.install/2] Support the `:compilers` option
287-
288-
### 2. Bug fixes
289-
290-
#### Elixir
291-
292-
* [Code] Return error on invalid unicode sequences in `Code.string_to_quoted/2` instead of raising
293-
* [Code] Properly handle column annotation for `in` in `not in` expressions
294-
* [Enum] Fix infinite loop on `Enum.take/2` with negative index on empty enumerable
295-
* [Inspect] Inspect ill-formed structs as maps
296-
* [Kernel] Properly increment metadata newline when `?` is followed by a literal newline character
297-
298-
#### ExUnit
299-
300-
* [ExUnit.Assertions] Fix order in ExUnit results when listing pinned variables
301-
* [ExUnit.Assertions] Raise if attempting to raise an assertion error with invalid message (not a binary)
302-
303-
#### IEx
304-
305-
* [IEx] Abort pipelines when there is an error in any step along the way
306-
307-
#### Mix
308-
309-
* [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
310-
* [mix compile] Avoid failures when locking compilation across different users
311-
* [mix compile] Fix race condition when renaming files used by the compilation lock
312-
* [mix test] Prevent `mix test` from overriding `:failures_manifest_path` option
313-
314-
### 3. Hard deprecations
315-
316-
#### Elixir
317-
318-
* [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
319-
320-
## v1.19.0-rc.0 (2025-06-09)
237+
## v1.19.0 (2025-10-16)
321238

322239
### 1. Enhancements
323240

@@ -335,18 +252,26 @@ This work was performed by Jonatan Männchen and sponsored by the Erlang Ecosyst
335252
* [Inspect] Allow `optional: :all` when deriving Inspect
336253
* [Inspect.Algebra] Add optimistic/pessimistic groups as a simplified implementation of `next_break_fits`
337254
* [IO.ANSI] Add ANSI codes to turn off conceal and crossed_out
338-
* [Kernel] Allow controlling which applications are used during inference
255+
* [Kernel] Raise when U+2028 and U+2029 characters are present in comments and strings to avoid line spoofing attacks
256+
* [Kernel] Include the line for the previous clause in errors/warnings related to conflicts between defaults on function definitions
339257
* [Kernel] Support `min/2` and `max/2` as guards
340258
* [Kernel.ParallelCompiler] Add `each_long_verification_threshold` which invokes a callback when type checking a module takes too long
341259
* [Kernel.ParallelCompiler] Include lines in `== Compilation error in file ... ==` slogans
342260
* [Macro] Print debugging results from `Macro.dbg/3` as they happen, instead of once at the end
261+
* [Macro] Add `__escape__/1` callback so structs can escape references and other runtime data types in `Macro.escape/1`
343262
* [Module] Do not automatically load modules after their compilation, guaranteeing a more consistent compile time experience and drastically improving compilation times
263+
* [OptionParser] Support the `:regex` type
264+
* [OptionParser] Enhance parsing error to display available options
344265
* [Protocol] Type checking of protocols dispatch and implementations
345266
* [Regex] Add `Regex.to_embed/2` which returns an embeddable representation of regex in another regex
267+
* [Regex] Raise error message when regexes are used as default values in struct fields for compatibility with Erlang/OTP 28
268+
* [Registry] Add key-based partitioning of duplicate registries
346269
* [String] Add `String.count/2` to count occurrences of a pattern
270+
* [String] Update to Unicode 17.0.0
347271

348272
#### ExUnit
349273

274+
* [ExUnit] Set a process label for each test
350275
* [ExUnit.CaptureLog] Parallelize log dispatch when multiple processes are capturing log
351276
* [ExUnit.Case] Add `:test_group` to the test context
352277
* [ExUnit.Doctest] Support ellipsis in doctest exceptions to match the remaining of the exception
@@ -357,36 +282,61 @@ This work was performed by Jonatan Männchen and sponsored by the Erlang Ecosyst
357282
* [IEx] Support multi-line prompts (due to this feature, `:continuation_prompt` and `:alive_continuation_prompt` are no longer supported as IEx configuration)
358283
* [IEx.Autocomplete] Functions annotated with `@doc group: "Name"` metadata will appear within their own groups in autocompletion
359284

285+
#### Logger
286+
287+
* [Logger] Accept any enumerable in `Logger.metadata/1`
288+
360289
#### Mix
361290

362291
* [mix] Add support for `MIX_PROFILE_FLAGS` to configure `MIX_PROFILE`
363292
* [mix compile] Debug the compiler and type checker PID when `MIX_DEBUG=1` and compilation/verification thresholds are met
364293
* [mix compile] Add `Mix.Tasks.Compiler.reenable/1`
365294
* [mix deps.compile] Support `MIX_OS_DEPS_COMPILE_PARTITION_COUNT` for compiling deps concurrently across multiple operating system processes
366-
* [mix help] Add `mix help Mod`, `mix help :mod`, `mix help Mod.fun` and `mix help Mod.fun/arity`
295+
* [mix help] Add `mix help Mod`, `mix help :mod`, `mix help Mod.fun`, `mix help Mod.fun/arity`, and `mix help app:package`
296+
* [mix format] Add options to mix format to allow excluding of files
297+
* [mix test] Add `--name-pattern` option to `mix test`
367298
* [mix test] Allow to distinguish the exit status between warnings as errors and test failures
368299
* [mix xref graph] Add support for `--format json`
369300
* [mix xref graph] Emit a warning if `--source` is part of a cycle
370-
* [M ix.Task.Compiler] Add `Mix.Task.Compiler.run/2`
301+
* [Mix] Support the `:compilers` option
302+
* [Mix.Task.Compiler] Add `Mix.Task.Compiler.run/2`
371303

372304
### 2. Bug fixes
373305

374306
#### Elixir
375307

308+
* [Code] Return error on invalid unicode sequences in `Code.string_to_quoted/2` instead of raising
309+
* [Code] Properly handle column annotation for `in` in `not in` expressions
376310
* [DateTime] Do not truncate microseconds regardless of precision in `DateTime.diff/3`
311+
* [Enum] Fix infinite loop on `Enum.take/2` with negative index on empty enumerable
377312
* [File] Properly handle permissions errors cascading from parent in `File.mkdir_p/1`
313+
* [Inspect] Inspect ill-formed structs as maps
314+
* [Kernel] Properly increment metadata newline when `?` is followed by a literal newline character
378315
* [Kernel] `not_a_map.key` now raises `BadMapError` for consistency with other map operations
379316
* [Protocol] `defstruct/1` and `defexception/1` are now disabled inside `defprotocol` as to not allow defining structs/exceptions alongside a protocol
380317
* [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`)
381318
* [Stream] Ensure `Stream.transform/5` respects suspend command when its inner stream halts
382319
* [URI] Several fixes to `URI.merge/2` related to trailing slashes, trailing dots, and hostless base URIs
383320

321+
#### ExUnit
322+
323+
* [ExUnit.Assertions] Fix order of pinned variables in failure reports
324+
* [ExUnit.Assertions] Raise if attempting to raise an assertion error with invalid message (not a binary)
325+
* [ExUnit.Case] Do not crash on empty test unit groups
326+
327+
#### IEx
328+
329+
* [IEx] Abort pipelines when there is an error in any step along the way
330+
384331
#### Mix
385332

386333
* [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
334+
* [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
335+
* [mix compile] Avoid failures when locking compilation across different users
336+
* [mix compile] Fix race condition when renaming files used by the compilation lock
387337
* [mix format] Ensure the formatter does not go over the specified limit in certain corner cases
388338
* [mix release] Fix `RELEASE_SYS_CONFIG` for Windows 11
389-
* [mix test] Preserve files with no longer filter on `mix test`
339+
* [mix test] Ensure modules are preloaded in `mix test --slowest-modules=N`
390340
* [mix xref graph] Provide more consistent output by considering strong connected components only when computing graphs
391341

392342
### 3. Soft deprecations (no warnings emitted)
@@ -399,12 +349,13 @@ This work was performed by Jonatan Männchen and sponsored by the Erlang Ecosyst
399349
#### Mix
400350

401351
* [mix compile] `--no-protocol-consolidation` is deprecated in favor of `--no-consolidate-protocols` for consistency with `mix.exs` configuration
402-
* [mix compile.protocols] Protocol consolidation is now part of `compile.elixir` and has no effect
352+
* [mix compile.protocols] Protocol consolidation is now part of `compile.elixir` and the task itself has no effect
403353

404354
### 4. Hard deprecations
405355

406356
#### Elixir
407357

358+
* [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
408359
* [Code] The `on_undefined_variable: :warn` is deprecated. Relying on undefined variables becoming function calls will not be supported in the future
409360
* [File] Passing a callback as third argument to `File.cp/3` is deprecated, pass it as a `on_conflict: callback` option instead
410361
* [File] Passing a callback as third argument to `File.cp_r/3` is deprecated, pass it as a `on_conflict: callback` option instead

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.19.0-rc.2
1+
1.19.0

bin/elixir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
set -e
88

9-
ELIXIR_VERSION=1.19.0-rc.2
9+
ELIXIR_VERSION=1.19.0
1010

1111
if [ $# -eq 0 ] || { [ $# -eq 1 ] && { [ "$1" = "--help" ] || [ "$1" = "-h" ]; }; }; then
1212
cat <<USAGE >&2

bin/elixir.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
:: SPDX-FileCopyrightText: 2021 The Elixir Team
55
:: SPDX-FileCopyrightText: 2012 Plataformatec
66

7-
set ELIXIR_VERSION=1.19.0-rc.2
7+
set ELIXIR_VERSION=1.19.0
88

99
if ""%1""=="""" if ""%2""=="""" goto documentation
1010
if /I ""%1""==""--help"" if ""%2""=="""" goto documentation

0 commit comments

Comments
 (0)