vscode-elixir-ls icon indicating copy to clipboard operation
vscode-elixir-ls copied to clipboard

"Unchecked dependencies" breaks elixir_ls very often and requires manual folder removal to resolve

Open DaemonSnake opened this issue 9 months ago • 1 comments

Heya 👋 We have autoBuild and fetchDeps set to enabled but really often we have the elixir_ls extension that breaks because of some dependency that changed (for instance checkout of another branch, git pull, etc.) Currently we have to rm -fr .elixir_ls/, reload the server and wait for a new compilation each time this happens. It's a real pain. Is there anyway to fix this one and for all ?

DaemonSnake avatar May 07 '25 13:05 DaemonSnake

I don't have a good solution for that due to lacking mix API and compiler limitations. The only officially supported way is restarting the OS process and reloading mix project, all modules and applications. Even so, elixir compiler does not track all dependencies, especially in dynamic code and nuking deps and _build is sometimes necessary. ElixirLS tries to overcome some of those issues by forcefully reloading mix project, purging modules and resetting application controller state but it is error prone.

lukaszsamson avatar May 07 '25 15:05 lukaszsamson