@@ -119,11 +119,9 @@ defmodule ElixirLS.LanguageServer.Build do
119
119
debug_info: true
120
120
] )
121
121
122
- # TODO elixir 1.15 calls
123
122
# Mix.ProjectStack.post_config(state_loader: {:cli, List.first(args)})
124
123
# added in https://github.com/elixir-lang/elixir/commit/9e07da862784ac7d18a1884141c49ab049e61691
125
- # def cli
126
- # do we need that?
124
+ # TODO refactor to use a custom state loader when we require elixir 1.15?
127
125
128
126
# since elixir 1.10 mix disables undefined warnings for mix.exs
129
127
# see discussion in https://github.com/elixir-lang/elixir/issues/9676
@@ -160,8 +158,8 @@ defmodule ElixirLS.LanguageServer.Build do
160
158
if Version . match? ( System . version ( ) , ">= 1.15.0-dev" ) do
161
159
# remove log handlers
162
160
handler_ids = :logger . get_handler_ids ( )
163
- for handler_id <- handler_ids , handler != Logger.Backends.JsonRpc do
164
- :ok = :logger . remove_handler ( handler_id ) do
161
+ for handler_id <- handler_ids , handler_id != Logger.Backends.JsonRpc do
162
+ :ok = :logger . remove_handler ( handler_id )
165
163
end
166
164
# make sure our handler is installed
167
165
if Logger.Backends.JsonRpc not in handler_ids do
@@ -189,7 +187,7 @@ defmodule ElixirLS.LanguageServer.Build do
189
187
"--no-protocol-consolidation"
190
188
]
191
189
192
- if Version . match? ( System . version ( ) , ">= 1.15.0-dev" ) do
190
+ opts = if Version . match? ( System . version ( ) , ">= 1.15.0-dev" ) do
193
191
opts
194
192
else
195
193
opts ++ [ "--all-warnings" ]
@@ -302,7 +300,7 @@ defmodule ElixirLS.LanguageServer.Build do
302
300
:dialyxir_vendored ,
303
301
:erl2ex ,
304
302
:patch ,
305
- :sourceror
303
+ :sourceror ,
306
304
:benchee
307
305
] do
308
306
raise "Unloading #{ app } "
0 commit comments