lexical-lsp / lexical

Lexical is a next-generation elixir language server
776 stars 77 forks source link

Request textDocument/definition failed #732

Closed urielfcampos closed 1 month ago

urielfcampos commented 1 month ago

Hey everyone !

Since the latest release, i started getting this error on my lexical extension on VSCode when i try to use go to definition for a module. Any ideas on how to fix it ?

Here's some information on my system: Lexical startup.

2024-05-07 17:55:04.293 [info] Release override path is undefined, starting auto-install.
2024-05-07 17:55:04.760 [info] Latest release is "v0.6.1"
2024-05-07 17:55:04.761 [info] Looking for an installation manifest at path /Users/uriel/Library/Application Support/Code/User/globalStorage/lexical-lsp.lexical/lexical_install/installation_manifest.json
2024-05-07 17:55:04.761 [info] Fetched the following manifest {"installedVersion":"0.6.1"}
2024-05-07 17:55:04.761 [info] Latest release is already installed. Skipping auto-install.
2024-05-07 17:55:04.763 [info] Starting Lexical in directory /Users/uriel/Projects/Employ/tiger
2024-05-07 17:55:04.763 [info] Starting lexical release in "/Users/uriel/Library/Application Support/Code/User/globalStorage/lexical-lsp.lexical/lexical_install/lexical/bin/start_lexical.sh"
2024-05-07 17:55:04.772 [info] [Trace - 17:55:04] Sending request 'initialize - (0)'.
2024-05-07 17:55:04.800 [info] Detected Elixir through mise: /Users/uriel/.local/share/mise/installs/elixir/1.16.2-otp-26/bin/elixir

erlang 26.2.5 elixir 1.16.2-otp-26

the error snippet from the output

 Message: ** (ErlangError) Erlang error: {:exception, %Protocol.UndefinedError{protocol: Enumerable, value: {:error, {:not_enabled, {:exact,...

Thanks in advance 🙇🏻

scohen commented 1 month ago

When you shut down your editor, are there any elixir processes running? If there are, kill them and start your editor.

urielfcampos commented 1 month ago

I've confirmed there are no elixir processes running after shutting down the editor and the error persists after starting the editor.

scohen commented 1 month ago

Can you paste in the entire stack trace? It is available in .lexical/*.log in your project's root directory.

Do you have an exceptionally large project? Like something over 500k lines? The project needs to build and be indexed before you can use go-to-definition, you should see progress messages in your editor to indicate when it's available. It looks like we need better error handling somewhere.

urielfcampos commented 1 month ago

Yup, the project i'm working on has over a million lines 😅 I will get the log soon. May i send it over to you privately ?

edit or if you have an obfuscation tool that i could use, it would be lovely too

scohen commented 1 month ago

you can send it privately via a DM on our discord.