-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
x/tools/gopls: error loading workspace: no metadata for ... #43004
Comments
Can you please share a |
|
Thanks, @vishalkanaujia -- did $ git clone https://go.googlesource.com/tools
$ cd tools
$ git fetch https://go.googlesource.com/tools refs/changes/73/275273/1 && git cherry-pick FETCH_HEAD
$ cd gopls
$ go install |
This didn't fix the issue for me, although it might just be my GOPRIVATE modules affected now. |
@takeyourhatoff: If you don't mind, could you file a new issue following the steps here: https://github.com/golang/tools/blob/master/gopls/doc/troubleshooting.md#capturing-logs? It's usually easier to investigate different issues separately. |
I still get the same errors. [Error - 12:06:17 PM] 2020/12/08 12:06:17 errors diagnosing workspace: no metadata for bitbucket.org/<monorepo>/mycurrency [bitbucket.org/<monorepo>/mycurrency.test]
snapshot=37
directory=file://<$GOPATH>/src/goprivate/xxx |
Would you be able to share a complete log (starting from the Alternatively, if you're able to reproduce this consistently, maybe you could describe the characteristics of your workspace and see if we can construct a public repro example. |
I hit the problem again. I have sent you a mail with log details. The problem disappears after restarting VSCode. |
Can you please make sure to add the following to your settings? "go.languageServerFlags": [
"-rpc.trace",
] The logs you attached are missing some detail. Also, it looks like your workspace root is not a module, and it is outside of |
Thanks for the recommendations. I think the gopls behavior is correct if the monorepo is placed in the $GOPATH/src/ or just the module of the subdirectory is opened in the editor. |
Yep, that is correct-- |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes!
What operating system and processor architecture are you using (
go env
)?Mac OS 11.0.1
go env
OutputWhat did you do?
What did you expect to see?
No error from go extension.
What did you see instead?
The error caused the disable of source navigation to definitions/implementations.
The text was updated successfully, but these errors were encountered: