lugomateo

lugomateo

Not sure what happened, elixirLS had been working just fine in multiple projects.

When I try to format an elixir file on save I get the following…

I tried deleting the .elixir_ls folder to allow ElixirLS to recompile.
I see the following output:

Running /Users/mateo/.vscode/extensions/jakebecker.elixir-ls-0.17.5/elixir-ls-release/launch.sh
Preferred shell is zsh, relaunching
Looking for ASDF install
ASDF install found in /usr/local/opt/asdf/libexec/asdf.sh, sourcing
Installing ElixirLS release v0.17.5
Running in <my project path>
Install complete
[Info  - 10:44:33 AM] Started ElixirLS v0.17.5
[Info  - 10:44:33 AM] Running in <my project path>
[Info  - 10:44:33 AM] ElixirLS built with elixir "1.14.2" on OTP "25"
[Info  - 10:44:33 AM] Running on elixir "1.14.2 (compiled with Erlang/OTP 25)" on OTP "25"
[Info  - 10:44:33 AM] Protocols are not consolidated
[Info  - 10:44:33 AM] Elixir sources not found (checking in /home/build/elixir). Code navigation to Elixir modules disabled.
[Info  - 10:44:33 AM] Received client configuration via workspace/configuration
%{"additionalWatchedExtensions" => [], "autoBuild" => true, "autoInsertRequiredAlias" => true, "dialyzerEnabled" => true, "dialyzerFormat" => "dialyxir_long", "dialyzerWarnOpts" => [], "enableTestLenses" => false, "envVariables" => %{}, "fetchDeps" => false, "languageServerOverridePath" => "", "mixEnv" => "test", "mixTarget" => "", "projectDir" => "", "signatureAfterComplete" => true, "suggestSpecs" => true, "trace" => %{"server" => "off"}}
[Info  - 10:44:33 AM] Loaded DETS databases in 92ms
[Info  - 10:44:33 AM] Registering for workspace/didChangeConfiguration notifications
[Info  - 10:44:33 AM] client/registerCapability succeeded
[Info  - 10:44:33 AM] Registering for workspace/didChangeWatchedFiles notifications
[Info  - 10:44:33 AM] client/registerCapability succeeded
[Info  - 10:44:33 AM] Starting build with MIX_ENV: test MIX_TARGET: host
[Info  - 10:44:34 AM] Compile took 490 milliseconds
[Info  - 10:44:34 AM] [ElixirLS WorkspaceSymbols] Indexing...
[Info  - 10:44:34 AM] [ElixirLS WorkspaceSymbols] Module discovery complete
[Info  - 10:44:34 AM] [ElixirLS WorkspaceSymbols] 24 callbacks added to index
[Info  - 10:44:35 AM] [ElixirLS WorkspaceSymbols] 247 modules added to index
[Info  - 10:44:36 AM] [ElixirLS WorkspaceSymbols] 422 types added to index
[Info  - 10:44:37 AM] [ElixirLS WorkspaceSymbols] 4868 functions added to index

Then nothing else happens…
And when I try to format on save I see

[Error - 10:44:52 AM] Request textDocument/formatting failed.
  Message: project_not_loaded
  Code: -32603 

Also, I dont ever see a build folder get created in .elixir_ls or any dyalizer_tpm folder for that matter.

Any ideas?

Showing Posts 1 to 10

lukaszsamson

lukaszsamson

ElixirLS Core Team

Can you create a sample repo that reproduces this problem? It’s hard to tell from the log alone why the project doesn’t get loaded

laurin

laurin

Hi, I am getting the same notification when working on exs files for a course. I have not created a mix project and until recently I was able to use the formatter without issues. I figured out that version v0.17.4 of the elixirLS plugin introduced this bug and shows this error message when reformatting a file.

lukaszsamson

lukaszsamson

ElixirLS Core Team

Do you open single exs scripts or open a directory without mix project? In both scenarios the formatting should work and rely on default formatter settings. For mix project it loads the project and gets formatter options from .formatter.exs

lc0815

lc0815

this happens on a normal project, in my case a LiveView project where I get this error:

opps

tried to load and image, but my user id is being treated as a new user, after three years of being a member…

laurin

laurin

I have a folder with all the different exs files for my course that I open with vscode.

I just tried opening just a file directly with the latest elixirls version and in this case the reformatting works as expected without any errors.

bmitc

bmitc

I am having the exact same issue on a brand new Mix project, which is a very simple one. ElixirLS isn’t finding a formatter, and then it also crashes and doesn’t work at all beyond syntax highlighting. I just get this message in the Output tab:

[Error - 12:44:13 AM] Stopping server failed
Error: Stopping the server timed out
	at c:\Users\<username>\.vscode\extensions\jakebecker.elixir-ls-0.17.6\out\extension.js:89:9067

Edit: This is clear from the file path reported, but this is on Windows 11. Also, mix compile, mix format, etc. work fine.

lukaszsamson

lukaszsamson

ElixirLS Core Team
lukaszsamson

lukaszsamson

ElixirLS Core Team

Can you share a repo that reproduces the problem?

lukaszsamson

lukaszsamson

ElixirLS Core Team

The formatter issue in non mix projects is fixed in v0.17.7

bmitc

bmitc

Here’s a repo I just pushed: GitHub - bmitc/elixir-airthings: Airthings HTTP API client · GitHub

I haven’t used Elixir in a few months, so I don’t know when this began. But this is a fresh Mix project with the latest Elixir (Elixir 1.15.7 / OTP 26) on Windows 11. I haven’t tried yet on Ubuntu through WSL. There’s nothing special going on in the Mix project.

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
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
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
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
ryanwinchester
apply_graft/2 doesn’t rewrite an add_many sub-workflow’s deps on an add step. Grafted jobs cancel with “upstream job was deleted” Version...
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
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

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews