aidalgol

aidalgol

ElixirLS crashes on launch: (RuntimeError) found error while checking types for ElixirLS.Utils.Launch.start_mix/0

I use Nix to manage my development environment, and after updating the pinned nixpkgs version in a working project, without changing the pinned version of Elixir, ElixirLS started crashing on startup while compiling elixir_ls_utils. Is it likely something wrong with my setup, or is this a bug in ElixirLS?

ElixirLS output
Preferred shell is bash, relaunching
Looking for ASDF install
ASDF not found
Looking for mise executable
which: no mise in ([snip])
mise not found
Looking for rtx executable
which: no rtx in ([snip])
rtx not found
Looking for vfox executable
which: no vfox in ([snip])
vfox not found
Installing ElixirLS release v0.26.2
Running in /path/to/project
==> elixir_ls_utils
Compiling 10 files (.ex)
** (EXIT from #PID<0.95.0>) an exception was raised:
** (RuntimeError) found error while checking types for ElixirLS.Utils.Launch.start_mix/0:

** (FunctionClauseError) no function clause matching in anonymous fn/1 in Module.ParallelChecker.cache_chunk/3
The exception happened while checking this code:

def start_mix() do
case Version.match?(System.version(), "< 1.15.0-dev") do
x when :erlang.orelse(:erlang."=:="(x, false), :erlang."=:="(x, nil)) ->
nil

_ ->
Mix.Local.append_archives()
Mix.Local.append_paths()
end

Mix.start()
true = Mix.Hex.ensure_installed?(false)

case :erlang.function_exported(Hex, :start, 0) do
false -> nil
true -> Hex.start()
end

Mix.env(:dev)
Mix.target(:host)

for env <- ["MIX_ENV", "MIX_TARGET"] do
System.delete_env(env)
end

load_dot_config()
:ok
end

Please report this bug at: https://github.com/elixir-lang/elixir/issues

(elixir 1.17.3) lib/module/parallel_checker.ex:458: anonymous fn({{:elixir_version, 0}, %{sig: {:infer, [{[], %{bitmap: 1}}]}}}) in Module.ParallelChecker.cache_chunk/3
(elixir 1.17.3) lib/enum.ex:987: Enum."-each/2-lists^foreach/1-0-"/2
(elixir 1.17.3) lib/module/parallel_checker.ex:458: Module.ParallelChecker.cache_chunk/3
(elixir 1.17.3) lib/module/parallel_checker.ex:378: Module.ParallelChecker.cache_module/2
(elixir 1.17.3) lib/module/types/of.ex:323: Module.Types.Of.remote/6
(elixir 1.17.3) lib/enum.ex:2531: Enum."-reduce/3-lists^foldl/2-0-"/3
(elixir 1.17.3) lib/module/types/of.ex:304: Module.Types.Of.remote/8
(elixir 1.17.3) lib/module/types/expr.ex:333: Module.Types.Expr.of_expr/3```

Elixir version:

Erlang/OTP 27 [erts-15.2.1] [source] [64-bit] [smp:32:32] [ds:32:32:10] [async-threads:1] [jit:ns]

Elixir 1.17.3 (compiled with Erlang/OTP 27)

Most Liked

lud

lud

Hello!

Not sure what is the problem here, but indeed it seems to be a version problem.

Can you try to rm -rf .elixir_ls at the root of your project and restart your editor?

Where Next?

Popular in Questions Top

lk-geimfari
What is most correct way to open, read and parse JSON file with poison? For example if we have example.json file in root of some projec...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
gonzofish
I’m currently trying to understand how to join three tables using Ecto. All the examples I’ve seen use 2, so maybe I’m just missing somet...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
idi527
I’ve been re-reading swift book again and noticed that multiline strings there don’t have a trailing line break, unlike in elixir iex(2)...
New

Other popular topics Top

peerreynders
Manning 2016 Halloween weekend sale via Deal of the Day Friday, October 28 - Half off all MEAPs - code WM102816LT Saturday, October 29 ...
326 29600 154
New
dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
sergio
I couldn’t find any guides that worked well with Phoenix 1.6.0 and esbuild. I hope this helps people test the waters and eases you into t...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set? Thanks.
New
lk-geimfari
What is most correct way to open, read and parse JSON file with poison? For example if we have example.json file in root of some projec...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New

We're in Beta

About us Mission Statement