Skip to content
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

Compilation errors / no autocompletion with gopls and Go modules #275

Closed
stamblerre opened this issue Jun 30, 2020 · 6 comments
Closed

Compilation errors / no autocompletion with gopls and Go modules #275

stamblerre opened this issue Jun 30, 2020 · 6 comments
Labels
FrozenDueToAge upstream-tools Issues that are caused by problems in the tools that the extension depends on.

Comments

@stamblerre
Copy link
Contributor

stamblerre commented Jun 30, 2020

This is a general issue to help guide users of the language server, gopls.

If you see unexpected error messages, make sure that you are opening your directory at or below the module root (the directory containing the go.mod file). You can also open a directory within the module. This is a current limitation of gopls, which the gopls team are working on addressing.

If you are working with multiple modules, you can use VS Code's Workspace Folders feature. You can add another module to your workspace by selecting File -> Add Folder to Workspace. Note that features will not work across modules.

More context here: golang/go#32394, golang/go#36899.
For further help, see the gopls Troubleshooting Guide.

@jcbritobr
Copy link

it doesn't work while using workspaces sometimes. It's frustrating

@hyangah
Copy link
Contributor

hyangah commented Jul 15, 2020

@jcbritobr Sorry to hear that. Can you please share the gopls trace and the symptom when it doesn't work? https://github.com/golang/tools/blob/master/gopls/doc/troubleshooting.md#capturing-logs

@jcbritobr
Copy link

jcbritobr commented Jul 15, 2020 via email

@stamblerre
Copy link
Contributor Author

@jcbritobr: The link @hyangah shared above (https://github.com/golang/tools/blob/master/gopls/doc/troubleshooting.md#capturing-logs) has an explanation of how to capture gopls logs.

@jcbritobr
Copy link

@jcbritobr Sorry to hear that. Can you please share the gopls trace and the symptom when it doesn't work? https://github.com/golang/tools/blob/master/gopls/doc/troubleshooting.md#capturing-logs

Can't reproduce it anymore. I'll close for a while, until get the data for you guys.

@stamblerre
Copy link
Contributor Author

This issue should be fixed by the improved error messages in gopls/v0.6.0, so I think it can now be closed.

@golang golang locked and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge upstream-tools Issues that are caused by problems in the tools that the extension depends on.
Projects
None yet
Development

No branches or pull requests

4 participants