elixir-tools / elixir-tools.vscode

Visual Studio Code extension for Elixir
https://marketplace.visualstudio.com/items?itemName=elixir-tools.elixir-tools
Other
87 stars 9 forks source link

Losing track of dependencies #54

Closed jarrodmoldrich closed 10 months ago

jarrodmoldrich commented 10 months ago

@mhanberg I got the extension working after launching with epmd running and launching from command line using code. The first time it ran it downloaded and compiled the dependencies and warnings/errors in the main codebase went to the Problems panel as expected (except those in tests). Strangely, upon restarting VS Code it goes back into a bad state I had before I launched via the command line. Deleting the .elixir_tools folder fixes the problem but causes a full recompile. Also worth noting that it's an umbrella project.

[NextLS] NextLS v0.10.3 has initialized!
[NextLS] Booting runtimes...
[NextLS] Beginning DB migration...
[Info  - 18:31:46] [NextLS] Database is on the latest version: 4
[NextLS] Finished DB migration...
[NextLS] Debuggable: true
[NextLS] Connected to node nextls-runtime-1693038706576956625@[redacted]
[NextLS] Runtime for folder services is ready...
[NextLS] Unchecked dependencies for environment dev:
* vix (Hex package)
  the dependency is not available, run "mix deps.get"
... [snip] ....
* elixir_make (Hex package)
  the dependency is not available, run "mix deps.get"
* cowboy_telemetry (Hex package)
[NextLS]   the dependency is not available, run "mix deps.get"
* sweet_xml (Hex package)
  the dependency is not available, run "mix deps.get"
* ratio (Hex package)
  the dependency is not available, run "mix deps.get"
[Warn  - 18:31:47] [NextLS] Unexpected compiler response: {:error, %{message: "Can't continue due to errors on dependencies", __struct__: Mix.Error, __exception__: true, mix: 1}}

I then tried running a server in the command line on port 9000 and running again, and it fails just like above, but then:

[Error - 18:44:17] [NextLS] The runtime for services has crashed with reason: {:shutdown, :nodedown}
[NextLS] Debuggable: true
[NextLS] Connected to node nextls-runtime-1693039457723948291@[redacted]
[NextLS] Runtime for folder services is ready...
[NextLS] Compiled services!

Also, while I had it working before, I was editing files, particularly in tests, and noticed the errors were attributed to nofile causing them not to show up in the Problems panel. But now I'm finding that the test files don't get parsed at all. But maybe I can spin up another issue for this.

Let me know if there's anything more I can do to debug these issues, or if there's anything more you want to know.

mhanberg commented 10 months ago

If you could make an example umbrella app that demonstrates the issues, that would be great.

We don't yet index or show diagnostics for tests files (someone is working on it now tho!), but you should be able to format a test file.

jarrodmoldrich commented 10 months ago

Hi @mhanberg , sorry for wasting your time. I finally got to looking at this today and realized it might have been due to naively moving my development folders to a new directory and expecting things to work, and they did, so I thought. Checking out my project fresh has indeed fixed the issue for me. Might be worth adding that step in the troubleshooting.