Skip to content

Commit fbfb41d

Browse files
author
José Valim
committed
Release v1.4.0-rc.0
1 parent 173c909 commit fbfb41d

File tree

5 files changed

+35
-29
lines changed

5 files changed

+35
-29
lines changed

CHANGELOG.md

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Changelog for Elixir v1.4
22

3-
Elixir v1.4 brings new features, enhancements and bug fixes into Elixir. The most notable changes are the addition of the `Registry` module and the `Task.async_stream/3` and `Task.async_stream/5` which aids developers in writing concurrent software. Those two features and a couple other improvements are described in detail below.
4-
5-
Overall this is the smallest release since Elixir v1.0 was launched. This aligns well with our goals and the community expectations of Elixir being a stable language with incremental improvements.
3+
Elixir v1.4 brings new features, enhancements and bug fixes into Elixir. The most notable changes are the addition of the `Registry` module and the `Task.async_stream/3` and `Task.async_stream/5` which aids developers in writing concurrent software. Those two features and a couple other improvements are described in detail below followed by the complete list of changes.
64

75
## Registry
86

@@ -48,20 +46,20 @@ When there is a need to traverse a collection of items concurrently, Elixir deve
4846
|> Enum.map(&Task.async(SomeMod, :function, [&1]))
4947
|> Enum.map(&Task.await/1)
5048

51-
While the snippet above works fine in many occasions, for large collections it may be problem as it will spawn as many tasks as there are items in the collection. In many situations, you may want to set a limit of how many tasks will be running concurrently.
49+
While the snippet above works fine in many occasions, for large collections it will spawn and run concurrently as many tasks as there are items in the collection.
5250

5351
`Task.async_stream/3` and `Task.async_stream/5` allows developers to process collections concurrently while controlling the maximum amount of concurrent tasks:
5452

5553
collection
5654
|> Task.async_stream(SomeMod, :function, [], max_concurrency: System.schedulers_online)
5755

58-
Note `Task.async_stream/3` is lazy, allowing developers to partially consume the stream until a condition is reached. Furthermore, `Task.Supervisor.async_stream/4` and `Task.Supervisor.async_stream/6` can be used to ensure the concurrent tasks are spawned under the given supervisor.
56+
The `Task.async_stream` functions are also lazy, allowing developers to partially consume the stream until a condition is reached. Furthermore, `Task.Supervisor.async_stream/4` and `Task.Supervisor.async_stream/6` can be used to ensure the concurrent tasks are spawned under a given supervisor.
5957

6058
## Application inflection
6159

62-
Mix v1.4 now automatically inflects the list of applications that are used on runtime from your dependencies list.
60+
Mix v1.4 now automatically inflects the list of applications that are required on runtime from your dependencies list.
6361

64-
In previous Mix versions, most of your dependencies had to be added both to your dependencies list and applications list. Here is how a `mix.exs` could look like:
62+
In previous Mix versions, most of your dependencies had to be added both to your dependencies list and applications list. Here is how a `mix.exs` would look like:
6563

6664
def application do
6765
[applications: [:logger, :plug, :postgrex]]
@@ -72,7 +70,9 @@ In previous Mix versions, most of your dependencies had to be added both to your
7270
{:postgrex, "~> 1.0"}]
7371
end
7472

75-
This was error prone as many developers would not list their dependencies in their applications list. Mix v1.4 now automatically inflects your applications list as long as you leave the `:applications` key empty. The `mix.exs` above can be rewritten to:
73+
This was error prone as many developers would not list their dependencies in their applications list.
74+
75+
Mix v1.4 now automatically inflects your applications list as long as you leave the `:applications` key empty. The `mix.exs` above can be rewritten to:
7676

7777
def application do
7878
[extra_applications: [:logger]]
@@ -83,11 +83,15 @@ This was error prone as many developers would not list their dependencies in the
8383
{:postgrex, "~> 1.0"}]
8484
end
8585

86-
As shown in the example above, any dependency that comes from Erlang or Elixir that is required at runtime can be added to the `:extra_applications` list. Finally, if there is a dependency you don't want to include in the application runtime list, you can do so by specifying the `runtime: false` option:
86+
With the above, Mix will automatically build your application list based on your dependencies. Applications that are part of Erlang or Elixir that are required at runtime, such as `:logger`, must be added to the `:extra_applications` list. All extra applications will be included in the application list.
87+
88+
Finally, if there is a dependency you don't want to include in the application runtime list, you can do so by specifying the `runtime: false` option:
8789

8890
{:distillery, "> 0.0.0", runtime: false}
8991

90-
## v1.4.0-dev
92+
We hope this feature provides a more streamlined workflow for developers who are building releases for their Elixir projects.
93+
94+
## v1.4.0-rc.0 (2016-11-28)
9195

9296
### 1. Enhancements
9397

