lukebelbina

lukebelbina

I have attempted to debug this for a while but had no luck. I am running Ubutnu 20.04 using i3 for a window manager. This problem is occurring if I use the dmenu to launch VSCode or if I launch VSCode from the terminal.

I have installed Erlang / Elixir using asdf. asdf current says:

elixir 1.13.0-rc.1-otp-24 /home/luke/.tool-versions
erlang 24.1.6 /home/luke/.tool-versions

I am using i3 for a window manager and launch vscode using the dmenu. In a terminal within VSCode elixir --version yields:

Erlang/OTP 24 [erts-12.1.5] [source] [64-bit] [smp:32:32] [ds:32:32:10] [async-threads:1] [jit]
Elixir 1.13.0-rc.1 (2765e0f) (compiled with Erlang/OTP 24)

ElixirLS is detecting problems with the code however code completion is not working, and when I press ctrl-space I get the following error:

Failed to run ‘elixir’ command. ElixirLS will probably fail to launch. Logged PATH to Development Console.

echo $PATH in VSCode terminal shows:

home/luke/.asdf/shims:/home/luke/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

Finally, here’s the ElixirLS output:

Started ElixirLS v0.8.1
Elixir version: "1.13.0-rc.1 (2765e0f) (compiled with Erlang/OTP 24)"
Erlang version: "24"
ElixirLS compiled with Elixir 1.10.4 and erlang 22
MIX_ENV: test
MIX_TARGET: 
[Error - 5:28:45 PM] Request textDocument/foldingRange failed.
  Message: an exception was raised:
    ** (CaseClauseError) no case clause matching: {:ok, 63, 1, [], [{:identifier, {1, 1, nil}, :defmodule}, {:alias, {1, 11, nil}, :Resourceq}, {:., {1, 20, nil}}, {:alias, {1, 21, nil}, :Schema}, {:., {1, 27, nil}}, {:alias, {1, 28, nil}, :Command}, {:do, {1, 36, nil}}, {:eol, {1, 38, 1}}, {:identifier, {2, 3, nil}, :use}, {:alias, {2, 7, nil}, :Ecto}, {:., {2, 11, nil}}, {:alias, {2, 12, nil}, :Schema}, {:eol, {2, 18, 2}}, {:identifier, {4, 3, nil}, :import}, {:alias, {4, 10, nil}, :Ecto}, {:., {4, 14, nil}}, {:alias, {4, 15, nil}, :Changeset}, {:eol, {4, 24, 2}}, {:identifier, {6, 3, nil}, :alias}, {:alias, {6, 9, nil}, :Resourceq}, {:., {6, 18, nil}}, {:alias, {6, 19, nil}, :Utils}, {:., {6, 24, nil}}, {:alias, {6, 25, nil}, :SchemaValidation}, {:eol, {6, 41, 1}}, {:identifier, {7, 3, nil}, :alias}, {:alias, {7, 9, nil}, :Resourceq}, {:., {7, 18, nil}}, {:alias, {7, 19, nil}, :Schema}, {:., {7, 25, nil}}, {:alias, {7, 26, nil}, :Command}, {:eol, {7, 33, 1}}, {:at_op, {10, 3, nil}, :@}, {:identifier, {10, 4, nil}, :primary_key}, {:"{", {10, 16, nil}}, {:atom, {10, 17, nil}, :uuid}, {:",", {10, 22, 0}}, {:atom, {10, 24, nil}, :binary_id}, {:",", {10, 34, 0}}, {:"[", {10, 36, nil}}, {:"]", {10, 37, ...}}, {:"}", {10, ...}}, {:eol, {...}}, {:at_op, ...}, {...}, ...]}
        (elixir_sense 2.0.0) lib/elixir_sense/core/normalized/tokenizer.ex:16: ElixirSense.Core.Normalized.Tokenizer.do_tokenize_1_7/1
        (language_server 0.8.1) lib/language_server/providers/folding_range/token.ex:18: ElixirLS.LanguageServer.Providers.FoldingRange.Token.format_string/1
        (language_server 0.8.1) lib/language_server/providers/folding_range.ex:119: ElixirLS.LanguageServer.Providers.FoldingRange.convert_text_to_input/1
        (language_server 0.8.1) lib/language_server/providers/folding_range.ex:97: ElixirLS.LanguageServer.Providers.FoldingRange.do_provide/1
        (language_server 0.8.1) lib/language_server/server.ex:808: anonymous fn/3 in ElixirLS.LanguageServer.Server.handle_request_async/2
  Code: -32000 

