Skip to content

Commit 08c72e3

Browse files
committed
Bring back path loading optimization and remove stale test
1 parent bd899cc commit 08c72e3

File tree

2 files changed

+1
-31
lines changed

2 files changed

+1
-31
lines changed

lib/mix/lib/mix/tasks/compile.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ defmodule Mix.Tasks.Compile do
151151

152152
# We run loadpaths to perform checks but we don't bother setting
153153
# up the load paths because compile.all will manage them anyway.
154-
Mix.Task.run("loadpaths", ["--no-deps-loading" | args])
154+
Mix.Task.run("loadpaths", ["--no-path-loading" | args])
155155

156156
{opts, _, _} = OptionParser.parse(args, switches: [erl_config: :string])
157157
load_erl_config(opts)

lib/mix/test/mix/tasks/deps_test.exs

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -282,36 +282,6 @@ defmodule Mix.Tasks.DepsTest do
282282
end)
283283
end
284284

285-
test "does not load deps with --no-deps-loading" do
286-
in_fixture("deps_status", fn ->
287-
Mix.Project.push(SuccessfulDepsApp)
288-
289-
# Start from scratch!
290-
File.rm_rf("_build")
291-
292-
Mix.Tasks.Deps.Compile.run([])
293-
Mix.Tasks.Deps.Loadpaths.run([])
294-
assert File.exists?("_build/dev/lib/ok/ebin/ok.app")
295-
assert File.exists?("_build/dev/lib/ok/priv/sample")
296-
297-
Mix.Tasks.Compile.run([])
298-
assert to_charlist(Path.expand("_build/dev/lib/ok/ebin/")) in :code.get_path()
299-
assert File.exists?("_build/dev/lib/sample/ebin/sample.app")
300-
301-
# Remove the deps without build_path
302-
Mix.ProjectStack.post_config(deps: [])
303-
Mix.State.clear_cache()
304-
Mix.Project.pop()
305-
Mix.Project.push(SuccessfulDepsApp)
306-
Code.delete_path("_build/dev/lib/ok/ebin")
307-
308-
Mix.Tasks.Deps.Loadpaths.run(["--no-deps-loading"])
309-
refute to_charlist(Path.expand("_build/dev/lib/ok/ebin/")) in :code.get_path()
310-
assert File.exists?("_build/dev/lib/ok/ebin/ok.app")
311-
assert File.exists?("_build/dev/lib/sample/ebin/sample.app")
312-
end)
313-
end
314-
315285
## deps.unlock
316286

317287
test "unlocks all deps", context do

0 commit comments

Comments
 (0)