Open freeformz opened 3 months ago
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
Note: The specific issue in https://github.com/golang/go/issues/68116 is fixed. I can now get to the grpc.DialContext w/o issue ... but something is still janky resolving the package name maybe?
Thanks, we'll take a look and fix for v0.16.1 if possible.
CC @adonovan
I think @adonovan had not yet reproduced this. I'm sure there's a bug here, but it might not make v0.16.1, which we want to release early next week in light of the US holidays.
Indeed, I couldn't reproduce it. I notice that (a) there's no go.mod file and (b) the import path reported by go list
is strange (or perhaps normal for pre-module packages?). Gopls' Hover seems to work fine on the result though, at least when it was invoked within the flatbuffers/go package. (@freeformz Is that what you were doing, or were you using Hover on a symbol imported from flatbuffers from outside the package?)
go$ pwd
/Users/adonovan/w/flatbuffers/go
go$ GO111MODULE=off go list -json . | head
{
"Dir": "/Users/adonovan/w/flatbuffers/go",
"ImportPath": "_/Users/adonovan/w/flatbuffers/go",
"Name": "flatbuffers",
"Doc": "Package flatbuffers provides facilities to read and write flatbuffers objects.",
"Match": [
"."
],
"Stale": true,
"StaleReason": "build ID mismatch",
@adonovan Maybe you can help your fellow Googler's ;-) ? https://github.com/google/flatbuffers/pull/7783
@adonovan To expand on what I did ...
import (
flatbuffers "github.com/google/flatbuffers/go"
)
...
func FinishMeasureBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
builder.Finish(offset)
}
...
Hover over *flatbuffers.Builder
in the function declaration, scroll down in the popover to the flatbuffers.Builder in gopls doc viewer
and click that link to : http://127.0.0.1:60961/gopls/6eXi_3Yn_Pg/pkg/github.com/google/flatbuffers?view=1#Builder
I get the 404 error
Alternatively .. in the same code at the same place, right click on *flatbuffers.Builder
in the function declaration, choose Source Action...
from the menu, then click on Browse documentation for type flatbuffers.Builder
and I get directed to: http://127.0.0.1:60961/gopls/6eXi_3Yn_Pg/pkg/github.com/google/flatbuffers/go?view=1#Builder
Which works and renders the documentation.
So one code path figured out the correct url (source action), the other one (popover) doesn't.
gopls version
dev version installed from https://github.com/golang/tools/commit/8fa4173de3eb0507050500109922ff5012c5d635
go env
What did you do?
I installed from master and am having a similar problem to https://github.com/golang/go/issues/68116
From doc link in the hover popup: (URL: http://127.0.0.1:63774/gopls/on0HKAhym30/pkg/github.com/google/flatbuffers?view=1#Builder)
From the Source Action: (URL: http://127.0.0.1:63774/gopls/on0HKAhym30/pkg/github.com/google/flatbuffers/go?view=1#Builder
Note the difference in the URLS....
http://127.0.0.1:63774/gopls/on0HKAhym30/pkg/github.com/google/flatbuffers?view=1#Builder http://127.0.0.1:63774/gopls/on0HKAhym30/pkg/github.com/google/flatbuffers/go?view=1#Builder
The first one doesn't work, the second one does.
What did you see happen?
open the docs when clicking on the doc link in the hover popup
What did you expect to see?
open the docs when clicking on the doc link in the hover popup
Editor and settings
vscode
Logs
No response