Please see the following screenshot:
It says:
could not import C (no package data for import path C)
I have attached an example project that reproduces the failure, here: https://github.com/microsoft/vscode/files/3783446/example-project.zip
I am using Go 1.13 with the latest versions of each extension for Go and C/C++.
There is no compiler error, and this is specifically seemingly isolated as a "vscode problem".
Is there a way to fix this vscode problem?
Ace :
This is a bug in gopls tool distributed in the official golang packages.\n\nHere are the issue links:\n\n\nhttps://github.com/golang/go/issues/32898\nhttps://go-review.googlesource.com/c/tools/+/202238/\n\n\n\n\ninfo from issue report:\n\ninternal/lsp: use Go/cgo source files instead of generated files\n\nUsing CompiledGoFiles was causing metadata lookups to fail for cgo\npackages because it includes generated files in the Go build cache\nwhen the built-in 'go list' driver is used. GoFiles includes both\nGo and cgo original file names, allowing metadata lookups to\nsucceed.\n\n\n",
2019-10-31T13:54:01
mourya venkat :
That's a bug with VSCode and I've written a medium article for this issue. \n\nhttps://medium.com/@mourya.g9/setting-up-confluent-kafka-client-for-golang-with-vscode-7a27bb94220b. Hope this helps.",
2019-10-28T18:21:21