17:28:45.597 [error] Process #PID<0.123.0> raised an exception
** (CaseClauseError) no case clause matching: {:ok, 63, 1, [], [{:identifier, {1, 1, nil}, :defmodule}, {:alias, {1, 11, nil}, :Resourceq}, {:., {1, 20, nil}}, {:alias, {1, 21, nil}, :Schema}, {:., {1, 27, nil}}, {:alias, {1, 28, nil}, :Command}, {:do, {1, 36, nil}}, {:eol, {1, 38, 1}}, {:identifier, {2, 3, nil}, :use}, {:alias, {2, 7, nil}, :Ecto}, {:., {2, 11, nil}}, {:alias, {2, 12, nil}, :Schema}, {:eol, {2, 18, 2}}, {:identifier, {4, 3, nil}, :import}, {:alias, {4, 10, nil}, :Ecto}, {:., {4, 14, nil}}, {:alias, {4, 15, nil}, :Changeset}, {:eol, {4, 24, 2}}, {:identifier, {6, 3, nil}, :alias}, {:alias, {6, 9, nil}, :Resourceq}, {:., {6, 18, nil}}, {:alias, {6, 19, nil}, :Utils}, {:., {6, 24, nil}}, {:alias, {6, 25, nil}, :SchemaValidation}, {:eol, {6, 41, 1}}, {:identifier, {7, 3, nil}, :alias}, {:alias, {7, 9, nil}, :Resourceq}, {:., {7, 18, nil}}, {:alias, {7, 19, nil}, :Schema}, {:., {7, 25, nil}}, {:alias, {7, 26, nil}, :Command}, {:eol, {7, 33, 1}}, {:at_op, {10, 3, nil}, :@}, {:identifier, {10, 4, nil}, :primary_key}, {:"{", {10, 16, nil}}, {:atom, {10, 17, nil}, :uuid}, {:",", {10, 22, 0}}, {:atom, {10, 24, nil}, :binary_id}, {:",", {10, 34, 0}}, {:"[", {10, 36, nil}}, {:"]", {10, 37, ...}}, {:"}", {10, ...}}, {:eol, {...}}, {:at_op, ...}, {...}, ...]}
    (elixir_sense 2.0.0) lib/elixir_sense/core/normalized/tokenizer.ex:16: ElixirSense.Core.Normalized.Tokenizer.do_tokenize_1_7/1
    (language_server 0.8.1) lib/language_server/providers/folding_range/token.ex:18: ElixirLS.LanguageServer.Providers.FoldingRange.Token.format_string/1
    (language_server 0.8.1) lib/language_server/providers/folding_range.ex:119: ElixirLS.LanguageServer.Providers.FoldingRange.convert_text_to_input/1
    (language_server 0.8.1) lib/language_server/providers/folding_range.ex:97: ElixirLS.LanguageServer.Providers.FoldingRange.do_provide/1
    (language_server 0.8.1) lib/language_server/server.ex:808: anonymous fn/3 in ElixirLS.LanguageServer.Server.handle_request_async/2
[Info  - 5:28:45 PM] Compile took 401 milliseconds
[Info  - 5:28:45 PM] [ElixirLS WorkspaceSymbols] Indexing...
[Info  - 5:28:45 PM] [ElixirLS Dialyzer] Checking for stale beam files
[Info  - 5:28:46 PM] [ElixirLS WorkspaceSymbols] Module discovery complete
[Info  - 5:28:46 PM] [ElixirLS WorkspaceSymbols] 22 callbacks added to index
[Info  - 5:28:46 PM] [ElixirLS WorkspaceSymbols] 197 modules added to index
[Info  - 5:28:46 PM] [ElixirLS Dialyzer] Found 2 changed files in 73 milliseconds
[Info  - 5:28:46 PM] [ElixirLS Dialyzer] Analyzing 8 modules: [Resourceq.Application, Resourceq.CommandWorker, Resourceq.Commands, Resourceq.Schema.Command, ResourceqWeb.CommandController, ResourceqWeb.Endpoint, ResourceqWeb.EventsChannel, ResourceqWeb.Router]
[Info  - 5:28:46 PM] [ElixirLS WorkspaceSymbols] 285 types added to index
[Info  - 5:28:46 PM] [ElixirLS Dialyzer] Analysis finished in 333 milliseconds
[Info  - 5:28:46 PM] Dialyzer analysis is up to date

Showing Posts 1 to 1

lukebelbina

lukebelbina OP

Ok, looks like this is a red herring and it is not working for Elixir version 1.13.0-rc.1

I have reproduced on my Windows machine and also verified code completion works for Elixir version 1.12.x on my Ubuntu install.

— All posts loaded —

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
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
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
roeland
Kia ora, We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
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
rahultumpala
Hello, I have an Elixir backend that implements a custom protocol over TCP. I want to load test the backend and assess the performance o...
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
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
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
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
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

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews