-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VS Code Folders should have isolated language server context #434
Comments
This comment has been minimized.
This comment has been minimized.
@matt-FFFFFF I believe that "no root module found" is generally unrelated to this bug. The way this bug would be experienced by the end user is in fact by finding either incorrect or more than 1 root module. |
I would be curious to see the log though, if you don't mind sharing it - that might help me understand why it isn't being discovered - see https://github.com/hashicorp/terraform-ls/blob/master/docs/TROUBLESHOOTING.md for how to set up logging. |
Apologies. Having searched again I can see that my issue is already reported. |
@matt-FFFFFF No worries, there's a number of reports with "no root module found" message, but they may each have different root cause - which is why I'd really appreciate looking at the log. |
Sure. Getting them now |
Once you have the logs then this may be the best place for continuing the discussion: hashicorp/terraform-ls#221 |
Typically. It's not doing it now... Will report in that issue when I get something |
For reference, here's the VSCode example on handling multiple workspace folders: https://github.com/microsoft/vscode-extension-samples/tree/master/lsp-multi-server-sample |
I think this is related and/or a duplicate of #330 |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
I am unsure if this is at all duplicate of #417 since we don't have enough details there, but I managed to reproduce a bug with a great help of a community member on Discourse.
This could also be solved by hashicorp/terraform-ls#179 but I think if we know that two folders just aren't related to each other I think we just shouldn't even attempt to be cross-linking them in any way, i.e. these shouldn't share the same language server session.
Hierarchy
Steps to reproduce
first
in VS Code, e.g. viacode first
in the terminal->
Add Folder to Workspace
second
folderActual behaviour
textDocument/didOpen
was sent to the server, which looked upfirst
root module as a candidate forsecond
, because they share the same LS session.Expected behaviour
New language server session or process is launched for
second
folder andinitialize
request is sent, which triggers an isolated discovery of root module(s) withinsecond
.We could also leverage
workspace/workspaceFolders
, but I am afraid that might require some more significant changes on the server side. Alsoworkspace/workspaceFolders
is opt-in per LSP and when it isn't supported by the server then most clients (those I had chance to try) just launch isolated session and send newinitialize
request, so I think the extension should just mimic this behaviour for now.The text was updated successfully, but these errors were encountered: