ElixirLS Warning in VSCode ....`Dialyzer in Erlang/OTP versions >= 21`

Please does anyone else get this warning in VSCode with the ElixirLS add-on

Dialyzer in Erlang/OTP versions >= 21 requires Elixir to have been compiled with an Erlang/OTP version >= 20, but current Elixir was compiled with version 19

I’m on Elixir 17.4, Erlang 21.2, on Windows 10

Do we need to build Elixir from source to fix this? or Should moving to Elixir 1.8 resolve this?


Yes, you need to. This has been discussed several times through the last ~6 months in several contexts.


I must have missed that discussion :frowning:

You mean rebuild? Even with 1.8 ?

1.8 hasn’t been released yet, so moving to it for production is not an option. But if you want to test it, you can do freely.

I would not move just because of this message, but prefer to use a self compiled 1.7.

To be honest, I always prefer to have an elixir compiled with the installed OTP, to really get all advantages of that OTP release.


How do you install Elixir? You have to have installed Elixir that was compiled with OTP >= 20, with asdf manager I just use asdf install elixir 1.7.4-otp-20 or 21 for that matter, and don’t have to compile it. It installs binary version compiled under correct OTP version.


asdf is not available for windows.

Yes, but you can download precompiled binaries that work on windows too from example here: https://repo.hex.pm/builds/elixir/v1.7.4-otp-21.zip it has windows batch files too in there, rest is beam and ex files. And to use it all you have to do is have erlang executables in path so you have werl.exe and erl.exe in your PATH, and to make things easy just add bin from where you extracted archive to your PATH, and voila! it should work. I’m not really sure if elixir installer does anything more than that on windows.

asdf was just an example, and although I have and am using Windows daily I really don’t know what package managers like asdf are there for windows because all my work is on Linux. Extracting archive and messing with path should be easier than compilation on windows, at least I think so.

PS. looking at how chcolatey install elixir: https://github.com/ElixirWin/ChocolateyPackages/blob/master/Elixir/tools/chocolateyInstall.ps1 it does not looks like it does more than unzipping archive and then adding it’s bin to path.

1 Like