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 Switch mode

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?

Last Post!

aidalgol

aidalgol

I had already removed that as well as _build and deps, to be sure no leftover artefacts were causing issues.

Where Next?

Trending in Questions Top

jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
silverdr
Using Phoenix.LiveView.TagEngine as an EEx.Engine is deprecated! To compile HEEx, use Phoenix.LiveView.TagEngine.compile/2 instead. Sta...
New
saveman71
Hello ! We want new/edit form pages to POST/PUT to their own URL rather than the resources REST defaults (post /things, put /things/:id)...
New
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
bottlenecked
Hi all, I wanted to ask how the community is dealing with post-release steps. Today we have Ecto migrations, which make sure that the db...
New
michallepicki
I am using Oban and occasionally, shortly after a deployment, a handful of jobs can fail because of dependency on other parts of the syst...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge &amp; Solve. They are GUI (Emerge) and State management (S...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New

We're in Beta

About us Mission Statement