Skip to content

Commit bdc0d39

Browse files
harfangkjosevalim
authored andcommitted
Update mix.exs of guide to use :extra_applications (elixir-lang#918)
Mix 1.4 introduced automatic inference of required applications from dependencies list. Now Mix creates `:extra_applications` instead of `:applications` by default in application configuration in `mix.exs`. This commit updates the example `mix.exs` configurations in the guide to reflect that change. Signed-off-by: Bonghyun Kim <[email protected]>
1 parent 4299545 commit bdc0d39

4 files changed

+6
-6
lines changed

getting-started/mix-otp/dependencies-and-umbrella-apps.markdown

+3-3
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ defmodule KVServer.Mixfile do
169169
end
170170

171171
def application do
172-
[applications: [:logger],
172+
[extra_applications: [:logger],
173173
mod: {KVServer, []}]
174174
end
175175

@@ -195,7 +195,7 @@ The second change is in the `application` function inside `mix.exs`:
195195

196196
```elixir
197197
def application do
198-
[applications: [:logger],
198+
[extra_applications: [:logger],
199199
mod: {KVServer, []}]
200200
end
201201
```
@@ -247,7 +247,7 @@ The line above makes `:kv` available as a dependency inside `:kv_server`. We can
247247

248248
```elixir
249249
def application do
250-
[applications: [:logger, :kv],
250+
[extra_applications: [:logger, :kv],
251251
mod: {KVServer, []}]
252252
end
253253
```

getting-started/mix-otp/distributed-tasks-and-configuration.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ Open up `apps/kv/mix.exs` and change the `application/0` function to return the
296296

297297
```elixir
298298
def application do
299-
[applications: [],
299+
[extra_applications: [:logger],
300300
env: [routing_table: []],
301301
mod: {KV, []}]
302302
end

getting-started/mix-otp/introduction-to-mix.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ defmodule KV.Mixfile do
102102
end
103103
104104
def application do
105-
[applications: [:logger]]
105+
[extra_applications: [:logger]]
106106
end
107107
108108
defp deps do

getting-started/mix-otp/supervisor-and-application.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ We can configure the application callback in two steps. First, open up the `mix.
175175

176176
```elixir
177177
def application do
178-
[applications: [:logger],
178+
[extra_applications: [:logger],
179179
mod: {KV, []}]
180180
end
181181
```

0 commit comments

Comments
 (0)