Skip to content

Engine Compilation Causing Crash Dump #91

@heywhy

Description

@heywhy

First of all, thank you for the great work of building a unified language server for Elixir; hopefully, this fosters ease of adoption for newcomers.


I am running Mac M1 and using asdf to set up Erlang and Elixir.

> asdf current
Name            Version
elixir          1.18.4-otp-28
erlang          28.0.2
  • I'm using the nightly build of the Expert LS, downloaded using gh.
  • Set up the LSP in Neovim 0.11

When I open an Elixir project, the .expert folder is created alongside the expert.log file, while the client (neovim) receives the $/client event, but it gets stuck at the Project Node event, and no other folder (build & indexes) is created in the .expert folder. After digging around, I found an erl_crash.dump file in the ~/Library/Application Support/.burrito/expert_erts-15.2.7_0.1.0-57abaff/lib/xp_expert-0.1.0-57abaff/priv/engine_source/apps/engine directory.

Going through the erl_crash.dump file and the Expert codebase, I got to discover that the LSP is using the ~/.asdf/installs/elixir/1.18.4-otp-28/bin/elixir executable, but because my global erlang version (using a .tool-versions in home directory) is 27.2, the engine build step crashes. The only way I was able to fix this was by setting my global Erlang version to 28.0, and everything then works fine.

The proposed solution I have in mind is that when building the engine, a .tool-versions file should be generated, setting the Erlang version to match that which the Elixir executable is built for. Basically, the Expert.Port module exposes an erlang_executable method, and we can use the returned executable to grab the Erlang version to use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions