Skip to content

Commit 4e96f92

Browse files
committed
Update CHANGELOG
1 parent 6c1138d commit 4e96f92

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed

CHANGELOG.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,97 @@
11
# Changelog for Elixir v1.16
22

3+
## Code snippets in diagnostics
4+
5+
Elixir v1.15 introduced a new compiler diagnostic format and the ability to print multiple error diagnostics per compilation (in addition to multiple warnings).
6+
7+
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:
8+
9+
```
10+
** (SyntaxError) invalid syntax found on nofile:1:17:
11+
error: syntax error before: '*'
12+
13+
1 │ [1, 2, 3, 4, 5, *]
14+
│ ^
15+
16+
└─ lib/my_app.ex:1:17
17+
```
18+
19+
For mismatched delimiters, it now shows both delimiters:
20+
21+
```
22+
** (MismatchedDelimiterError) mismatched delimiter found on nofile:1:18:
23+
error: unexpected token: )
24+
25+
1 │ [1, 2, 3, 4, 5, 6)
26+
│ │ └ mismatched closing delimiter (expected "]")
27+
│ └ unclosed delimiter
28+
29+
└─ lib/my_app.ex:1:18
30+
```
31+
32+
Errors and warnings diagnostics also include code snippets. When possible, we will show precise spans, such as on undefined variables:
33+
34+
```
35+
error: undefined variable "unknown_var"
36+
37+
5 │ a - unknown_var
38+
│ ^^^^^^^^^^^
39+
40+
└─ lib/sample.ex:5:9: Sample.foo/1
41+
```
42+
43+
Otherwise the whole line is underlined:
44+
45+
```
46+
error: function names should start with lowercase characters or underscore, invalid name CamelCase
47+
48+
3 │ def CamelCase do
49+
│ ^^^^^^^^^^^^^^^^
50+
51+
└─ lib/sample.ex:3
52+
```
53+
54+
## Revamped documentation
55+
56+
TODO: Guides, diagrams, anti-patterns, cheatsheets.
57+
358
## v1.16.0-dev
459

560
### 1. Enhancements
661

62+
#### EEx
63+
64+
* [EEx] Include relative file information in diagnostics
65+
66+
#### Elixir
67+
68+
* [Code] Automatically include columns in parsing options
69+
* [Code] Introduce `MismatchedDelimiterError` for handling mismatched delimiter exceptions
70+
* [Code.Fragment] Handle anonymous calls in fragments
71+
* [Kernel] Suggest module names based on suffix and casing errors when the module does not exist in `UndefinedFunctionError`
72+
* [Kernel.ParallelCompiler] Introduce `Kernel.ParallelCompiler.pmap/2` to compile multiple additional entries in parallel
73+
* [Macro] Add `Macro.compile_apply/4`
74+
* [String] Update to Unicode 15.1.0
75+
776
### 2. Bug fixes
877

978
#### Elixir
1079

1180
* [IO] Raise when using `IO.binwrite/2` on terminated device (mirroring `IO.write/2`)
81+
* [Kernel] Do not expand aliases recursively (the alias stored in Macro.Env is already expanded)
82+
* [Kernel] Ensure `dbg` module is a compile-time dependency
83+
* [Kernel] Warn when a private function or macro uses `unquote/1` and the function/macro itself is unused
1284
* [Path] Ensure `Path.relative_to/2` returns a relative path when the given argument does not share a common prefix with `cwd`
1385

86+
#### ExUnit
87+
88+
* [ExUnit] Raise on incorrectly dedented doctests
89+
1490
### 3. Soft deprecations (no warnings emitted)
1591

92+
#### Elixir
93+
94+
* [Kernel.ParallelCompiler] Deprecate `Kernel.ParallelCompiler.async/1` in favor of `Kernel.ParallelCompiler.pmap/2`
1695
* [Path] Deprecate `Path.safe_relative_to/2` in favor of `Path.safe_relative/2`
1796

1897
### 4. Hard deprecations

0 commit comments

Comments
 (0)