Skip to content

Commit c52cc3d

Browse files
committed
address todo
1 parent ca9d02b commit c52cc3d

File tree

1 file changed

+5
-7
lines changed
  • apps/language_server/lib/language_server

1 file changed

+5
-7
lines changed

apps/language_server/lib/language_server/build.ex

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,9 @@ defmodule ElixirLS.LanguageServer.Build do
119119
debug_info: true
120120
])
121121

122-
# TODO elixir 1.15 calls
123122
# Mix.ProjectStack.post_config(state_loader: {:cli, List.first(args)})
124123
# 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?
127125

128126
# since elixir 1.10 mix disables undefined warnings for mix.exs
129127
# see discussion in https://github.com/elixir-lang/elixir/issues/9676
@@ -160,8 +158,8 @@ defmodule ElixirLS.LanguageServer.Build do
160158
if Version.match?(System.version(), ">= 1.15.0-dev") do
161159
# remove log handlers
162160
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)
165163
end
166164
# make sure our handler is installed
167165
if Logger.Backends.JsonRpc not in handler_ids do
@@ -189,7 +187,7 @@ defmodule ElixirLS.LanguageServer.Build do
189187
"--no-protocol-consolidation"
190188
]
191189

192-
if Version.match?(System.version(), ">= 1.15.0-dev") do
190+
opts = if Version.match?(System.version(), ">= 1.15.0-dev") do
193191
opts
194192
else
195193
opts ++ ["--all-warnings"]
@@ -302,7 +300,7 @@ defmodule ElixirLS.LanguageServer.Build do
302300
:dialyxir_vendored,
303301
:erl2ex,
304302
:patch,
305-
:sourceror
303+
:sourceror,
306304
:benchee
307305
] do
308306
raise "Unloading #{app}"

0 commit comments

Comments
 (0)