How to test ElixirLS compatiblity with existing Elixir installation without using VSCode?

elixirls
Tags: #<Tag:0x00007f8e9d713d00>

#1

I have a LinuxMint machine with Elixir 1.6.6 installed, Erlang 20.3 using Kerl, Exenv. And whenever I tried to activate Elixir LS plugin on VSCode, the IDE, my system everything freezes. Not sure why. Earlier I tried with Asdf too which didn’t work. Wondered if it could be some package manager issue so now got from Kerl, exenv. But not sure about what could be the issue to freeze again.
Kindly share any tips or tricks to make ElixirLS working in my VSCode or test if it’s compatible with existing elixir installation either through terminal or any other way possible methods.

Popup error on VSCode

Failed to run "elixir" command elixirls will probably fail to launch.

Thanks


#2

Depending on your systems specs this is as expected (sadly), as elixirls will built dialyzer PLT files.

Depending on the number of dependencies of a project I open in VScode with ELS it can take up to 5 minutes until my system gets usable again. It has an i5 (4th gen with 2.6 GHz) and 8 GiB of RAM (of which usually about 10 are taken by Google Chrome ;))


#3

Mine is like 2GB RAM and i3 machine,. :laughing: So it’s done for life long freeze I guess. Have to uninstall ElixirLS plugin. Can better debug myself


#4

Try filing a bug report and ask for a way to disable the dialyzer integration.


#5

Are you sure you are launching vscode with an environment ($PATH) that it can find elixir


#6

Note that the Elixir/Erlang PLT building will only be done once (until you upgrade Elixir or Erlang), so it’s not really that often.


#7

But the deps PLT has to got build on every change of deps, updating, adding, removing… This might become tedious often, as well when you come to a bigger project and want to contribute.

I wish the LS would use the same PLTs that dialyxir is maintaining, then I could trigger PLT building easily on demand. Also a way to restart the LS without restarting the editor were nice…


#8

Yes. I have set the path right.


#9

I’m not sure if disabling dialyzer helps to analyse the errors than?


#10

If disabling dialyzer helps to improve the responsiveness of your system, then of course it helps to debug the other stuff, as you are actually able to debug then.


#11

The "elixirLS.dialyzerEnabled": false setting will disable Dialyzer, you could try that out in your settings.json.

You can also open the “Output” menu at the bottom and select ElixirLS from the drop down if it’s there which may contain useful information.

@JakeBecker is a very responsive maintainer and would love a bug report, I’m sure! Or better yet, a PR :smiley:


#12

I just published a small update that should make launch failures a bit easier to diagnose. If the pre-launch test that checks that Elixir is installed fails, it’ll print out the process’s PATH to the development console so you can figure out what’s wrong more easily.

However, the freezing issue does sound more like the server is launching (despite the warning) and Dialyzer is bringing your system to a crawl. You should see a pop-up message like “Building core Elixir PLT” if this is the case. Try adding "elixirLS.dialyzerEnabled": false to your settings.json to disable it.


#13

The initial dialyzer often brings my system down for a couple of minutes, and this happens thus badly, that the pop up appears only after dialyzer has finished and disappears after fractions of seconds. Both happens without any animations. VScode remains laggy for another 30 seconds before it normalizes again.

A way to manually trigger building of PLTs were nice… Maybe even push a warning to the issues tab until they are built?