File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
apps/language_server/lib/language_server Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,20 @@ defmodule ElixirLS.LanguageServer.Build do
141141 if module = Mix.Project . get ( ) do
142142 build_path = Mix.Project . config ( ) [ :build_path ]
143143
144- for { app , path } <- Mix.Project . deps_paths ( ) do
144+ deps_paths =
145+ try do
146+ # this call can raise (RuntimeError) cannot retrieve dependencies information because dependencies
147+ # were not loaded. Please invoke one of "deps.loadpaths", "loadpaths", or "compile" Mix task
148+ Mix.Project . deps_paths ( )
149+ catch
150+ kind , payload ->
151+ { payload , stacktrace } = Exception . blame ( kind , payload , __STACKTRACE__ )
152+ message = Exception . format ( kind , payload , stacktrace )
153+ Logger . warning ( "Unable to prune mix project: #{ message } " )
154+ [ ]
155+ end
156+
157+ for { app , path } <- deps_paths do
145158 child_module =
146159 try do
147160 Mix.Project . in_project ( app , path , [ build_path: build_path ] , fn mix_project ->
You can’t perform that action at this time.
0 commit comments