Closed hyangah closed 2 weeks ago
Obviously I use inlay hints.
"go.inlayHints.assignVariableTypes": true,
"go.inlayHints.compositeLiteralFields": true,
"go.inlayHints.compositeLiteralTypes": true,
"go.inlayHints.constantValues": true,
"go.inlayHints.functionTypeParameters": true,
"go.inlayHints.parameterNames": true,
"go.inlayHints.rangeVariableTypes": true,
CC @timothy-king @adonovan
Thanks for the very helpful report with minimized test case.
Change https://go.dev/cl/582957 mentions this issue: gopls/internal/golang: fix nil panic in InlayHint
gopls version: (devel)/go1.22.2 74c9cfe4d22faa696baabeea02df6493b15e8c79 (dev version built today) gopls flags: -rpc.trace update flags: proxy extension version: 0.41.4 environment: Visual Studio Code darwin initialization error: undefined issue timestamp: Thu, 02 May 2024 16:39:32 GMT restart history: Thu, 02 May 2024 16:39:28 GMT: activation (enabled: true)
ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.
Describe what you observed.
Opened the folder with the following files. (local go version: 1.21.9, gopls built with go1.22.2)
gopls stats -anon
{ "DirStats": { "Files": 2, "TestdataFiles": 0, "GoFiles": 1, "ModFiles": 1, "Dirs": 1 }, "GOARCH": "amd64", "GOOS": "darwin", "GOPACKAGESDRIVER": "", "GOPLSCACHE": "", "GoVersion": "go1.22.2", "GoplsVersion": "(devel)", "InitialWorkspaceLoadDuration": "272.497863ms", "MemStats": { "HeapAlloc": 2338064, "HeapInUse": 4390912, "TotalAlloc": 6797184 }, "WorkspaceStats": { "Files": { "Total": 2, "Largest": 51, "Errs": 0 }, "Views": [ { "GoCommandVersion": "go1.21.9", "AllPackages": { "Packages": 1, "LargestPackage": 1, "CompiledGoFiles": 1, "Modules": 1 }, "WorkspacePackages": { "Packages": 1, "LargestPackage": 1, "CompiledGoFiles": 1, "Modules": 1 }, "Diagnostics": 1 } ] } }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.