Skip to content

Commit

Permalink
Loadconfig needs to be called before deps are compiled (#275)
Browse files Browse the repository at this point in the history
Some dependencies need to have their configuration set before they're
compiled, and we were loading the project's configuration after the
compilation step.

All this PR does is change the place loadconfig is called.

Fixes #273
  • Loading branch information
scohen authored Jul 21, 2023
1 parent 2dc3d49 commit 8ab47cc
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ defmodule Lexical.RemoteControl.Build.State do
Mix.Task.clear()

with_progress building_label(project), fn ->
Mix.Task.run(:loadconfig)
result = Mix.Task.run(:compile, mix_compile_opts(force?))
Mix.Task.run(:loadpaths)
result
Expand Down Expand Up @@ -258,6 +257,10 @@ defmodule Lexical.RemoteControl.Build.State do
Logger.warning("Could not connect to hex.pm, dependencies will not be fetched")
end

with_progress "mix loadconfig", fn ->
Mix.Task.run(:loadconfig)
end

with_progress "mix deps.compile", fn ->
deps_compile =
if Features.compile_wont_change_directory?() do
Expand Down

0 comments on commit 8ab47cc

Please sign in to comment.