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
+30-26Lines changed: 30 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,6 @@
1
1
# Changelog for Elixir v1.4
2
2
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.
6
4
7
5
## Registry
8
6
@@ -48,20 +46,20 @@ When there is a need to traverse a collection of items concurrently, Elixir deve
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.
52
50
53
51
`Task.async_stream/3` and `Task.async_stream/5` allows developers to process collections concurrently while controlling the maximum amount of concurrent tasks:
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.
59
57
60
58
## Application inflection
61
59
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.
63
61
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:
65
63
66
64
def application do
67
65
[applications: [:logger, :plug, :postgrex]]
@@ -72,7 +70,9 @@ In previous Mix versions, most of your dependencies had to be added both to your
72
70
{:postgrex, "~> 1.0"}]
73
71
end
74
72
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:
76
76
77
77
def application do
78
78
[extra_applications: [:logger]]
@@ -83,11 +83,15 @@ This was error prone as many developers would not list their dependencies in the
83
83
{:postgrex, "~> 1.0"}]
84
84
end
85
85
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:
87
89
88
90
{:distillery, "> 0.0.0", runtime: false}
89
91
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)
91
95
92
96
### 1. Enhancements
93
97
@@ -96,11 +100,11 @@ As shown in the example above, any dependency that comes from Erlang or Elixir t
96
100
*[Calendar] Add `Date.compare/2`, `Time.compare/2`, `NaiveDateTime.compare/2` and `DateTime.compare/2`
97
101
*[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)
98
102
*[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
100
104
*[Enum] Add `Enum.map_every/2` that invokes the given function with every nth item
101
105
*[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
102
106
*[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
104
108
*[GenServer] Log error on default `handle_info/2` implementation
105
109
*[Inspect] Support syntax coloring via the `:syntax_color` option
106
110
*[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
129
133
130
134
#### IEx
131
135
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`
134
136
*[IEx.Autocomplete] Stop appending a trailing dot when autocompleting modules in IEx
135
137
*[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`
136
140
*[IEx.Server] Support interrupting IEx evaluation through the Ctrl+G prompt
137
141
138
142
#### Mix
139
143
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`
151
155
152
156
### 2. Bug fixes
153
157
154
158
#### Elixir
155
159
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`
157
161
*[Kernel] Don't crash in `macro_exported?/3` when dealing with Erlang modules
158
162
*[Kernel] Ensure locals calls are rewritten when calling a local function or macro from inside a module
159
163
*[Kernel.SpecialForms] Produce meaningful warning when with's else clauses have no effect
0 commit comments