Skip to content

Commit f295a89

Browse files
committed
Update CHANGELOG
1 parent f445cb9 commit f295a89

File tree

2 files changed

+42
-6
lines changed

2 files changed

+42
-6
lines changed

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,33 @@ While fetching your dependencies and compiling an Elixir dependency in itself al
174174

175175
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.
176176

177+
## Improved pretty printing algorithm
178+
179+
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 be pretty printed as follows:
180+
181+
```elixir
182+
[
183+
[1, 2, 3],
184+
[1, 2, ...],
185+
[1, ...],
186+
[...],
187+
...
188+
]
189+
```
190+
191+
While this allows for more information to be shown at different nesting levels, which is useful for complex data structures, it lead to some pathological cases where the `limit` option had little effect in actual 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:
192+
193+
```elixir
194+
[
195+
[1, 2, 3],
196+
...
197+
]
198+
```
199+
200+
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.
201+
202+
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.
203+
177204
## OpenChain certification
178205

179206
Elixir v1.19 is also our first release following OpenChain compliance, [as previously announced](https://elixir-lang.org/blog/2025/02/26/elixir-openchain-certification/). In a nutshell:
@@ -196,12 +223,15 @@ These additions offer greater transparency into the components and licenses of e
196223
* [Code] Add `:indentation` option to `Code.string_to_quoted/2`
197224
* [Code.Fragment] Preserve more block content around cursor in `container_cursor_to_quoted`
198225
* [Code.Fragment] Add `:block_keyword_or_binary_operator` to `Code.Fragment` for more precise suggestions after operators and closing terminators
226+
* [Code.Fragment] Add `Code.Fragment.lines/1`
199227
* [Enum] Provide more information on `Enum.OutOfBoundsError`
200228
* [Inspect] Allow `optional: :all` when deriving Inspect
201229
* [Inspect.Algebra] Add optimistic/pessimistic groups as a simplified implementation of `next_break_fits`
230+
* [IO.ANSI] Add ANSI codes to turn off conceal and crossed_out
202231
* [Kernel] Allow controlling which applications are used during inference
203232
* [Kernel] Support `min/2` and `max/2` as guards
204233
* [Kernel.ParallelCompiler] Add `each_long_verification_threshold` which invokes a callback when type checking a module takes too long
234+
* [Kernel.ParallelCompiler] Include lines in `== Compilation error in file ... ==` slogans
205235
* [Macro] Print debugging results from `Macro.dbg/3` as they happen, instead of once at the end
206236
* [Module] Do not automatically load modules after their compilation, guaranteeing a more consistent compile time experience and drastically improving compilation times
207237
* [Protocol] Type checking of protocols dispatch and implementations
@@ -217,6 +247,7 @@ These additions offer greater transparency into the components and licenses of e
217247

218248
#### IEx
219249

250+
* [IEx] Support multi-line prompts (due to this feature, `:continuation_prompt` and `:alive_continuation_prompt` are no longer supported as IEx configuration)
220251
* [IEx.Autocomplete] Functions annotated with `@doc group: "Name"` metadata will appear within their own groups in autocompletion
221252

222253
#### Mix
@@ -229,13 +260,15 @@ These additions offer greater transparency into the components and licenses of e
229260
* [mix test] Allow to distinguish the exit status between warnings as errors and test failures
230261
* [mix xref graph] Add support for `--format json`
231262
* [mix xref graph] Emit a warning if `--source` is part of a cycle
263+
* [M ix.Task.Compiler] Add `Mix.Task.Compiler.run/2`
232264

233265
### 2. Bug fixes
234266

235267
#### Elixir
236268

237269
* [DateTime] Do not truncate microseconds regardless of precision in `DateTime.diff/3`
238270
* [File] Properly handle permissions errors cascading from parent in `File.mkdir_p/1`
271+
* [Kernel] `not_a_map.key` now raises `BadMapError` for consistency with other map operations
239272
* [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`)
240273
* [Stream] Ensure `Stream.transform/5` respects suspend command when its inner stream halts
241274
* [URI] Several fixes to `URI.merge/2` related to trailing slashes, trailing dots, and hostless base URIs
@@ -244,6 +277,7 @@ These additions offer greater transparency into the components and licenses of e
244277

245278
* [mix cmd] Preserve argument quoting in subcommands
246279
* [mix format] Ensure the formatter does not go over the specified limit in certain corner cases
280+
* [mix release] Fix `RELEASE_SYS_CONFIG` for Windows 11
247281
* [mix test] Preserve files with no longer filter on `mix test`
248282
* [mix xref graph] Provide more consistent output by considering strong connected components only when computing graphs
249283

lib/elixir/lib/inspect.ex

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,17 +112,19 @@ defprotocol Inspect do
112112
import Inspect.Algebra
113113
114114
def inspect(map_set, opts) do
115-
{doc, opts} = Inspect.List.inspect(MapSet.to_list(map_set), opts)
115+
{doc, opts} = to_doc_with_opts(MapSet.to_list(map_set), opts)
116116
{concat(["MapSet.new(", doc, ")"]), opts}
117117
end
118118
end
119119
120-
The [`concat/1`](`Inspect.Algebra.concat/1`) function comes from
121-
`Inspect.Algebra` and it concatenates algebra documents together.
120+
First [`to_doc_with_opts/2`](`Inspect.Algebra.to_doc_with_opts/2`) is
121+
used to convert another data structure into its algebra document and
122+
then [`concat/1`](`Inspect.Algebra.concat/1`) concatenates algebra
123+
documents together.
124+
122125
In the example above it is concatenating the string `"MapSet.new("`,
123-
the document returned by `Inspect.Algebra.to_doc/2`, and the final
124-
string `")"`. Therefore, the MapSet with the numbers 1, 2, and 3
125-
will be printed as:
126+
the document returned by `to_doc_with_opts/2`, and the final string `")"`.
127+
Therefore, the MapSet with the numbers 1, 2, and 3 will be printed as:
126128
127129
iex> MapSet.new([1, 2, 3], fn x -> x * 2 end)
128130
MapSet.new([2, 4, 6])

0 commit comments

Comments
 (0)