Skip to content

Commit dee2c3b

Browse files
lukaszsamsonclaude
andcommitted
fix: report native-typing unavailability correctly in backend status log
enabled?/0 already includes available?/0, so checking 'not enabled?' first made the one-shot backend log say "disabled" on Elixir versions where native typing is simply unavailable — misleading for rollout diagnostics. Check availability first. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NvwMWQayfdxowBDrnt5iYM
1 parent ab715db commit dee2c3b

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

apps/language_server/lib/language_server/providers/inlay_hints.ex

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,16 +183,19 @@ defmodule ElixirLS.LanguageServer.Providers.InlayHints do
183183
:not_logged ->
184184
:persistent_term.put(@backend_status_key, :logged)
185185

186+
# Check availability before the enabled setting: enabled?/0 already
187+
# includes available?/0, so testing `not enabled?` first would report
188+
# "disabled" on Elixirs where native typing simply isn't available.
186189
backend =
187190
cond do
191+
not ElixirTypes.available?() ->
192+
"structural (native typing unavailable on this Elixir)"
193+
188194
not ElixirTypes.enabled?() ->
189195
"structural (native typing disabled)"
190196

191-
ElixirTypes.available?() ->
192-
"compiler-native (Module.Types adaptor active)"
193-
194197
true ->
195-
"structural (native typing unavailable on this Elixir)"
198+
"compiler-native (Module.Types adaptor active)"
196199
end
197200

198201
Logger.info("[ElixirLS.InlayHints] type backend: #{backend}")

0 commit comments

Comments
 (0)