@@ -96,11 +100,11 @@ As shown in the example above, any dependency that comes from Erlang or Elixir t
96100
* [Calendar] Add `Date.compare/2`, `Time.compare/2`, `NaiveDateTime.compare/2` and `DateTime.compare/2`
97101
* [Calendar] Support `NaiveDateTime.add/3` and `NaiveDateTime.diff/3` for adding seconds (up to microseconds) as well as the difference between two NaiveDateTimes in seconds (up to microseconds)
98102
* [Calendar] Add `Date.leap_year?/1` and `Date.day_of_week/1`
99-
* [Calendar] Generate `Date`, `Time` and `NaiveDateTime` APIs so they work with any struct that provides the same set of fields as their respective struct. For example, a `NaiveDateTime` can be given to `Date` since it contains a superset of the fields in the `Date` struct
103+
* [Calendar] Ensure `Date`, `Time` and `NaiveDateTime` APIs work with any struct that provides the same set of fields as their respective struct. For example, a `NaiveDateTime` can be given to `Date` since it contains a superset of the fields in the `Date` struct
100104
* [Enum] Add `Enum.map_every/2` that invokes the given function with every nth item
101105
* [Enum] Add `min/2`, `max/2`, `min_max/2`, `min_by/3`, `max_by/3`, and `min_max_by/3` that allow a function specifying the default value when the enumerable is empty
102106
* [Enum] Introduce `Enum.zip/1` to zip multiple entries at once
103-
* [Float] Introduce `Float.ratio/1` that returns a tuple with the numerator and denominator to retrieve the given float
107+
* [Float] Introduce `Float.ratio/1` that returns a tuple with the numerator and denominator as integers to retrieve the given float
104108
* [GenServer] Log error on default `handle_info/2` implementation
105109
* [Inspect] Support syntax coloring via the `:syntax_color` option
106110
* [Integer] `Integer.digits/2` now accepts negative integers
@@ -129,31 +133,31 @@ As shown in the example above, any dependency that comes from Erlang or Elixir t
129133

130134
#### IEx
131135

132-
* [IEx.Helpers] `c/1` now compiles in memory by default to avoid common issue where `.beam` files remain at projects root directory
133-
* [IEx.Helpers] Add info about protocols in `i/1`
134136
* [IEx.Autocomplete] Stop appending a trailing dot when autocompleting modules in IEx
135137
* [IEx.Autocomplete] Support autocompletion for structs
138+
* [IEx.Helpers] `c/1` now compiles in memory by default to avoid common issue where `.beam` files remain at projects root directory
139+
* [IEx.Helpers] Add info about protocols in `i/1`
136140
* [IEx.Server] Support interrupting IEx evaluation through the Ctrl+G prompt
137141

138142
#### Mix
139143

140-
* [Mix] Provide "did you mean?" suggestions for `mix xref`
141-
* [Mix] Add the ability to specify one or more apps in `mix cmd`
142-
* [Mix] Compress archive files built by `mix archive` as they are now unzipped during installation
143-
* [Mix] Check directory existence in `mix new` and ask how to proceed if one exists
144-
* [Mix] Applications built with the `--sup` flag now have an individual module to work as application callback
145-
* [Mix] Add `--formatter` option to `mix test`
146-
* [Mix] Warn if there are non-applications in the `apps` directory for umbrella projects
147-
* [Mix] Automatically inflect the list of applications for Mix projects
148-
* [Mix.Dep] Add warning for invalid paths on `mix deps.clean`
149-
* [Mix.Project] Add `Mix.Project.apps_paths` that returns the paths to children applications in umbrella projects
150-
* [Mix.Rebar] Add `MIX_REBAR` environment variable for overriding local rebar
144+
* [mix archive] Compress archive files built by `mix archive` as they are now unzipped during installation
145+
* [mix compile] Automatically inflect the list of applications for Mix projects
146+
* [mix cmd] Add the ability to specify one or more apps in `mix cmd`
147+
* [mix deps] Warn if there are non-applications in the `apps` directory for umbrella projects
148+
* [mix deps] Add warning for invalid paths on `mix deps.clean`
149+
* [mix deps] Add `Mix.Project.apps_paths` that returns the paths to children applications in umbrella projects
150+
* [mix deps] Add `MIX_REBAR` environment variable for overriding local rebar
151+
* [mix new] Check directory existence in `mix new` and ask how to proceed if one exists
152+
* [mix new] Applications built with the `--sup` flag now have an individual module to work as application callback
153+
* [mix test] Add `--formatter` option to `mix test`
154+
* [mix xref] Provide "did you mean?" suggestions for `mix xref`
151155

152156
### 2. Bug fixes
153157

154158
#### Elixir
155159

156-
* [Float] Avoid multiple roundings in `Float.{ceil/2, floor/2, round/2}`
160+
* [Float] Avoid multiple roundings in `Float.ceil/2`, `Float.floor/2` and `Float.round/2`
157161
* [Kernel] Don't crash in `macro_exported?/3` when dealing with Erlang modules
158162
* [Kernel] Ensure locals calls are rewritten when calling a local function or macro from inside a module
159163
* [Kernel.SpecialForms] Produce meaningful warning when with's else clauses have no effect

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.4.0-dev
1+
1.4.0-rc.0

lib/elixir/lib/task/supervised.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ defmodule Task.Supervised do
205205
stream_deliver({:cont, acc}, max + 1, spawned, delivered, waiting, next,
206206
reducer, mfa, spawn, monitor_pid, monitor_ref, timeout)
207207
{:DOWN, ^monitor_ref, _, ^monitor_pid, reason} ->
208-
stream_close(waiting, monitor_pid, monitor_ref, timeout)
208+
stream_cleanup_inbox(monitor_ref)
209209
exit({reason, {__MODULE__, :stream, [timeout]}})
210210
after
211211
timeout ->

lib/elixir/test/elixir/task/supervisor_test.exs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ Code.require_file "../test_helper.exs", __DIR__
33
defmodule Task.SupervisorTest do
44
use ExUnit.Case
55

6+
@moduletag report: [:supervisor]
7+
68
setup do
79
{:ok, pid} = Task.Supervisor.start_link()
810
{:ok, supervisor: pid}

src/elixir.app.src

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{application, elixir,
22
[{description, "elixir"},
3-
{vsn, "1.4.0-dev"},
3+
{vsn, "1.4.0-rc.0"},
44
{modules, [
55
elixir
66
]},

0 commit comments

Comments
 (0)