Skip to content

Commit 8618d8e

Browse files
author
José Valim
committed
Properly cache apps_paths configuration, closes #5622
Signed-off-by: José Valim <[email protected]>
1 parent bd1c3ab commit 8618d8e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

lib/mix/lib/mix/project.ex

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,10 @@ defmodule Mix.Project do
233233
@spec apps_paths() :: %{atom => Path.t} | nil
234234
def apps_paths(config \\ config()) do
235235
if apps_path = config[:apps_path] do
236-
Mix.ProjectStack.read_cache(:apps_path) ||
237-
Mix.ProjectStack.write_cache(:apps_path,
238-
config[:apps] |> umbrella_apps(apps_path) |> to_apps_path(apps_path))
236+
key = {:apps_paths, Mix.Project.get!}
237+
Mix.ProjectStack.read_cache(key) ||
238+
Mix.ProjectStack.write_cache(key,
239+
config[:apps] |> umbrella_apps(apps_path) |> to_apps_paths(apps_path))
239240
end
240241
end
241242

@@ -249,7 +250,7 @@ defmodule Mix.Project do
249250
apps
250251
end
251252

252-
defp to_apps_path(apps, apps_path) do
253+
defp to_apps_paths(apps, apps_path) do
253254
for app <- apps,
254255
path = path_with_mix_exs_otherwise_warn(app, apps_path),
255256
do: {app, path},

lib/mix/lib/mix/project_stack.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ defmodule Mix.ProjectStack do
1818
get_and_update fn %{stack: stack} = state ->
1919
# Consider the first children to always have io_done
2020
# because we don't need to print anything unless another
21-
# project talks ahold of the shell.
21+
# project takes ahold of the shell.
2222
io_done? = stack == []
2323

2424
config = Keyword.merge(config, state.post_config)

0 commit comments

Comments
 (0)