@@ -15,8 +15,8 @@ defmodule Mix.Deps.Converger do
1515 :digraph . add_vertex ( graph , app )
1616 end
1717
18- Enum . each deps , fn Mix.Dep [ app : app , deps: other_apps ] ->
19- Enum . each other_apps , fn other_app ->
18+ Enum . each deps , fn Mix.Dep [ app : app , deps: other_deps ] ->
19+ Enum . each other_deps , fn Mix.Dep [ app : other_app ] ->
2020 :digraph . add_edge ( graph , other_app , app )
2121 end
2222 end
@@ -37,7 +37,7 @@ defmodule Mix.Deps.Converger do
3737 Returns all dependencies from the current project,
3838 including nested dependencies. There is a callback
3939 that is invoked for each dependency and must return
40- an updated depedency in case some processing is done.
40+ an updated dependency in case some processing is done.
4141 """
4242 def all ( rest , callback ) do
4343 main = Mix.Deps.Loader . children
@@ -94,12 +94,11 @@ defmodule Mix.Deps.Converger do
9494 # After we invoke the callback (which may actually check out the
9595 # dependency), we load the dependency including its latest info
9696 # and children information.
97- { dep , children } = Mix.Deps.Loader . load ( dep )
98- children = reject_non_fullfilled_optional ( children , current_breadths )
99- dep = dep . deps ( Enum . map ( children , & ( & 1 . app ) ) )
97+ dep = Mix.Deps.Loader . load ( dep )
98+ dep = dep . update_deps ( & reject_non_fullfilled_optional ( & 1 , current_breadths ) )
10099
101100 { acc , rest } = all ( t , [ dep | acc ] , upper_breadths , current_breadths , callback , rest )
102- all ( children , acc , current_breadths , dep . deps ++ current_breadths , callback , rest )
101+ all ( dep . deps , acc , current_breadths , Enum . map ( dep . deps , & ( & 1 . app ) ) ++ current_breadths , callback , rest )
103102 end
104103 end
105104
0 commit comments