Pure-D / serve-d

D LSP server (dlang language server protocol server)
MIT License
208 stars 49 forks source link

Attempted to get unknown instance component DCDComponent #110

Closed John-Colvin closed 1 year ago

John-Colvin commented 3 years ago

Perhaps I'm misunderstanding how things are supposed to work, but whenever I try to use go to definition (testing it on serve-d source) I get d language server error: 'Attempted to get unknown instance component DCDComponent in instance cwd:/home/john/Git/serve-d'

I assumed it would automatically download any dependencies like dcd, but maybe that's not the case?

Archlinux, kakoune + kak-lsp, serve-d 4296bf5, kak-lsp is running serve-d with no extra arguments.

andre2007 commented 3 years ago

This is a new issue I am also facing in Visual Studio Code (Windows) dev container (debian 9). It was working all the time and now it fails with the error you mentioned.

John-Colvin commented 3 years ago

This is a new issue I am also facing in Visual Studio Code (Windows) dev container (debian 9). It was working all the time and now it fails with the error you mentioned.

Any chance you can remember what serve-d version you were using back when it worked?

andre2007 commented 3 years ago

Unfortunately not. I do not remember even seen a version number at all in VSC. Normally you just install the extension once and then everything is working fine in the background.

WebFreak001 commented 3 years ago

serve-d hasn't changed in this area in a while so if it's because of a serve-d update, it should have been broken since mid of August.

DCD was usually auto loaded so on old versions this error might indicate a race condition. On newer (after August) versions I introduced lazy loading, so it might be missing some project to load.

In what kind of project does this happen? Does it work as expected with a simple hello world project?

John-Colvin commented 3 years ago

no, same problem. Is there an easy way I can enable debug output or something?

WebFreak001 commented 3 years ago

add "serve-d.trace.server": "verbose" (ignore it being not recognized)

then in the output window for code-d/serve-d it will dump all the stuff like source code and other infos what serve-d is doing which helps diagnose it.

John-Colvin commented 3 years ago

Where would I put that setting? I'm not using vscode.

WebFreak001 commented 3 years ago

in that case check your language client's documentation for verbose logging / request logging instead. That should contain the calls I want to look at.

That setting is a code-d / vscode specific one which is not handled by serve-d

WebFreak001 commented 1 year ago

closing this for the new release, a bunch of places have gotten more stable and the log should contain whatever is needed.

EtoOnAmill commented 4 months ago

@John-Colvin How were you able to solve this? I'm having the exact same problem with a build from source from the latest commit. The output in the *debug* buffer doesn't say anything interesting