Skip to content

Commit 5d60728

Browse files
author
José Valim
committed
Always touch all marked dependencies from deps fetcher
1 parent 9717a63 commit 5d60728

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lib/mix/lib/mix/dep/fetcher.ex

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@ defmodule Mix.Dep.Fetcher do
8686
# Let's get the loaded versions of deps
8787
deps = Mix.Dep.loaded_by_name(apps, all_deps, opts)
8888

89-
# Do not mark dependencies that are not available
90-
deps = Enum.filter(deps, &available?/1)
91-
9289
# Note we only retrieve the parent dependencies of the updated
9390
# deps if all dependencies are available. This is because if a
9491
# dependency is missing, it could directly affect one of the
@@ -99,8 +96,9 @@ defmodule Mix.Dep.Fetcher do
9996
# it for compilation too, this is our best to try to solve the
10097
# maximum we can at each deps.get and deps.update.
10198
if Enum.all?(all_deps, &available?/1) do
102-
deps = with_depending(deps, all_deps) ++
103-
Enum.filter(all_deps, fn dep -> not ok?(dep) end)
99+
deps = (with_depending(deps, all_deps) ++
100+
Enum.filter(all_deps, fn dep -> not ok?(dep) end))
101+
|> Enum.uniq(&(&1.app))
104102
end
105103

106104
# Merge the new lock on top of the old to guarantee we don't
@@ -124,7 +122,7 @@ defmodule Mix.Dep.Fetcher do
124122
end
125123

126124
defp with_depending(deps, all_deps) do
127-
(deps ++ do_with_depending(deps, all_deps)) |> Enum.uniq(&(&1.app))
125+
deps ++ do_with_depending(deps, all_deps)
128126
end
129127

130128
defp do_with_depending([], _all_deps) do

0 commit comments

Comments
 (0)