You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
$ go version
go version go1.14.1 linux/amd64
go version devel +57e32c4fbd Sun May 10 14:43:46 2020 +0000 linux/amd64
When cgo preprocessing fails, go list -json -compiled -e prints an error on stderr and exits with a non-zero status, but it does not populate the Error field of the package. It is possible to detect that something went wrong because CompiledGoFiles isn't populated, but we can't tell why it failed. Two common reasons are a missing C compiler, and missing libraries.
This has the same root cause as the two linked issues: #34229 and #25842
Currently, go list -e populates the Error field with errors it encounters when loading the package dependency graph. It should also populate the Error field with errors encountered when running cgo, the compiler, and other commands.
I have hidden a bunch of off-topic comments for this issue.
Folks, if you are dealing with a problem that does not match the problem described in the issue title, please either file a separate issue or start a thread on golang-nuts. This issue is not the place for troubleshooting cgo usage in VSCode.