File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed
apps/language_server/lib/language_server Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -183,13 +183,19 @@ defmodule ElixirLS.LanguageServer.Build do
183
183
end
184
184
185
185
defp run_mix_compile do
186
- # TODO --all-warnings not needed on 1.15
187
- case Mix.Task . run ( "compile" , [
188
- "--return-errors" ,
189
- "--ignore-module-conflict" ,
190
- "--all-warnings" ,
191
- "--no-protocol-consolidation"
192
- ] ) do
186
+ opts = [
187
+ "--return-errors" ,
188
+ "--ignore-module-conflict" ,
189
+ "--no-protocol-consolidation"
190
+ ]
191
+
192
+ if Version . match? ( System . version ( ) , ">= 1.15.0-dev" ) do
193
+ opts
194
+ else
195
+ opts ++ [ "--all-warnings" ]
196
+ end
197
+
198
+ case Mix.Task . run ( "compile" , opts ) do
193
199
{ status , diagnostics } when status in [ :ok , :error , :noop ] and is_list ( diagnostics ) ->
194
200
{ status , diagnostics }
195
201
@@ -252,8 +258,6 @@ defmodule ElixirLS.LanguageServer.Build do
252
258
:ok -> :ok
253
259
{ :error , error } -> Logger . error ( "Application.unload failed for #{ app } : #{ inspect ( error ) } " )
254
260
end
255
-
256
- # Code.delete_path()
257
261
end
258
262
259
263
defp get_deps_by_app ( deps ) , do: get_deps_by_app ( deps , % { } )
@@ -298,6 +302,7 @@ defmodule ElixirLS.LanguageServer.Build do
298
302
:dialyxir_vendored ,
299
303
:erl2ex ,
300
304
:patch ,
305
+ :sourceror
301
306
:benchee
302
307
] do
303
308
raise "Unloading #{ app } "
You can’t perform that action at this time.
0 commit comments