golang / vscode-go

Go extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=golang.Go
Other
3.78k stars 727 forks source link

gopls: automated issue report (crash) #3380

Closed erikfrish closed 1 month ago

erikfrish commented 1 month ago

gopls version: v0.15.3/go1.22.1 gopls flags: update flags: proxy extension version: 0.41.4 environment: Visual Studio Code darwin initialization error: undefined issue timestamp: Wed, 08 May 2024 12:19:58 GMT restart history: Wed, 08 May 2024 07:16:15 GMT: activation (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

panic: file not found for pos = 1 (-)

goroutine 8177 [running]:
go/types.(*Checker).handleBailout(0x14003525c00, 0x14003ee5878)
      check.go:367  0x9c
panic({0x100d44cc0%3F, 0x14002f32850%3F})
      panic.go:770  0x124
go/types.(*Checker).fileFor(0x14003525c00, 0x1)
      version.go:131  0x154
go/types.(*Checker).allowVersion(0x14003525c00, 0x100dbe520%3F, {0x100ec1720%3F, 0x14000158198%3F}, {0x100a010db, 0x6})
      version.go:97  0x64
go/types.(*Checker).genericExprList(0x14003525c00, {0x140014558d0, 0x1, 0x14000158180%3F})
      call.go:383  0xb64
go/types.(*Checker).callExpr(0x14003525c00, 0x14000c7e0c0, 0x14002403c00)
      call.go:303  0x560
go/types.(*Checker).exprInternal(0x14003525c00, 0x0, 0x14000c7e0c0, {0x100ec70b0, 0x14002403c00}, {0x0, 0x0})
      expr.go:1374  0xd0
go/types.(*Checker).rawExpr(0x14003525c00, 0x0, 0x14000c7e0c0, {0x100ec70b0%3F, 0x14002403c00%3F}, {0x0%3F, 0x0%3F}, 0x1)
      expr.go:979  0x12c
go/types.(*Checker).genericExpr(0x14003525c00, 0x14000c7e0c0, {0x100ec70b0%3F, 0x14002403c00%3F})
      expr.go:1520  0x48
go/types.(*Checker).genericExprList(0x14003525c00, {0x14002403c40, 0x3, 0x14000158138%3F})
      call.go:444  0xaa8
go/types.(*Checker).callExpr(0x14003525c00, 0x14000c63ec0, 0x14002403c80)
      call.go:303  0x560
go/types.(*Checker).exprInternal(0x14003525c00, 0x0, 0x14000c63ec0, {0x100ec70b0, 0x14002403c80}, {0x0, 0x0})
      expr.go:1374  0xd0
go/types.(*Checker).rawExpr(0x14003525c00, 0x0, 0x14000c63ec0, {0x100ec70b0%3F, 0x14002403c80%3F}, {0x0%3F, 0x0%3F}, 0x0)
      expr.go:979  0x12c
go/types.(*Checker).multiExpr(0x14003525c00, {0x100ec70b0, 0x14002403c80}, 0x0)
      expr.go:1532  0x60
go/types.(*Checker).assignVars(0x14003525c00, {0x140014558b0, 0x1, 0x1}, {0x140014558e0, 0x1, 0x1})
      assignments.go:472  0xb4
go/types.(*Checker).stmt(0x14003525c00, 0x0, {0x100ec7260, 0x14002403cc0})
      stmt.go:476  0x10f8
go/types.(*Checker).stmtList(0x14003525c00, 0x0, {0x14002403e00%3F, 0x1009ffce3%3F, 0x5%3F})
      stmt.go:121  0x88
go/types.(*Checker).stmt(0x14003525c00, 0x0, {0x100ec7110, 0x1400240a240})
      stmt.go:562  0x1974
go/types.(*Checker).stmt(0x14003525c00, 0x0, {0x100ec70e0, 0x14002403ec0})
      stmt.go:574  0x258c
go/types.(*Checker).stmtList(0x14003525c00, 0x0, {0x140009deb80%3F, 0x0%3F, 0x1400064fb86%3F})
      stmt.go:121  0x88
go/types.(*Checker).funcBody(0x14003525c00, 0x100ec4210%3F, {0x1400064fde0%3F, 0x140000e8380%3F}, 0x1400293c800, 0x1400240a3c0, {0x0%3F, 0x0%3F})
      stmt.go:41  0x21c
go/types.(*Checker).funcDecl.func1()
      decl.go:852  0x44
go/types.(*Checker).processDelayed(0x14003525c00, 0x0)
      check.go:467  0x12c
go/types.(*Checker).checkFiles(0x14003525c00, {0x140028db640, 0x5, 0x8})
      check.go:411  0x188
go/types.(*Checker).Files(...)
      check.go:372
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).checkPackage(0x14003ec2660, {0x100ec89e8, 0x1400409f410}, 0x14005e5b440)
      check.go:1532  0x764
golang.org/x/tools/gopls/internal/cache.(*typeCheckBatch).handleSyntaxPackage(0x14003ec2660, {0x100ec89e8, 0x1400409f410}, 0x0, {0x14000039830, 0x23})
      check.go:563  0x534
golang.org/x/tools/gopls/internal/cache.(*Snapshot).forEachPackageInternal.func2()
      check.go:414  0x34
golang.org/x/sync/errgroup.(*Group).Go.func1()
      errgroup.go:78  0x58
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 8036
      errgroup.go:75  0x98
gopls stats -anon { "DirStats": { "Files": 702, "TestdataFiles": 0, "GoFiles": 67, "ModFiles": 1, "Dirs": 302 }, "GOARCH": "arm64", "GOOS": "darwin", "GOPACKAGESDRIVER": "", "GOPLSCACHE": "", "GoVersion": "go1.22.1", "GoplsVersion": "v0.15.3", "InitialWorkspaceLoadDuration": "1.533310458s", "MemStats": { "HeapAlloc": 39746360, "HeapInUse": 64544768, "TotalAlloc": 629756424 }, "WorkspaceStats": { "Files": { "Total": 2128, "Largest": 935931, "Errs": 0 }, "Views": [ { "GoCommandVersion": "go1.22.1", "AllPackages": { "Packages": 384, "LargestPackage": 155, "CompiledGoFiles": 2124, "Modules": 46 }, "WorkspacePackages": { "Packages": 33, "LargestPackage": 9, "CompiledGoFiles": 67, "Modules": 1 }, "Diagnostics": 4 } ] } }
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.
suzmue commented 1 month ago

This appears to be another instance of golang/go#66790.

Closing as a duplicate.