-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: interface conversion: types.Object is *types.Var, not *types.Func #67975
Comments
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? |
Similar Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.) |
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. type Foo[T any] struct{ XXX string }
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.) |
I couldn't reproduce but this should indeed be obsolete. We no longer use the panicking OriginMethod logic. |
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: