You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+40-6Lines changed: 40 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,31 @@
1
1
# Changelog for Elixir v1.6
2
2
3
-
## Compiler diagnostics
3
+
## Code formatter
4
4
5
5
TODO.
6
6
7
-
## Code formatter
7
+
## Dynamic Supervisor
8
+
9
+
TODO.
10
+
11
+
## @deprecated and @since attributes
8
12
9
13
TODO.
10
14
11
-
## Stream data and property testing
15
+
## defguard and defguardp
12
16
13
17
TODO.
14
18
19
+
## IEx improvements
20
+
21
+
IEx also got its share of improvements. The new code formatter allows us to pretty print code snippets, types and specifications, improving the overall experience when exploring code through the terminal.
22
+
23
+
The autocomplete mechanism also got smarter, being able to provide context autocompletion. For example, typing `t Enum.` and hitting TAB will autocomplete only the types in Enum (in contrast to all functions). Typing `b Enum` and hitting TAB will autocomplete only the behaviour callbacks.
24
+
25
+
Finally, the breakpoint functionality added in Elixir v1.5 has been improved to support pattern matching and guards. For example, to pattern match on a function call when the first argument is the atom `:foo`, you may do:
26
+
27
+
break! SomeFunction.call(:foo, _, _)
28
+
15
29
## mix xref
16
30
17
31
`mix xref` is a task added in Elixir v1.3 which provides general information about how modules and files in an application depend on each other. This release brings many improvements to `xref`, extending the reach of the analysis and helping developers digest the vast amount of data it produces.
@@ -68,6 +82,8 @@ The `graph` command in `mix xref` can also output general statistics about the g
68
82
69
83
Those improvements will help developers better understand the relationship between files and reveal potentially complex parts of their systems.
70
84
85
+
Other improvements in Mix include the `mix xref` enhancements above, better compiler diagnostics for editor integration, support for the `--slowest N` flag in `mix test` that shows the slowest tests in your suite, and a new `mix profile.eprof` task that provides time based profiling, complementing the existing `mix profile.cprof` (count based) and `mix profile.fprof` (flame based).
86
+
71
87
## v1.6.0-dev
72
88
73
89
### 1. Enhancements
@@ -78,22 +94,30 @@ Those improvements will help developers better understand the relationship betwe
78
94
79
95
#### Elixir
80
96
97
+
*[Calendar] Add truncate to `Time`, `DateTime` and `NaiveDateTime` to facilitate microsecond precision pruning
81
98
*[Code] Add `format_string!/2` and `format_file!/2` for automatic code formatting
82
99
*[Code] Support column annotations in quoted expressions with `columns: true` in `Code.string_to_quoted/2`
100
+
*[DynamicSupervisor] Add `DynamicSupervisor` designed to manage children that are added and removed dynamically
101
+
*[Exception] Make `Exception.blame/3` extensible by adding an optional `blame/2` callback to exceptions
83
102
*[Enumerable] Add `Enumerable.slice/1` and optimize many `Enum` operations with the new protocol. This allows data-structures with index-based random access to provide a non-linear implementation
84
-
*[Inspect.Algebra] Add `:strict` and `:flex` breaks
103
+
*[Inspect] Show UTF-8 BOM on inspected strings
104
+
*[Inspect.Algebra] Add `:strict` and `:flex` breaks - this gives more control over the document fitting
85
105
*[Inspect.Algebra] Allow a group to inherit the parent group break
86
106
*[Inspect.Algebra] Add `force_unfit/1` and `next_break_fits/2` which give more control over document fitting
87
107
*[Inspect.Algebra] Add `collapse_lines/1` for collapsing multiple lines to a maximum value
88
108
*[Inspect.Algebra] Allow `nest/2` to be `:reset` or be set to the current `:cursor` position
89
109
*[Kernel] Prefix variables with V when emitting Erlang code. This improves the integration with tools such as Erlang code formatters and the GUI debugger
90
110
*[Kernel] Warn on the use of `length(x) == 0` in guards
91
111
*[Kernel] Warn if `catch` comes before `rescue` in try
112
+
*[Kernel] Add `defguard/1` and `defguardp/1` to make it easier to build guard-safe macros
92
113
*[Kernel.ParallelCompiler] Add `compile/2`, `compile_to_path/3` and `require/2` which provide detailed information about warnings and errors
114
+
*[Kernel.SpecialForms] Support the `uniq: true` flag in `for` comprehensions
115
+
*[Module] Introduce `@deprecated` and `@since` attributes
93
116
*[Stream] Add `Stream.intersperse/2`
94
117
*[String] Update to Unicode 10
95
118
*[String] Allow passing empty string `match` to `String.replace/4`
96
-
*[Task] Allow a custom supervisor to be given to `Task.Supervisor.async_stream/3`
119
+
*[String] Support context and language sensitive operations in `String.upcase/2` and `String.downcase/2`. Currently only the `:greek` context is supported
120
+
*[String] Support `:ascii` conversion in `String.upcase/2` and `String.downcase/2`
97
121
*[Time] Add `Time.add/3`
98
122
99
123
#### ExUnit
@@ -103,11 +127,14 @@ Those improvements will help developers better understand the relationship betwe
103
127
104
128
#### IEx
105
129
130
+
*[IEx.Autocomplete] Provide contextual autocompletion: `t Enum.` will autocomplete types, `b Enum` will autocomplete callbacks
106
131
*[IEx.Helpers] Automatically include specs when showing documentation for functions/macros
107
132
*[IEx.Helpers] Improve formatting of behaviours and typespecs by using the formatter
133
+
*[IEx.Helpers] Allow pattern matching and guard expressions when on `IEx.break!`
108
134
109
135
#### Mix
110
136
137
+
*[mix app.start] Add `--preload-modules` to `mix app.start`
111
138
*[mix archive.build] Allow `mix archive.build` to bundle dot files via an option
112
139
*[mix compile] Define a behavior for Mix compiler tasks and return diagnostics from compiler tasks
113
140
*[mix compile] Track struct dependencies between files and recompile them only if the struct changes
@@ -119,22 +146,28 @@ Those improvements will help developers better understand the relationship betwe
119
146
*[mix xref] Support `--include-siblings` in reports for umbrella support
120
147
*[mix xref] Add `mix xref graph --format stats`
121
148
*[mix xref] Add `--only-nodes` and `--label` filters to mix xref graph
149
+
*[mix xref] Add `mix xref deprecated` that shows the callsite of deprecated functions
122
150
123
151
### 2. Bug fixes
124
152
125
153
#### Elixir
126
154
127
155
*[CLI] Support path with spaces as argument to elixir.bat
156
+
*[Integer] Do not raise on non-integer values in `is_odd`/`is_even`
128
157
*[Kernel] Solve a precedence issue between `&` and `|`, such as `[&Foo.bar/1 | &Baz.bat/2]`
129
158
*[Kernel] Do not load dynamic Elixir modules as `:in_memory` as this value is not officially supported by the code server. Instead, use an empty list, which is the same value used by Erlang.
130
159
*[Kernel] Validate variable struct name is atom when used in pattern matching
131
160
*[Macro] Fix `Macro.to_string/2` for tuple calls, such as `alias Foo.{Bar, Baz}`
132
161
*[MapSet] Return valid MapSet when unioning a legacy MapSet
133
-
*[String] Properly downcase the greek sigma letter in `String.downcase/1`
162
+
*[Regex] Return a leading empty space when splitting on empty pattern. This makes the `split` operation consistent with the other operations in the `Regex` module
163
+
*[Stream] Ensure `Stream.chunk_while/4` does not emit more elements than necessary when halted
164
+
*[String] Return a leading empty space when splitting on emtry string. This makes the `split` operation consistent with the other operations in the `String` module
134
165
*[URI] Preserve empty fragments in `URI.parse/1`
135
166
136
167
#### Mix
137
168
169
+
*[mix app.start] Improve the quality of reports if app fails to boot
170
+
*[mix cmd] Allow `mix cmd` to be invoked multiple times without marking it as executed
138
171
*[mix deps] Ensure optional dependencies in umbrella applications are loaded
139
172
*[mix xref] Take compile dependencies with higher priority than runtime ones when building a graph
140
173
*[mix xref] Handle external files for xref callers and warnings
@@ -146,6 +179,7 @@ Those improvements will help developers better understand the relationship betwe
146
179
*[Inspect.Algebra]`surround/3` and `surround_many/6` are deprecated in favor of `container_doc/6`
147
180
*[Kernel.ParallelCompiler]`files/2` and `files_to_path/3` are deprecated in favor of `compile/2` and `compile_to_path/3`
148
181
*[Kernel.ParallelRequire]`files/2` is deprecated in favor of `Kernel.ParallelCompiler.require/2`
182
+
*[GenServer] Warn if `init/1` is not defined in `GenServer`. This brings GenServer closer to the implementation in OTP and aligns all behaviours to require the `init/1` callback
0 commit comments