@@ -207,7 +207,7 @@ defmodule Mix.Dep.Loader do
207
207
# now because umbrella projects are not supported.
208
208
defp mix_dep ( % Mix.Dep { opts: opts } = dep , children ) do
209
209
from = Path . join ( opts [ :dest ] , "mix.exs" )
210
- deps = Enum . map ( children , & to_dep ( { & 1 , [ ] } , from ) )
210
+ deps = Enum . map ( children , & to_dep ( remote_dep ( & 1 ) , from ) )
211
211
{ % { dep | manager: :mix , extra: [ umbrella: false ] } , deps }
212
212
end
213
213
@@ -217,7 +217,7 @@ defmodule Mix.Dep.Loader do
217
217
extra = Dict . take ( rebar , [ :sub_dirs ] )
218
218
deps = if children do
219
219
from = Path . absname ( "rebar.config" )
220
- Enum . map ( children , & to_dep ( { & 1 , [ ] } , from , :rebar ) )
220
+ Enum . map ( children , & to_dep ( remote_dep ( & 1 ) , from , :rebar ) )
221
221
else
222
222
rebar_children ( rebar )
223
223
end
@@ -229,6 +229,12 @@ defmodule Mix.Dep.Loader do
229
229
{ % { dep | manager: :make } , [ ] }
230
230
end
231
231
232
+ # TODO: Deprecated - future Hex releases will return a
233
+ # tuple and no longer an atom, so we can remove the atom
234
+ # check from here.
235
+ defp remote_dep ( app ) when is_atom ( app ) , do: { app , [ ] }
236
+ defp remote_dep ( dep ) when is_tuple ( dep ) , do: dep
237
+
232
238
defp mix_children ( opts ) do
233
239
from = Path . absname ( "mix.exs" )
234
240
deps = Enum . map ( Mix.Project . config [ :deps ] || [ ] , & to_dep ( & 1 , from ) )
0 commit comments