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
The stack (which I've omitted) provides no useful information that isn't deducible from the line number above. Here's the source:
// For package names, we simply link to their imported package.
if pkgName, ok := obj.(*types.PkgName); ok {
linkName = pkgName.Name()
linkPath = pkgName.Imported().Path()
impID := linkMeta.DepsByPkgPath[PackagePath(pkgName.Imported().Path())]
linkMeta = snapshot.Metadata(impID)
if linkMeta == nil {
return protocol.Range{}, nil, bug.Errorf("no metadata for %s", declPGF.URI) // <--- here
}
} else {
Sadly I no longer have (or remember) the contents of aaa.go, a scratch file I used for a quick experiment.
Also: although gopls stats decodes bug reports from the same executable, it's surprisingly laborious to enumerate and decode all the bug reports from all versions $GOPLSCACHE/gopls/*/*/*-bug, since these (binary) files contain the (hex) names of other files: a sort of binary symlink. (I ended up just grepping for the shibboleth "AtTime".) It would be nice if there was a simple command to print all bug reports in the GOPLSCACHE, including those from other gopls binaries (a best-effort decoding, of course, since the format may evolve).
The text was updated successfully, but these errors were encountered:
gopherbot
added
Tools
This label describes issues relating to any tools in the x/tools repository.
gopls
Issues related to the Go language server, gopls.
labels
Jun 4, 2023
I was able to reproduce this at master (87ad891) by hovering over the foo in foo.Print in this program:
package main
import foo "a"
func _() {
foo.Print()
}
adonovan
changed the title
x/tools/gopls: bug.Reportf("no metadata for %s") reached in hover.go
x/tools/gopls: bug.Reportf("no metadata for %s") when hovering over package name of broken import
Jun 28, 2023
While snooping around in the file cache I noticed a crash dump from a non-test binary: the v0.12.0 release binary, in fact. The report is
The stack (which I've omitted) provides no useful information that isn't deducible from the line number above. Here's the source:
Sadly I no longer have (or remember) the contents of aaa.go, a scratch file I used for a quick experiment.
Also: although
gopls stats
decodes bug reports from the same executable, it's surprisingly laborious to enumerate and decode all the bug reports from all versions$GOPLSCACHE/gopls/*/*/*-bug
, since these (binary) files contain the (hex) names of other files: a sort of binary symlink. (I ended up just grepping for the shibboleth "AtTime".) It would be nice if there was a simple command to print all bug reports in the GOPLSCACHE, including those from other gopls binaries (a best-effort decoding, of course, since the format may evolve).The text was updated successfully, but these errors were encountered: