Closed
Description
gopls: v0.6.1
I encountered a repo that uses cgo
and requires tools (e.g.pkg-config
, ...) and correct configuration to build cgo
.
Loading packages took a while and eventually failed because of my incomplete configuration. The PROBLEMS
(diagnostics) section is flooded with hundreds of errors related to cgo types
I could find the reasons from the gopls (server)
trace channel of vscode. But it would be better to expose these error in the diagnostics page or with other means. Also, consider suppressing all the cgo-related type errors when the root cause is obvious. Finding the root cause out of hundreds of type errors seems impossible.
[Error - 3:28:30 PM] 2020/12/21 15:28:30 initial workspace load failed: go [-e -json -compiled=true -test=true -export=false -deps=true -find=false -- builtin github.com/some/repo/...]: exit status 2: go: downloading golang.org/x/net v0.0.0-20201031054903-ff519b6c9102
go: downloading github.com/stretchr/testify v1.6.1
...
go: downloading golang.org/x/text v0.3.4
# pkg-config --cflags -- vips vips vips vips vips vips vips vips vips vips vips vips vips vips
pkg-config: exec: "pkg-config": executable file not found in $PATH
# pkg-config --cflags -- vips vips vips vips vips vips vips vips vips vips vips vips vips vips
pkg-config: exec: "pkg-config": executable file not found in $PATH
Metadata
Metadata
Assignees
Labels
Type
Projects
Relationships
Development
No branches or pull requests
Activity
stamblerre commentedon Dec 21, 2020
Was the
go list
error shown at the bottom of the screen? If not, that definitely seems like a problem.hyangah commentedon Dec 21, 2020
No. I don't see any
go list
error message outside the gopls server trace.Also, tried
regenerate cgo definitions
codelens. There was no visible change or error message, which needs improvement.I happened to try
github.com/davidbyttow/govips
but we can create a minimal repro for testing.stamblerre commentedon Dec 28, 2020
I have a CL to make the error message pop-up, but this also looks like a regression in #36770. Reopened that issue.
gopherbot commentedon Dec 28, 2020
Change https://golang.org/cl/280093 mentions this issue:
internal/lsp: restructure the way we report critical errors