File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
apps/language_server/lib/language_server Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -13,15 +13,16 @@ defmodule ElixirLS.LanguageServer.Build do
13
13
IO . puts ( "MIX_ENV: #{ Mix . env ( ) } " )
14
14
IO . puts ( "MIX_TARGET: #{ Mix . target ( ) } " )
15
15
16
- prev_deps = cached_deps ( )
17
- :ok = Mix.Project . clear_deps_cache ( )
18
-
19
16
case reload_project ( ) do
20
17
{ :ok , mixfile_diagnostics } ->
21
18
# FIXME: Private API
22
19
if Keyword . get ( opts , :fetch_deps? ) and
23
- Mix.Dep . load_on_environment ( [ ] ) != prev_deps ,
24
- do: fetch_deps ( )
20
+ Mix.Dep . load_on_environment ( [ ] ) != cached_deps ( ) do
21
+ # NOTE: Clear deps cache when deps in mix.exs has change to prevent
22
+ # formatter crash from clearing deps during build.
23
+ :ok = Mix.Project . clear_deps_cache ( )
24
+ fetch_deps ( )
25
+ end
25
26
26
27
{ status , diagnostics } = compile ( )
27
28
You can’t perform that action at this time.
0 commit comments