@@ -104,17 +104,18 @@ defmodule Mix.Tasks.Deps.Compile do
104104
105105    # If all dependencies are local and ok, do not bother starting 
106106    # processes as it will likely slow everything down. 
107-     compiled?  = 
108-       if  count  >  1  and  match? ( [ _ ,  _  |  _ ] ,  deps )  and 
109-            not  Enum . all? ( deps ,  & ( Mix.Dep . ok? ( & 1 )  and  not  & 1 . scm . fetchable? ( ) ) )  do 
110-         Mix . shell ( ) . info ( "mix deps.compile running across #{ count }  ) 
111-         Mix.Tasks.Deps.Partition . server ( deps ,  count ,  force? ) 
112-       else 
113-         config  =  Mix.Project . deps_config ( ) 
114-         true  in  Enum . map ( deps ,  & compile_single ( & 1 ,  force? ,  config ) ) 
115-       end 
107+     if  count  >  1  and  match? ( [ _ ,  _  |  _ ] ,  deps )  and 
108+          not  Enum . all? ( deps ,  & ( Mix.Dep . ok? ( & 1 )  and  not  & 1 . scm . fetchable? ( ) ) )  do 
109+       Mix . shell ( ) . info ( "mix deps.compile running across #{ count }  ) 
116110
117-     if  compiled? ,  do:  Mix.Task . run ( "will_recompile" ) ,  else:  :ok 
111+       if  Mix.Tasks.Deps.Partition . server ( deps ,  count ,  force? )  do 
112+         # Each partition will trigger will_recompile but we need to trigger it here too 
113+         Mix.Task . run ( "will_recompile" ) 
114+       end 
115+     else 
116+       config  =  Mix.Project . deps_config ( ) 
117+       Enum . each ( deps ,  & compile_single ( & 1 ,  force? ,  config ) ) 
118+     end 
118119  end 
119120
120121  @ doc  false 
@@ -169,8 +170,14 @@ defmodule Mix.Tasks.Deps.Compile do
169170    # We should touch fetchable dependencies even if they 
170171    # did not compile otherwise they will always be marked 
171172    # as stale, even when there is nothing to do. 
172-     fetchable?  =  touch_fetchable ( scm ,  opts [ :build ] ) 
173-     compiled?  and  fetchable? 
173+     fetchable?  =  touch_fetchable ( scm ,  opts ) 
174+ 
175+     if  compiled?  and  fetchable?  do 
176+       Mix.Task . run ( "will_recompile" ) 
177+       true 
178+     else 
179+       false 
180+     end 
174181  end 
175182
176183  defp  check_unavailable! ( app ,  scm ,  { :unavailable ,  path } )  do 
@@ -192,9 +199,9 @@ defmodule Mix.Tasks.Deps.Compile do
192199    :ok 
193200  end 
194201
195-   defp  touch_fetchable ( scm ,  path )  do 
202+   defp  touch_fetchable ( scm ,  opts )  do 
196203    if  scm . fetchable? ( )  do 
197-       Mix.Dep.ElixirSCM . update ( Path . join ( path ,  ".mix" ) ,  scm ) 
204+       Mix.Dep.ElixirSCM . update ( Path . join ( opts [ :build ] ,  ".mix" ) ,  scm ,   opts [ :lock ] ) 
198205      true 
199206    else 
200207      false 
0 commit comments