x/tools/gopls: error loading workspace when go.mod is directly updated to include a new dependency #47538
Labels
FrozenDueToAge
gopls/metadata
Issues related to metadata loading in gopls
gopls
Issues related to the Go language server, gopls.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Projects
Milestone
What version of Go/Gopls are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
go clean -modcache
to empty the module cache. (clean state)What did you expect to see?
The new dependency is picked up automatically.
Or gopls sends diagnostics with code actions or codelens that downloads the new dependency.
What did you see instead?
Stuck in workspace loading, without any action or helpful info to address the issue.
I found multiple ways to get out of this broken state, and would be nice if gopls suggests one of them or other:
go mod tidy
orgo get
...The following is the gopls log -
gopls log
git fetch
.This was the only diagnostic message presented in
go.mod
.Sorry that I didn't report with a simpler repro case. Probably it's easy enough (just adding a change that adds a new module to go.mod and the code) but want to check if this is a known issue.
The text was updated successfully, but these errors were encountered: