-
Notifications
You must be signed in to change notification settings - Fork 18k
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: failures when switching from GOPATH to modules #37069
Comments
The missing dependency was a package within the project. Kind of like this:
When I opened Then I still got the error that |
I am not able to reproduce this when running through the repro steps myself in |
Change https://golang.org/cl/245818 mentions this issue: |
Also, add a directory parameter to RunGoCommand. To make sure that the parameters aren't misused, change args to a []string. Updates golang/go#40340 Change-Id: Ib5ce606a401a18c29c904b570ec9339f067a3961 Reviewed-on: https://go-review.googlesource.com/c/tools/+/245818 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
* internal/lsp: run gopls as long as there is one folder with a file URI d1954cc8 * internal/lsp/regtest: reproduce edge cases when creating new files c3046009 * internal/span: remove check for nil content bf6e7d25 * internal/lsp: add package completion suggestions cf97e2b3 * internal/lsp/lsprpc: make the LSP forwarder exit error clearer 80e1b039 * internal/lsp: use -json for module upgrades 6fbec87e * unusedresult.go: Include context.With* functions 6e59e247 * internal/lsp: add a test that reproduces golang/go#37069 fd8950f6 * all: update dependencies in tools and gopls modules 5a2aa26b * internal/lsp/cache: don't invalidate metadata for new invalid imports 5deb2631 * internal/lsp/fuzzy: fix return value on no match 6c983e67 * internal/lsp/source: remove dead code from completion 97019fc2 * internal/lsp/source: add some downranking for workspace symbols 3c805d23 * internal/lsp: refactor workspace Symbol method 88346e99 * internal/lsp: add completion suggestions for import statements 84ab5701 * internal/lsp/regtest: add benchmarks for IWL and completion 06cc1d0a * lsp/general.go: change error messages to give more context 021d7c6f * internal/lsp, go/packages: work-around invalid files in GOPATH mode debfaf60 * godoc: fix panic in Presentation.ServeFile 97606e32 * internal/lsp/source: do not allow extraction of an import spec 989ebae2 * internal/lsp: fix builds and tests for go1.12+ df83f4e7 * internal/lsp/regtest: add a workspace symbols benchmark 17fd2f27 * internal/lsp/source: sort references and implementations results b85e56c1 * internal/lsp: ignore period ('.') triggered completions in comments bc8aaaa2 * internal/lsp/source: use space character in markdown formatting f57a28cb * internal/lsp/mod: handle nil pointer exception for empty go.mod files 28d6951f * internal/lsp/source: fix completion on final line of a document e0bf2294 * internal/lsp: use prefix matcher with comment completion b72e8bb6 * internal/analysisinternal: add anonymous structs & interfaces to b303f430 * internal/lsp: don't panic if there are no suggested fixes c024452a * internal/lsp: do not log failed suggested fix for fillstruct to stderr 307de81b * internal/lsp: improvements for command messages 1e23e48a * internal/lsp/regtest: reproduce empty xtest bug 3366bbee * internal/lsp: add ast fields to comment completion for declarations 3509cdc6 * internal/lsp/source: fix panic in formatZeroValue for invalid type daa65388 * internal/lsp/source: fix composite literal type name completion 74543c40 * internal/lsp/lsprpc: quiet the handshaker during regtests c886c0b6 * internal/lsp: consolidate progress reporting ed71c572 * internal/lsp/source: improve completion of printf operands 9ac8e33b
Note that this change also shorten the default errlogmatch wait time from 30s to 25s to slightly improve CI test time and avoid hitting the 10 minute limit. * internal/lsp: run gopls as long as there is one folder with a file URI d1954cc8 * internal/lsp/regtest: reproduce edge cases when creating new files c3046009 * internal/span: remove check for nil content bf6e7d25 * internal/lsp: add package completion suggestions cf97e2b3 * internal/lsp/lsprpc: make the LSP forwarder exit error clearer 80e1b039 * internal/lsp: use -json for module upgrades 6fbec87e * unusedresult.go: Include context.With* functions 6e59e247 * internal/lsp: add a test that reproduces golang/go#37069 fd8950f6 * all: update dependencies in tools and gopls modules 5a2aa26b * internal/lsp/cache: don't invalidate metadata for new invalid imports 5deb2631 * internal/lsp/fuzzy: fix return value on no match 6c983e67 * internal/lsp/source: remove dead code from completion 97019fc2 * internal/lsp/source: add some downranking for workspace symbols 3c805d23 * internal/lsp: refactor workspace Symbol method 88346e99 * internal/lsp: add completion suggestions for import statements 84ab5701 * internal/lsp/regtest: add benchmarks for IWL and completion 06cc1d0a * lsp/general.go: change error messages to give more context 021d7c6f * internal/lsp, go/packages: work-around invalid files in GOPATH mode debfaf60 * godoc: fix panic in Presentation.ServeFile 97606e32 * internal/lsp/source: do not allow extraction of an import spec 989ebae2 * internal/lsp: fix builds and tests for go1.12+ df83f4e7 * internal/lsp/regtest: add a workspace symbols benchmark 17fd2f27 * internal/lsp/source: sort references and implementations results b85e56c1 * internal/lsp: ignore period ('.') triggered completions in comments bc8aaaa2 * internal/lsp/source: use space character in markdown formatting f57a28cb * internal/lsp/mod: handle nil pointer exception for empty go.mod files 28d6951f * internal/lsp/source: fix completion on final line of a document e0bf2294 * internal/lsp: use prefix matcher with comment completion b72e8bb6 * internal/analysisinternal: add anonymous structs & interfaces to b303f430 * internal/lsp: don't panic if there are no suggested fixes c024452a * internal/lsp: do not log failed suggested fix for fillstruct to stderr 307de81b * internal/lsp: improvements for command messages 1e23e48a * internal/lsp/regtest: reproduce empty xtest bug 3366bbee * internal/lsp: add ast fields to comment completion for declarations 3509cdc6 * internal/lsp/source: fix panic in formatZeroValue for invalid type daa65388 * internal/lsp/source: fix composite literal type name completion 74543c40 * internal/lsp/lsprpc: quiet the handshaker during regtests c886c0b6 * internal/lsp: consolidate progress reporting ed71c572 * internal/lsp/source: improve completion of printf operands 9ac8e33b
Note that this change also shorten the errlogmatch wait time when running docker based tests in GitHub actions, to slightly improve CI test time and avoid hitting the 10 minute limit. * internal/lsp: run gopls as long as there is one folder with a file URI d1954cc8 * internal/lsp/regtest: reproduce edge cases when creating new files c3046009 * internal/span: remove check for nil content bf6e7d25 * internal/lsp: add package completion suggestions cf97e2b3 * internal/lsp/lsprpc: make the LSP forwarder exit error clearer 80e1b039 * internal/lsp: use -json for module upgrades 6fbec87e * unusedresult.go: Include context.With* functions 6e59e247 * internal/lsp: add a test that reproduces golang/go#37069 fd8950f6 * all: update dependencies in tools and gopls modules 5a2aa26b * internal/lsp/cache: don't invalidate metadata for new invalid imports 5deb2631 * internal/lsp/fuzzy: fix return value on no match 6c983e67 * internal/lsp/source: remove dead code from completion 97019fc2 * internal/lsp/source: add some downranking for workspace symbols 3c805d23 * internal/lsp: refactor workspace Symbol method 88346e99 * internal/lsp: add completion suggestions for import statements 84ab5701 * internal/lsp/regtest: add benchmarks for IWL and completion 06cc1d0a * lsp/general.go: change error messages to give more context 021d7c6f * internal/lsp, go/packages: work-around invalid files in GOPATH mode debfaf60 * godoc: fix panic in Presentation.ServeFile 97606e32 * internal/lsp/source: do not allow extraction of an import spec 989ebae2 * internal/lsp: fix builds and tests for go1.12+ df83f4e7 * internal/lsp/regtest: add a workspace symbols benchmark 17fd2f27 * internal/lsp/source: sort references and implementations results b85e56c1 * internal/lsp: ignore period ('.') triggered completions in comments bc8aaaa2 * internal/lsp/source: use space character in markdown formatting f57a28cb * internal/lsp/mod: handle nil pointer exception for empty go.mod files 28d6951f * internal/lsp/source: fix completion on final line of a document e0bf2294 * internal/lsp: use prefix matcher with comment completion b72e8bb6 * internal/analysisinternal: add anonymous structs & interfaces to b303f430 * internal/lsp: don't panic if there are no suggested fixes c024452a * internal/lsp: do not log failed suggested fix for fillstruct to stderr 307de81b * internal/lsp: improvements for command messages 1e23e48a * internal/lsp/regtest: reproduce empty xtest bug 3366bbee * internal/lsp: add ast fields to comment completion for declarations 3509cdc6 * internal/lsp/source: fix panic in formatZeroValue for invalid type daa65388 * internal/lsp/source: fix composite literal type name completion 74543c40 * internal/lsp/lsprpc: quiet the handshaker during regtests c886c0b6 * internal/lsp: consolidate progress reporting ed71c572 * internal/lsp/source: improve completion of printf operands 9ac8e33b
Note that this change also shorten the errlogmatch wait time when running docker based tests in GitHub actions, to slightly improve CI test time and avoid hitting the 10 minute limit. * internal/lsp: run gopls as long as there is one folder with a file URI d1954cc8 * internal/lsp/regtest: reproduce edge cases when creating new files c3046009 * internal/span: remove check for nil content bf6e7d25 * internal/lsp: add package completion suggestions cf97e2b3 * internal/lsp/lsprpc: make the LSP forwarder exit error clearer 80e1b039 * internal/lsp: use -json for module upgrades 6fbec87e * unusedresult.go: Include context.With* functions 6e59e247 * internal/lsp: add a test that reproduces golang/go#37069 fd8950f6 * all: update dependencies in tools and gopls modules 5a2aa26b * internal/lsp/cache: don't invalidate metadata for new invalid imports 5deb2631 * internal/lsp/fuzzy: fix return value on no match 6c983e67 * internal/lsp/source: remove dead code from completion 97019fc2 * internal/lsp/source: add some downranking for workspace symbols 3c805d23 * internal/lsp: refactor workspace Symbol method 88346e99 * internal/lsp: add completion suggestions for import statements 84ab5701 * internal/lsp/regtest: add benchmarks for IWL and completion 06cc1d0a * lsp/general.go: change error messages to give more context 021d7c6f * internal/lsp, go/packages: work-around invalid files in GOPATH mode debfaf60 * godoc: fix panic in Presentation.ServeFile 97606e32 * internal/lsp/source: do not allow extraction of an import spec 989ebae2 * internal/lsp: fix builds and tests for go1.12+ df83f4e7 * internal/lsp/regtest: add a workspace symbols benchmark 17fd2f27 * internal/lsp/source: sort references and implementations results b85e56c1 * internal/lsp: ignore period ('.') triggered completions in comments bc8aaaa2 * internal/lsp/source: use space character in markdown formatting f57a28cb * internal/lsp/mod: handle nil pointer exception for empty go.mod files 28d6951f * internal/lsp/source: fix completion on final line of a document e0bf2294 * internal/lsp: use prefix matcher with comment completion b72e8bb6 * internal/analysisinternal: add anonymous structs & interfaces to b303f430 * internal/lsp: don't panic if there are no suggested fixes c024452a * internal/lsp: do not log failed suggested fix for fillstruct to stderr 307de81b * internal/lsp: improvements for command messages 1e23e48a * internal/lsp/regtest: reproduce empty xtest bug 3366bbee * internal/lsp: add ast fields to comment completion for declarations 3509cdc6 * internal/lsp/source: fix panic in formatZeroValue for invalid type daa65388 * internal/lsp/source: fix composite literal type name completion 74543c40 * internal/lsp/lsprpc: quiet the handshaker during regtests c886c0b6 * internal/lsp: consolidate progress reporting ed71c572 * internal/lsp/source: improve completion of printf operands 9ac8e33b
Reported by @tbpg (please correct me if I'm mistaken here).
Repro steps:
go.mod
.The text was updated successfully, but these errors were encountered: