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
Thanks, this is a new one. Transferring to the gopls issue tracker.
Can you share any information about the code you were editing when this occurred? Is this reproducible?
findleyr
changed the title
gopls: automated issue report (crash)
x/tools/gopls: interface conversion: types.Object is *types.Var, not *types.Func
Jun 13, 2024
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 13, 2024
Thanks for the report. I suspect that there's a generic named type with both a field and a method of the same name. Of course this is not a valid program, but it shouldn't crash the indexer. However I'm unable to reproduce it. I did find a different bug, which I will report separately.
typeFoo[Tany] struct{ XXXstring }
func (Foo[T]) XXX() {} // References on XXX => bug.ReportKeyOf(%s)={} yet func %s is a method"
In any case, there's a good chance this is fixed in the 0.16 pre-release, since we threw away all the old OriginMethod logic. (See also #61196, which was a similar bug in it.)
gopls version: v0.15.3/go1.22.1
gopls flags:
update flags: proxy
extension version: 0.41.4
environment: Visual Studio Code linux
initialization error: undefined
issue timestamp: Thu, 13 Jun 2024 09:17:59 GMT
restart history:
Wed, 12 Jun 2024 03:35:37 GMT: activation (enabled: true)
Wed, 12 Jun 2024 05:06:05 GMT: manual (enabled: true)
Wed, 12 Jun 2024 05:07:03 GMT: manual (enabled: true)
Thu, 13 Jun 2024 09:17:52 GMT: manual (enabled: true)
ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.
Describe what you observed.
gopls stats -anon
{ "DirStats": { "Files": 55, "TestdataFiles": 0, "GoFiles": 11, "ModFiles": 1, "Dirs": 27 }, "GOARCH": "amd64", "GOOS": "linux", "GOPACKAGESDRIVER": "", "GOPLSCACHE": "", "GoVersion": "go1.22.1", "GoplsVersion": "v0.15.3", "InitialWorkspaceLoadDuration": "795.365217ms", "MemStats": { "HeapAlloc": 19938456, "HeapInUse": 32956416, "TotalAlloc": 309115200 }, "WorkspaceStats": { "Files": { "Total": 1090, "Largest": 395026, "Errs": 0 }, "Views": [ { "GoCommandVersion": "go1.22.1", "AllPackages": { "Packages": 177, "LargestPackage": 161, "CompiledGoFiles": 1090, "Modules": 11 }, "WorkspacePackages": { "Packages": 4, "LargestPackage": 8, "CompiledGoFiles": 15, "Modules": 1 }, "Diagnostics": 0 } ] } }OPTIONAL: If you would like to share more information, you can attach your complete gopls logs.
NOTE: THESE MAY CONTAIN SENSITIVE INFORMATION ABOUT YOUR CODEBASE.
DO NOT SHARE LOGS IF YOU ARE WORKING IN A PRIVATE REPOSITORY.
<OPTIONAL: ATTACH LOGS HERE>
The text was updated successfully, but these errors were encountered: