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

water
I’m aware of 2 such projects, are there others? git: GitHub - team-alembic/realworld: A fullstack Phoenix LiveView application with back...
New
katta
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
peck
Hi everyone. My team and I have been working on a fairly modest app based around video streaming and chat, but we’ve landed a customer t...
New
bradley
I really like the adapter patterns that ecto, nebulex, waffle, etc. use and would love find something similar for a key management servic...
New
unaware8150
Hello folks! So at work, we are seeing some situations where we have to define some “fixed” strings that are used across the codebase in...
New
Alvinkariuki
How Can I Optimise Compile Time Dependencies I have been building an elixir application for about 2 years now. Many modules and files ha...
New
leoschweizer
Hi, we run different LLM models across a cluster, with each node loading a configurable subset. Model-specific queues let nodes consume ...
New

Other Trending Topics Top

budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
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
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
budgie
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with. But I don’t use it anymore. Serverless was the promis...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews