elixir-lsp / elixir-lsp/elixir-ls

Something about ElixirLS's project build system causes type inference warning handling to crash in Scholar library

Open
#1,272 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Elixir
Stars
1.8k
Forks
227
Avg merge
31m
Merged PRs (30d)
2

Description

Hi,

A couple weeks ago, I was working on a project that used the [scholar library](https://github.com/elixir-nx/scholar). I upgraded to Elixir 1.20, and suddenly my ElixirLS setup was silently failing to resolve anything on my project.

I traced this down and reported it to the Scholar project at https://github.com/elixir-nx/scholar/issues/334. (See that issue for the exact error.) It turned out there was a legitimate warning related to the new type inference system in 1.20. What made it hard to track down, however, was that Elixir was having a secondary error while trying to render the legit warning — thus turning a warning into an actual crash, and breaking the ElixirLS background build.

The Scholar devs fixed the warning, but they couldn't find a way to reproduce the crash. Consequently, I was asked to please forward this issue over to ElixirLS, which I'm doing now.

You can see that bug for more details, but to reproduce this, you'll want to depend on version 0.4.1 of Scholar (since it was fixed in 0.4.2). Alternatively, you could clone and build my project, [auto_nuke](https://github.com/wisq/auto_nuke), the one that I was working on when I encountered this problem, and which still depends on 0.4.1 (as I've paused development on it for now for unrelated reasons).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.