Skip to content

Commit e523eaa

Browse files
committed
Start v1.13-dev
1 parent de8e4f1 commit e523eaa

File tree

7 files changed

+37
-230
lines changed

7 files changed

+37
-230
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
otp_release: ['OTP-23.0', 'OTP-22.3', 'OTP-22.0', 'OTP-21.3.8', 'OTP-21.0']
18+
otp_release: ['OTP-23.0', 'OTP-22.3', 'OTP-22.0']
1919
development: [false]
2020
include:
2121
- otp_release: master

CHANGELOG.md

+5-201
Original file line numberDiff line numberDiff line change
@@ -1,223 +1,27 @@
1-
# Changelog for Elixir v1.12
1+
# Changelog for Elixir v1.13
22

3-
Elixir v1.12 is out with improvements to scripting, tighter Erlang/OTP 24 integration, stepped ranges, and dozen of new functions across the standard library. Overall this is a small release, which continues our tradition of bringing Elixir developers quality of live improvements every 6 months.
3+
Elixir v1.13 requires Erlang/OTP 22+.
44

5-
## Scripting improvements: `Mix.install/2` and `System.trap_signal/3`
6-
7-
Elixir v1.12 brings new conveniences for those using Elixir for scripting (via `.exs` files). Elixir has been capable of managing dependencies for a quite long time, but it could only be done within Mix projects. In particular, the Elixir team is wary of global dependencies as any scripts that rely on system packages are brittle and hard to reproduce whenever your system changes.
8-
9-
`Mix.install/2` is meant to be a sweetspot between single-file scripts and full-blown Mix projects. With `Mix.install/2`, you can list your dependencies on top of your scripts. When you execute the script for the first time, Elixir will download, compile, and cache your dependencies before running your script. Future invocations of the script will simply read the compiled artefacts from the cache:
10-
11-
```elixir
12-
Mix.install([:jason])
13-
IO.puts Jason.encode!(%{hello: :world})
14-
```
15-
16-
`Mix.install/2` also performs protocol consolidation, which gives script developers an option to execute their code in the most performant format possible.
17-
18-
**Note:** `Mix.install/2` is currently experimental and it may change in future releases.
19-
20-
Another improvement to scripting is the ability to trap exit signals via `System.trap_signal/3`. All you need is the signal name and a callback that will be invoked when the signal triggers. For example, ExUnit leverages this functionality to print all currently running tests when you abort the test suite via SIGQUIT (`Ctrl+\\ `):
21-
22-
```
23-
$ mix test
24-
.......................................................................
25-
.....................^\
26-
27-
Aborting test suite, the following have not completed:
28-
29-
* test query building [test/ecto/query_test.exs:48]
30-
* test placeholders in Repo.insert_all [test/ecto/repo_test.exs:502]
31-
32-
Showing results so far...
33-
34-
78 doctests, 1042 tests, 0 failures
35-
```
36-
37-
This is particularly useful when your tests get stuck and you want to know which one is the culprit.
38-
39-
**Important**: Trapping signals may have strong implications on how a system shuts down and behave in production and therefore it is extremely discouraged for libraries to set their own traps. Instead, they should redirect users to configure them themselves. The only cases where it is acceptable for libraries to set their own traps is when using Elixir in script mode, such as in `.exs` files and via Mix tasks.
40-
41-
## Tighter Erlang/OTP 24 integration
42-
43-
Erlang/OTP 24 ships with JIT compilation support and Elixir developers don't have to do anything to reap its benefits. There are many other features in Erlang/OTP 24 to look forwards to and Elixir v1.12 provides integration with many of them: such as support for 16bit floats in bitstrings as well as performance improvements in the compiler and during code evaluation.
44-
45-
Another excellent feature in Erlang/OTP 24 is the implementation of [EEP 54](http://erlang.org/eeps/eep-0054.html), which provides extended error information for many functions in Erlang's stdlib. Elixir v1.12 fully leverages this feature to improve reporting for errors coming from Erlang. For example, in earlier OTP versions, inserting an invalid argument into a ETS table that no longer exists would simply error with `ArgumentError`:
46-
47-
```
48-
Interactive Elixir (1.11.0)
49-
iex(1)> ets = :ets.new(:example, [])
50-
#Reference<0.3845811859.2669281281.223553>
51-
iex(2)> :ets.delete(ets)
52-
true
53-
iex(3)> :ets.insert(ets, :should_be_a_tuple)
54-
** (ArgumentError) argument error
55-
(stdlib 3.15) :ets.insert(#Reference<0.3845811859.2669281281.223553>, :should_be_a_tuple)
56-
```
57-
58-
However, in Elixir v1.12 with Erlang/OTP 24:
59-
60-
```
61-
Interactive Elixir (1.12.0)
62-
iex(1)> ets = :ets.new(:example, [])
63-
#Reference<0.105641012.1058144260.76455>
64-
iex(2)> :ets.delete(ets)
65-
true
66-
iex(3)> :ets.insert(ets, :should_be_a_tuple)
67-
** (ArgumentError) errors were found at the given arguments:
68-
69-
* 1st argument: the table identifier does not refer to an existing ETS table
70-
* 2nd argument: not a tuple
71-
72-
(stdlib 3.15) :ets.insert(#Reference<0.105641012.1058144260.76455>, :should_be_a_tuple)
73-
```
74-
75-
## Stepped ranges
76-
77-
Elixir has support for ranges from before its v1.0 release. Ranges support only integers and are inclusive, using the mathematic notation `a..b`. Ranges in Elixir are either increasing `1..10` or decreasing `10..1` and the direction of the range was always inferred from the starting and stop positions. Ranges are always lazy as its values are emitted as they are enumerated rather than being computed upfront.
78-
79-
Unfortunately, due to this inference, it is not possible to have empty ranges. For example, if you want to create a list of `n` elements, you can express it with a range from `1..n`, as `1..0` is a decreasing range with two elements.
80-
81-
Elixir v1.12 supports stepped ranges via the `first..last//step` notation. For example: `1..10//2` will emit the numbers `1`, `3`, `5`, `7`, and `9`. You can consider the `//` operator to perform "range division", as it effectively divides and rounds up the number of elements in the range by `step`. Steps can be either positive (increasing ranges) or negative (decreasing ranges). Stepped ranges bring more expressive power to Elixir ranges and they elegantly solve the empty range problem, as they allow the direction of the steps to be explicitly declared instead of inferred.
82-
83-
As of Elixir v1.12, implicitly decreasing ranges are soft-deprecated and warnings will be emitted in future Elixir versions based on our [deprecation policy](https://hexdocs.pm/elixir/compatibility-and-deprecations.html#deprecations).
84-
85-
## Additional functions
86-
87-
Elixir v1.12 has the additional of many functions across the standard library. The `Enum` module received additions such as `Enum.count_until/2`, `Enum.product/1`, `Enum.zip_with/2`, and more. The `Integer` module now includes `Integer.pow/2` and `Integer.extended_gcd/2`. The `Range` module now deals with stepped ranges and includes new convenience functions such as `Range.empty?/1` and `Range.size/1`. Finally, the `Kernel` module got two new functions, `Kernel.then/2` and `Kernel.tap/2`, which are specially useful in `|>` pipelines.
88-
89-
## v1.12.0-dev
5+
## v1.13.0-dev
906

917
### 1. Enhancements
928

939
#### EEx
9410

95-
* [EEx.Engine] Add `c:EEx.Engine.handle_text/3` callback that receives text metadata
96-
* [EEx.Engine] Emit warnings for unused "do" expression in EEx
97-
9811
#### Elixir
9912

100-
* [Code] Do not add newlines around interpolation on code formatting. Note this means formatted code that has interpolation after the line length on Elixir v1.12 won't be considered as formatted on earlier Elixir versions
101-
* [Calendar] Support basic datetime format in `Calendar.ISO` parsing functions
102-
* [Code] Improve evaluation performance on systems running on Erlang/OTP 24+
103-
* [Date] Support steps via `Date.range/3`
104-
* [DateTime] Add `offset` to `DateTime.to_iso8601/2` (now `to_iso8601/3`)
105-
* [Enum] Add `Enum.count_until/2` and `Enum.count_until/3`
106-
* [Enum] Add `Enum.product/1`
107-
* [Enum] Add `Enum.zip_with/2`, `Enum.zip_with/3`, `Enum.zip_reduce/3`, and `Enum.zip_reduce/4`
108-
* [Enum] Add support for functions as the second argument of `Enum.with_index/2`
109-
* [Exception] Show `error_info` data for exceptions coming from Erlang
110-
* [Float] Add `Float.pow/2`
111-
* [Integer] Add `Integer.pow/2` and `Integer.extended_gcd/2`
112-
* [List] Add default value for `List.first/1` and `List.last/1`
113-
* [Kernel] Add `start..stop//step` as support for stepped ranges
114-
* [Kernel] Also warn for literal structs on `min/2` and `max/2`
115-
* [Kernel] Add `Kernel.tap/2` and `Kernel.then/2`
116-
* [Kernel] Do not add runtime dependencies to remotes in typespecs
117-
* [Kernel] When there is an unused variable warning and there is a variable with the same name previously defined, suggest the user may have wanted to use the pin operator
118-
* [Kernel] Improve error messages on invalid character right after a number
119-
* [Kernel] Show removal and deprecated tips from Erlang/OTP
120-
* [Macro] Add export dependencies on `Macro.struct!/2`
121-
* [Macro] Support `:newline` to customize newlines escaping in `Macro.unescape_string/2`
122-
* [Module] Raise on invalid `@dialyzer` attributes
123-
* [Module] Add `Module.get_definition/2` and `Module.delete_definition/2`
124-
* [Module] Allow `@on_load` to be a private function
125-
* [Module] Validate `@dialyzer` related module attributes
126-
* [Range] Add `Range.new/3`, `Range.empty?/1`, and `Range.size/1`
127-
* [Regex] Add offset option to `Regex.scan/3` and `Regex.run/3`
128-
* [Registry] Support `:compression` on `Registry` tables
129-
* [Stream] Add `Stream.zip_with/2` and `Stream.zip_with/3`
130-
* [String] Add `:turkic` mode option to String case functions
131-
* [System] Add `System.trap_signal/3` and `System.untrap_signal/2`
132-
* [Tuple] Add `Tuple.sum/1` and `Tuple.product/1`
133-
* [URI] Support RFC3986 compliant encoding and decoding of queries via the `:rfc3986` option
134-
13513
#### ExUnit
13614

137-
* [ExUnit] Intercept SIGQUIT (via Ctrl+\\) and show a list of all aborted tests as well as intermediate test results
138-
* [ExUnit] Interpolate module attributes in match assertions diffs
139-
* [ExUnit] Print how much time is spent on `async` vs `sync` tests
140-
* [ExUnit] Improve error messages for doctests
141-
* [ExUnit] Compile doctests faster (often by two times)
142-
14315
#### IEx
14416

145-
* [IEx] Make IEx' parser configurable to allow special commands
146-
* [IEx] Show function signature when pressing tab after the opening parens of a function
147-
* [IEx] If an IEx expression starts with a binary operator, such as `|>`, automatically pipe in the result of the last expression
148-
14917
#### Mix
15018

151-
* [Mix] Add `Mix.install/2` for dynamically installing a list of dependencies
152-
* [Mix] Support `:exit_code` option in `Mix.raise/2`
153-
* [Mix] Discard `MIX_ENV` and `MIX_TARGET` values if they are empty strings
154-
* [Mix] Print the time taken to execute a task with on `MIX_DEBUG=1`
155-
* [mix compile.erlang] Compile multiple files in parallel
156-
* [mix escript.build] Deep merge configuration and ensure argv is set when executing `config/runtime.exs`
157-
* [mix release] Add `RELEASE_PROG` to releases with the name of the executable starting the release
158-
* [mix release] Support `remote.vm.args` to customize how the connecting VM boots
159-
* [mix test] Run all available tests if there are no pending `--failed` tests. This provides a better workflow as you no longer need to toggle the `--failed` flag between runs
160-
16119
### 2. Bug fixes
16220

163-
#### Elixir
164-
165-
* [CLI] Ensure `-e ""` (with an empty string) parses correctly on Windows
166-
* [Inspect] Do not override user supplied `:limit` option for derived implementations
167-
* [Kernel] Allow heredoc inside a heredoc interpolation
168-
* [Kernel] Preserve CRLF on heredocs
169-
* [Kernel] Public functions without documentation now appear as an empty map on `Code.fetch_docs/1`, unless they start with underscore, where they remain as `:none`. This aligns Elixir's implementation with EEP48
170-
* [Kernel] Do not crash when complex literals (binaries and maps) are used in guards
171-
* [Kernel] Properly parse keywords (such as `end`) followed by the `::` operator
172-
* [Macro] `Macro.decompose_call/1` now also consider tuples with more than 2 elements to not be valid calls
173-
* [Macro] Fix `Macro.underscore/1` for digit preceded by capitals: "FOO10" now becomes "foo10" instead of "fo_o10"
174-
* [OptionParser] Properly parse when numbers follow-up aliases, for example, `-ab3` is now parsed as `-a -b 3`
175-
* [Path] Fix `Path.relative_to/2` when referencing self
176-
* [Task] Ensure `Task.async_stream/2` with `ordered: false` discard results as they are emitted, instead of needlessly accumulating inside the stream manager
177-
* [URI] Do not discard empty paths on `URI.merge/2`
178-
179-
#### ExUnit
180-
181-
* [ExUnit.Case] Make `@tag tmp_dir` an absolute directory, avoiding inconsistencies if the test changes the current working directory
182-
* [ExUnit.Diff] Fix cases where the diffing algorithm would fail to print a pattern correct
183-
184-
#### IEx
185-
186-
* [IEx] Fix auto-completion inside remote shells
187-
188-
#### Mix
189-
190-
* [mix app.config] Do not emit false positive warnings when configured dependencies that have `runtime: false` set
191-
* [mix compile.elixir] Ensure that a manifest is generated even with no source code
192-
* [mix compile.elixir] Make sure export dependencies trigger recompilation when the dependency is removed as well as when the whole file is removed
193-
* [mix compile.elixir] Do not emit false positive warnings when a path dependency adds a module that is then used by the current application in the same `mix compile` cycle
194-
* [mix test] Ensure protocols within the current project are consolidated when `--cover` is given
195-
* [mix release] Improve compliance of release scripts with stripped down Linux installations
196-
* [mix release] Preserve file mode when copying non-beam ebin files
197-
19821
### 3. Soft-deprecations (no warnings emitted)
19922

200-
#### Elixir
201-
202-
* [Kernel] Using `start..stop` to match on ranges is soft-deprecated and will warn on future Elixir versions. Use `start..stop//step` instead
203-
* [Kernel] Using `start..stop` to create decreasing ranges is soft-deprecated and will warn on future versions. Use `start..stop//-1` instead
204-
20523
### 4. Hard-deprecations
20624

207-
#### EEx
208-
209-
* [EEx.Engine] `use EEx.Engine` is deprecated in favor of explicit delegation
210-
211-
#### Elixir
212-
213-
* [Kernel] The binary operator `^^^` is deprecated. If you are using `Bitwise.^^^/2`, use `Bitwise.bxor/2` instead
214-
* [Kernel] Deprecate `@foo()` in favor of `@foo`
215-
* [System] Deprecate `System.stacktrace/0` (it was already deprecated outside of catch/rescue and now it is deprecated everywhere)
216-
217-
#### Mix
218-
219-
* [mix compile] The `:xref` compiler is deprecated and it has no effect. Please remove it from your mix.exs file.
220-
221-
## v1.11
25+
## v1.12
22226

223-
The CHANGELOG for v1.11 releases can be found [in the v1.11 branch](https://github.com/elixir-lang/elixir/blob/v1.11/CHANGELOG.md).
27+
The CHANGELOG for v1.12 releases can be found [in the v1.12 branch](https://github.com/elixir-lang/elixir/blob/v1.12/CHANGELOG.md).

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ SOURCE_DATE_EPOCH_FILE = $(SOURCE_DATE_EPOCH_PATH)/SOURCE_DATE_EPOCH
2828
#==> Functions
2929

3030
define CHECK_ERLANG_RELEASE
31-
erl -noshell -eval '{V,_} = string:to_integer(erlang:system_info(otp_release)), io:fwrite("~s", [is_integer(V) and (V >= 21)])' -s erlang halt | grep -q '^true'; \
31+
erl -noshell -eval '{V,_} = string:to_integer(erlang:system_info(otp_release)), io:fwrite("~s", [is_integer(V) and (V >= 22)])' -s erlang halt | grep -q '^true'; \
3232
if [ $$? != 0 ]; then \
33-
echo "At least Erlang/OTP 21.0 is required to build Elixir"; \
33+
echo "At least Erlang/OTP 22.0 is required to build Elixir"; \
3434
exit 1; \
3535
fi
3636
endef

SECURITY.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
Elixir applies bug fixes only to the latest minor branch. Security patches are available for the last 5 minor branches:
66

7-
| Elixir version | Support
8-
| -------------- | ------------------------------
9-
| 1.12 | Development
10-
| 1.11 | Bug fixes and security patches
11-
| 1.10 | Security patches only
12-
| 1.9 | Security patches only
13-
| 1.8 | Security patches only
14-
| 1.7 | Security patches only
7+
Elixir version | Support
8+
:------------- | :-----------------------------
9+
1.13 | Development
10+
1.12 | Bug fixes and security patches
11+
1.11 | Security patches only
12+
1.10 | Security patches only
13+
1.9 | Security patches only
14+
1.8 | Security patches only
1515

1616
## Announcements
1717

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.12.0-dev
1+
1.13.0-dev

lib/elixir/pages/compatibility-and-deprecations.md

+18-15
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ Elixir applies bug fixes only to the latest minor branch. Security patches are a
88

99
Elixir version | Support
1010
:------------- | :-----------------------------
11-
1.12 | Development
12-
1.11 | Bug fixes and security patches
11+
1.13 | Development
12+
1.12 | Bug fixes and security patches
13+
1.11 | Security patches only
1314
1.10 | Security patches only
1415
1.9 | Security patches only
1516
1.8 | Security patches only
16-
1.7 | Security patches only
1717

1818
New releases are announced in the read-only [announcements mailing list](https://groups.google.com/group/elixir-lang-ann). All security releases [will be tagged with `[security]`](https://groups.google.com/forum/#!searchin/elixir-lang-ann/%5Bsecurity%5D%7Csort:date).
1919

@@ -43,19 +43,20 @@ Erlang/OTP versioning is independent from the versioning of Elixir. Each version
4343

4444
Elixir version | Supported Erlang/OTP versions
4545
:------------- | :-------------------------------
46-
1.0 | 17 - 17 (and Erlang/OTP 18 from v1.0.5)
47-
1.1 | 17 - 18
48-
1.2 | 18 - 18 (and Erlang/OTP 19 from v1.2.6)
49-
1.3 | 18 - 19
50-
1.4 | 18 - 19 (and Erlang/OTP 20 from v1.4.5)
51-
1.5 | 18 - 20
52-
1.6 | 19 - 20 (and Erlang/OTP 21 from v1.6.6)
53-
1.7 | 19 - 22
54-
1.8 | 20 - 22
55-
1.9 | 20 - 22
56-
1.10 | 21 - 22 (and Erlang/OTP 23 from v1.10.3)
46+
1.13 | 22 - 24
47+
1.12 | 21 - 24
5748
1.11 | 21 - 23
58-
1.12 | 21 - 23
49+
1.10 | 21 - 22 (and Erlang/OTP 23 from v1.10.3)
50+
1.9 | 20 - 22
51+
1.8 | 20 - 22
52+
1.7 | 19 - 22
53+
1.6 | 19 - 20 (and Erlang/OTP 21 from v1.6.6)
54+
1.5 | 18 - 20
55+
1.4 | 18 - 19 (and Erlang/OTP 20 from v1.4.5)
56+
1.3 | 18 - 19
57+
1.2 | 18 - 18 (and Erlang/OTP 19 from v1.2.6)
58+
1.1 | 17 - 18
59+
1.0 | 17 - 17 (and Erlang/OTP 18 from v1.0.5)
5960

6061
While Elixir often adds compatibility to new Erlang/OTP versions on released branches, such as support for Erlang/OTP 20 in v1.4.5, those releases usually contain the minimum changes for Elixir to run without errors. Only the next minor release, in this case v1.5.0, does effectively leverage the new features provided by the latest Erlang/OTP release.
6162

@@ -77,6 +78,8 @@ The first column is the version the feature was hard deprecated. The second colu
7778

7879
Version | Deprecated feature | Replaced by (available since)
7980
:-------| :-------------------------------------------------- | :---------------------------------------------------------------
81+
[v1.12] | `^^^/2` | Use `bxor/2` instead (v1.0)
82+
[v1.12] | `@foo()` to read module attributes | Remove the parenthesis (v1.0)
8083
[v1.12] | `use EEx.Engine` | Explicitly delegate to EEx.Engine instead (v1.0)
8184
[v1.12] | `:xref` compiler in Mix | Nothing (it always runs as part of the compiler now)
8285
[v1.11] | `Mix.Project.compile/2` | `Mix.Task.run("compile", args)` (v1.0)

lib/elixir/src/elixir.erl

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ preload_common_modules() ->
111111
parse_otp_release() ->
112112
%% Whenever we change this check, we should also change Makefile.
113113
case string:to_integer(erlang:system_info(otp_release)) of
114-
{Num, _} when Num >= 21 ->
114+
{Num, _} when Num >= 22 ->
115115
Num;
116116
_ ->
117-
io:format(standard_error, "ERROR! Unsupported Erlang/OTP version, expected Erlang/OTP 21+~n", []),
117+
io:format(standard_error, "ERROR! Unsupported Erlang/OTP version, expected Erlang/OTP 22+~n", []),
118118
erlang:halt(1)
119119
end.
120120

0 commit comments

Comments
 (0)