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: temporarily revert the removal of Structured hoverkind #71879

Closed
bhcleek opened this issue Feb 21, 2025 · 8 comments
Closed

x/tools/gopls: temporarily revert the removal of Structured hoverkind #71879

bhcleek opened this issue Feb 21, 2025 · 8 comments
Labels
gopls Issues related to the Go language server, gopls. ToolProposal Issues describing a requested change to a Go tool or command-line program. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@bhcleek
Copy link
Contributor

bhcleek commented Feb 21, 2025

gopls version

golang.org/x/tools/gopls v0.18.0

go env

GO111MODULE=''
GOARCH='arm64'
GOBIN='/Users/bhcleek/go/bin'
GOCACHE='/Users/bhcleek/Library/Caches/go-build'
GOENV='/Users/bhcleek/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/bhcleek/go/pkg/mod'
GONOPROXY='*.internal.digitalocean.com,github.com/digitalocean'
GONOSUMDB='*.internal.digitalocean.com,github.com/digitalocean'
GOOS='darwin'
GOPATH='/Users/bhcleek/go'
GOPRIVATE='*.internal.digitalocean.com,github.com/digitalocean'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.23.0'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/Users/bhcleek/Library/Application Support/go/telemetry'
GCCGO='gccgo'
GOARM64='v8.0'
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 arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/f9/d6g779t53gq_20w0zm2f_1zm0000gn/T/go-build530885244=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

Updated to gopls v0.18.0.

What did you see happen?

gopls v0.18.0 removed structured hover results, breaking vim-go. Vim-go has a few features that depended on the structured result: :GoDoc, hover balloon documentation, and :GoDocBrowser all depended on that structure (and not all for the same reason).

fatih/vim-go#3701 was created this morning, but only documents one of the issues that this change caused.

Is it possible to revert? If not, where can I find a clear definition of the data and its structure that each of the hoverKind values will return, especially FullDocumentation?

What did you expect to see?

Documentation

Editor and settings

Vim w/ vim-go

Logs

No response

@bhcleek bhcleek 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 Feb 21, 2025
@gopherbot gopherbot added this to the Unreleased milestone Feb 21, 2025
@findleyr
Copy link
Member

Yes, I'd not seen this issue and just opened #71880 to track the revert. I'll close that as a dupe of this.

We'll revert for [email protected], which should be released next week (ideally, on Monday).

@findleyr findleyr marked this as a duplicate of #71880 Feb 21, 2025
@findleyr findleyr changed the title x/tools/gopls: removal of hoverKind Structured broke vim-go x/tools/gopls: temporarily revert the removal of Structured hoverkind Feb 21, 2025
@findleyr
Copy link
Member

As described in fatih/vim-go#3701 (comment), we should revert this without a warning for now, since the setting is set internally to vim-go, and therefore users would not be able to avoid the warning.

I will ask vim-go to stop using this setting, so that we can add a warning in [email protected], and finally actually remove this setting in [email protected].

@gabyhelp gabyhelp added the ToolProposal Issues describing a requested change to a Go tool or command-line program. label Feb 21, 2025
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/651238 mentions this issue: gopls: temporarily reinstate the "Structured" hover kind

@findleyr findleyr modified the milestones: Unreleased, gopls/v0.18.1 Feb 21, 2025
gopherbot pushed a commit to golang/tools that referenced this issue Feb 21, 2025
As described in golang/go#71879, the removal of the experimental
"Structured" hover kind unexpectedly broke vim-go.

Reinstate support for this setting, with tests, so that we can proceed
with its deprecation more cautiously.

For golang/go#71879

Change-Id: I6d22852aa10126c84b66f4345fbbdcf4cefbd182
Reviewed-on: https://go-review.googlesource.com/c/tools/+/651238
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Alan Donovan <[email protected]>
Auto-Submit: Robert Findley <[email protected]>
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/651239 mentions this issue: [gopls-release-branch.0.18] gopls: temporarily reinstate the "Structured" hover kind

gopherbot pushed a commit to golang/tools that referenced this issue Feb 21, 2025
…red" hover kind

As described in golang/go#71879, the removal of the experimental
"Structured" hover kind unexpectedly broke vim-go.

Reinstate support for this setting, with tests, so that we can proceed
with its deprecation more cautiously.

For golang/go#71879

Change-Id: I6d22852aa10126c84b66f4345fbbdcf4cefbd182
Reviewed-on: https://go-review.googlesource.com/c/tools/+/651238
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Alan Donovan <[email protected]>
Auto-Submit: Robert Findley <[email protected]>
(cherry picked from commit f2beb33)
Reviewed-on: https://go-review.googlesource.com/c/tools/+/651239
@findleyr
Copy link
Member

This is released in [email protected].

go install golang.org/x/tools/[email protected]

@findleyr findleyr marked this as not a duplicate and then as a duplicate of #71880 Feb 21, 2025
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/651618 mentions this issue: gopls/internal/golang: add missing json tags for hoverResult

gopherbot pushed a commit to golang/tools that referenced this issue Feb 21, 2025
In my haste to partially revert CL 635226 in 651238, I failed to add
json struct tags. Add them back.

For golang/go#71879

Change-Id: I45190cba5154eeed7b6a49db51d2a2a51999be7a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/651618
Auto-Submit: Robert Findley <[email protected]>
Reviewed-by: Alan Donovan <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/651658 mentions this issue: [gopls-release-branch.0.18] gopls/internal/golang: add missing json tags for hoverResult

gopherbot pushed a commit to golang/tools that referenced this issue Feb 21, 2025
…ags for hoverResult

In my haste to partially revert CL 635226 in 651238, I failed to add
json struct tags. Add them back.

For golang/go#71879

Change-Id: I45190cba5154eeed7b6a49db51d2a2a51999be7a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/651618
Auto-Submit: Robert Findley <[email protected]>
Reviewed-by: Alan Donovan <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
(cherry picked from commit 3d7c2e2)
Reviewed-on: https://go-review.googlesource.com/c/tools/+/651658
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Mar 2, 2025
This release fixes two bugs in the minmax algorithm of the modernize
analyzer that caused it to generate incorrect fixes; and restores
the experimental hoverKind=structured configuration setting that
returned JSON output from Hover requests, as vim-go was relying on
it (golang/go#71879).
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. ToolProposal Issues describing a requested change to a Go tool or command-line program. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

4 participants