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.Dismiss alert
It is somewhat difficult to specifically point out exactly what the problem is, but this issue seems to have started with the latest VSCode update (I also updated go from 1.20.5 to 1.20.6 during the same timeframe), but in short, I'm getting many broken import problems that were not happening before, and the broken imports seem to cascade into other errors.
For example, if I clone the github repo: https://github.com/opencost/opencost and then open VSCode in the newly cloned directory, I immediately get the following as one of the many broken import errors:
could not import github.com/opencost/opencost/pkg/kubecost (import failed for "github.com/opencost/opencost/pkg/kubecost": internal error while importing "github.com/opencost/opencost/pkg/kubecost" (runtime error: index out of range [3142] with length 28); please report an issue)
The runtime error: index out of range [3142] with length 28 is an error I continue to see in in the problems tab for a few other imports.
I've tried:
go clean -cache
go clean -modcache
reinstalling the go tools
A clear and concise description of what you expected to happen.
What version of Go, VS Code & VS Code Go extension are you using?
Version Information
go version
to get version of Go from the VS Code integrated terminal.go version go1.20.6 linux/amd64
gopls -v version
to get version of Gopls from the VS Code integrated terminal.golang.org/x/tools/gopls v0.13.0
code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders.1.80.2
2ccd690cbff1569e4a83d7c43d45101f817401dc
x64
v0.39.1
Go: Locate Configured Go Tools
command.Share the Go related settings you have added/edited
Run
Preferences: Open Settings (JSON)
command to open your settings.json file.Share all the settings with the
go.
or["go"]
orgopls
prefixes.Describe the bug
It is somewhat difficult to specifically point out exactly what the problem is, but this issue seems to have started with the latest VSCode update (I also updated go from 1.20.5 to 1.20.6 during the same timeframe), but in short, I'm getting many broken import problems that were not happening before, and the broken imports seem to cascade into other errors.
For example, if I clone the github repo: https://github.com/opencost/opencost and then open VSCode in the newly cloned directory, I immediately get the following as one of the many broken import errors:
The
runtime error: index out of range [3142] with length 28
is an error I continue to see in in the problems tab for a few other imports.I've tried:
go clean -cache
go clean -modcache
A clear and concise description of what you expected to happen.
Steps to reproduce the behavior:
runtime error: index out of range [X] with length Y
Screenshots or recordings
If applicable, add screenshots or recordings to help explain your problem.
gopls-bug.mp4
(Sorry for low quality - had to keep it under 10mb 😄)
The text was updated successfully, but these errors were encountered: