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

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
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
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews