File tree Expand file tree Collapse file tree 3 files changed +12
-23
lines changed Expand file tree Collapse file tree 3 files changed +12
-23
lines changed Original file line number Diff line number Diff line change @@ -49,11 +49,7 @@ defmodule Mix.CLI do
49
49
50
50
defp run_task ( name , args ) do
51
51
try do
52
- # We need to skip loading the paths for the project and
53
- # its dependencies on deps.get and deps.update to avoid
54
- # having two versions of the same dep after get or update
55
- # is done.
56
- if not deps_task? ( name ) && Mix.Project . get do
52
+ if Mix.Project . get do
57
53
Mix.Task . run "loadpaths" , [ "--no-deps-check" , "--no-elixir-version-check" ]
58
54
Mix.Task . reenable "loadpaths"
59
55
Mix.Task . reenable "deps.loadpaths"
@@ -91,10 +87,6 @@ defmodule Mix.CLI do
91
87
IO . puts "Elixir #{ System . version } "
92
88
end
93
89
94
- defp deps_task? ( "deps.update" ) , do: true
95
- defp deps_task? ( "deps.get" ) , do: true
96
- defp deps_task? ( _ ) , do: false
97
-
98
90
# Check for --help or --version in the args
99
91
defp check_for_shortcuts ( [ first_arg | _ ] ) when first_arg in
100
92
[ "--help" , "-h" , "-help" ] , do: :help
Original file line number Diff line number Diff line change @@ -422,12 +422,6 @@ defmodule Mix.Deps do
422
422
Mix.Deps.Lock.write(lock)
423
423
424
424
unless opts[:no_compile] do
425
- # TODO: This is a temporary workaround to the fact
426
- # we do not loadpaths for deps.get and deps.update tasks
427
- # in the CLI.
428
- Mix.Task.run(" deps. loadpaths ", [" --no - deps -check "])
429
- Mix.Task.reenable(" deps. loadpaths ")
430
-
431
425
if apps != [] do
432
426
args = if opts[:quiet], do: [" --quiet "|apps], else: apps
433
427
Mix.Task.run(" deps . compile ", args)
Original file line number Diff line number Diff line change 1
1
defmodule Mix.Tasks.Deps.Loadpaths do
2
2
use Mix.Task
3
3
4
- import Mix.Deps , only: [ loaded: 0 , available?: 1 , load_paths: 1 ]
5
-
6
4
@ hidden true
7
- @ shortdoc "Load all dependencies' paths"
5
+ @ shortdoc "Load all dependencies build paths"
8
6
9
7
@ moduledoc """
10
- Loads all dependencies. This is invoked directly
11
- by `loadpaths` when the CLI boots.
8
+ Loads all dependencies for the current build.
9
+ This is invoked directly by `loadpaths` when
10
+ the CLI boots.
12
11
13
12
## Command line options
14
13
@@ -21,8 +20,12 @@ defmodule Mix.Tasks.Deps.Loadpaths do
21
20
Mix.Task . run "deps.check"
22
21
end
23
22
24
- lc dep inlist loaded , available? ( dep ) do
25
- Enum . each ( load_paths ( dep ) , & Code . prepend_path / 1 )
26
- end
23
+ config = Mix . project
24
+
25
+ Mix.Project . build_path ( config )
26
+ |> Path . join ( "lib/*/ebin" )
27
+ |> Path . wildcard
28
+ |> List . delete ( not Mix.Project . umbrella? && Mix.Project . compile_path ( config ) )
29
+ |> Enum . each ( & Code . prepend_path / 1 )
27
30
end
28
31
end
You can’t perform that action at this time.
0 commit comments