Skip to content

Commit ea2913e

Browse files
committed
workaround elixir module loading change
1 parent 0b8df82 commit ea2913e

File tree

1 file changed

+8
-0
lines changed
  • apps/debug_adapter/lib/debug_adapter

1 file changed

+8
-0
lines changed

apps/debug_adapter/lib/debug_adapter/server.ex

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2711,6 +2711,14 @@ defmodule ElixirLS.DebugAdapter.Server do
27112711
# prefer metadata modules if valid and loaded
27122712
[metadata_module]
27132713

2714+
metadata_module != nil and env.protocol == nil ->
2715+
# In Elixir 1.19+, modules are not automatically loaded after compilation
2716+
# Try to load the metadata module and use it if successful
2717+
case Code.ensure_loaded(metadata_module) do
2718+
{:module, ^metadata_module} -> [metadata_module]
2719+
{:error, _} -> loaded_modules_from_path
2720+
end
2721+
27142722
env.protocol != nil ->
27152723
{protocol, implementations} = env.protocol
27162724

0 commit comments

Comments
 (0)