Skip to content

x/tools/gopls: package not found when "linksInHover": "gopls" #68116

@freeformz

Description

@freeformz

ATTENTION: Please answer these questions BEFORE submitting your issue. Thanks!

I am not sure if this is a gopls issue of vs-code go extension issue ... or both...

What did you do?

Enabled

  "gopls": {
    "ui.documentation.linksInHover": "gopls"
  },

Clicked on a doc link in the hover popup for grpc.DialContext and it took me to...
http://127.0.0.1:53693/gopls/exMLWbr5ON4/pkg/google.golang.org/grpc@v1.62.1?view=1#DialContext
And that returned package not found
Screenshot 2024-06-21 at 3 45 28 PM

Right clicked -> Source Action -> Browse documentation for func grpc.DialContext -> which opened http://127.0.0.1:53693/gopls/exMLWbr5ON4/pkg/google.golang.org/grpc?view=1#DialContext (note the difference in the urls)

Screenshot 2024-06-21 at 3 55 44 PM

I tried this in multiple projects and different symbols with the same results (hover popup doc link returns package not found / Source Action works)

What did you expect to see?

The documentation for grpc.DialContext from gopls

What did you see instead?

package not found

Build info

golang.org/x/tools/gopls v0.16.0
    golang.org/x/tools/gopls@v0.16.0 h1:JOYR1NabC699+pLFI02CxlD9xaPXdaVmPp7f01k0/hE=
    github.com/BurntSushi/toml@v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
    github.com/google/go-cmp@v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
    golang.org/x/exp/typeparams@v0.0.0-20221212164502-fae10dda9338 h1:2O2DON6y3XMJiQRAS1UWU+54aec2uopH3x7MAiqGW6Y=
    golang.org/x/mod@v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0=
    golang.org/x/sync@v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
    golang.org/x/telemetry@v0.0.0-20240607193123-221703e18637 h1:3Wt8mZlbFwG8llny+t18kh7AXxyWePFycXMuVdHxnyM=
    golang.org/x/text@v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
    golang.org/x/tools@v0.22.1-0.20240620150659-cb3016b76f3e h1:Cht5EwNRmW9EgQ7ihPmgIswaQW4jR1cPbmzGCNl2++8=
    golang.org/x/vuln@v1.0.4 h1:SP0mPeg2PmGCu03V+61EcQiOjmpri2XijexKdzv8Z1I=
    honnef.co/go/tools@v0.4.7 h1:9MDAWxMoSnB6QoSqiVr7P5mtkT9pOc1kSxchzPCnqJs=
    mvdan.cc/gofumpt@v0.6.0 h1:G3QvahNDmpD+Aek/bNOLrFR2XC6ZAdo62dZu65gmwGo=
    mvdan.cc/xurls/v2@v2.5.0 h1:lyBNOm8Wo71UknhUs4QTFUNNMyxy2JEIaKKo0RWOh+8=
go: go1.22.2

Metadata

Metadata

Assignees

Labels

FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions