Skip to content
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: hover stops working #64778

Closed
pjweinb opened this issue Dec 17, 2023 · 3 comments
Closed

x/tools/gopls: hover stops working #64778

pjweinb opened this issue Dec 17, 2023 · 3 comments
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@pjweinb
Copy link

pjweinb commented Dec 17, 2023

gopls version

Build info ---------- golang.org/x/tools/gopls v0.14.2 golang.org/x/tools/gopls@v0.14.2 h1:sIw6vjZiuQ9S7s0auUUkHlWgsCkKZFWDHmrge8LYsnc= github.com/BurntSushi/toml@v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= github.com/google/go-cmp@v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= golang.org/x/exp/typeparams@v0.0.0-20221212164502-fae10dda9338 h1:2O2DON6y3XMJiQRAS1UWU+54aec2uopH3x7MAiqGW6Y= golang.org/x/mod@v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= golang.org/x/sync@v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= golang.org/x/sys@v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= golang.org/x/telemetry@v0.0.0-20231114163143-69313e640400 h1:brbkEFfGwNGAEkykUOcryE/JiHUMMJouzE0fWWmz/QU= golang.org/x/text@v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/tools@v0.14.1-0.20231114185516-c9d3e7de13fd h1:Oku7E+OCrXHyst1dG1z10etCTxewCHXNFLRlyMPbh3w= golang.org/x/vuln

go env

GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/Users/pjw/Library/Caches/go-build'
GOENV='/Users/pjw/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/pjw/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/pjw/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/Users/pjw/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.4.darwin-amd64'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='go1.21.4+auto'
GOTOOLDIR='/Users/pjw/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.4.darwin-amd64/pkg/tool/darwin_amd64'
GOVCS=''
GOVERSION='go1.21.4'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/rd/k2_hl56d33d46wylmty83gyh00052r/T/go-build1843092930=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

I did nothing. For hours when I moved the cursor over a symbol vscode would show a hover. Then that stopped. It looks like vscode stopped sending the hover requests.

What did you expect to see?

hovers

What did you see instead?

nothing. However reloading the window brings the hovers back.

Editor and settings

{
"window.title": "${dirty}${activeEditorLong}${separator}${rootName}${separator}${appName}",
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit",
"source.fixAll": "explicit"
},
"editor.minimap.enabled": false,
"editor.suggest.showStatusBar": true,
"extensions.autoCheckUpdates": false,
"go.coverageDecorator": {
"type": "gutter",
"coveredGutterStyle": "blockgreen",
"uncoveredGutterStyle": "blockred",
"coveredHighlightColor": "rgba(64,128,128,0.5)",
"uncoveredHighlightColor": "rgba(128,64,64,0.25)",
"coveredBorderColor": "rgba(64,128,128,1.0)",
"uncoveredBorderColor": "rgba(128,64,64,1.0)"
},
"go.coverOnSingleTestFile": true,
"go.coverOnSingleTest": true,
"go.coverMode": "count",
"go.coverShowCounts": false,
"go.formatTool": "goimports",
"go.lintOnSave": "off",
"go.languageServerExperimentalFeatures": {
"diagnostics": true
},
"[go]": {
"editor.snippetSuggestions": "none",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit",
"source.fixAll": "explicit"
}
},
"gopls": {
"usePlaceholders": true, // add parameter placeholders when completing a function
"verboseOutput": false,
"annotations": {
"Escape": false,
"Nil": false,
"Inline": false,
"Bounds": false
},
"codelenses": {
"gc_details": true
},
"analyses": {
"fillstruct": true,
"staticcheck": false,
"unusedparams": false,
"ST1005": false,
"QF1003": false,
"SA9003": false
},
"ui.noSemanticNumber": true,
"ui.noSemanticString": true,
"ui.semanticTokens": true,
"build.templateExtensions": [".tmpl"]
},
"go.languageServerFlags": [
"-rpc.trace",
"-logfile=auto",
"-debug=localhost:0"
],
"terminal.integrated.defaultProfile.osx": "zsh",
"typescript.format.insertSpaceAfterConstructor": true,
"typescript.format.semicolons": "insert",
"workbench.colorCustomizations": {
"editor.symbolHighlightBorder": "#ff0000",
"editorGutter.deletedBackground": "#ff0000"
// "editor.hoverHighlightBackground": "#ff0000",
// "editor.lineHighlightBackground": "#00ffb310"
},
"typescript.referencesCodeLens.enabled": true,
"typescript.implementationsCodeLens.enabled": true,
"editor.wordWrap": "on",
"go.enableCodeLens": {
"runtest": true
},
"go.delveConfig": {

"dlvLoadConfig": {
  "followPointers": true,
  "maxVariableRecurse": 1,
  "maxStringLen": 64,
  "maxArrayValues": 64,
  "maxStructFields": -1
},
"apiVersion": 2,
"showGlobalVariables": false,
"debugAdapter": "legacy"

},
"editor.inlineSuggest.enabled": true,
"terminal.integrated.commandsToSkipShell": [
"language-julia.interrupt"
],
"julia.symbolCacheDownload": true,
"julia.enableTelemetry": true,
"julia.usePlotPane": false,
"go.toolsManagement.autoUpdate": true,
"editor.fontSize": 14,
"debug.console.fontSize": 14,
"terminal.integrated.fontSize": 14,
"workbench.editor.highlightModifiedTabs": true,
"editor.stickyScroll.enabled": true,
"workbench.editor.empty.hint": "hidden",
"lldb.library": "/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB",
"lldb.launch.expressions": "native",
"editor.occurrencesHighlight": "multiFile",
"editor.unicodeHighlight.includeComments": true,
"editor.unicodeHighlight.nonBasicASCII": true,
}

Logs

The logs are unhelpful. Everything looks fine, but after a while there are no more hover requests.

@pjweinb pjweinb added gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. labels Dec 17, 2023
@gopherbot gopherbot added this to the Unreleased milestone Dec 17, 2023
@hyangah
Copy link
Contributor

hyangah commented Dec 18, 2023

after a while there are no more hover requests.

Doesn't it indicate this is a client issue?

@pjweinb
Copy link
Author

pjweinb commented Dec 18, 2023 via email

@suzmue suzmue modified the milestones: Unreleased, gopls/backlog Dec 19, 2023
@adonovan
Copy link
Member

Unfortunate limitations of JSONRPC make it very difficult to send responses to requests that are never received; I suggest filing this at vscode-go if it persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

5 participants