Closed
Description
I'm seeing this gopls crash in Emacs+eglot while trying to use //go:fix inline:
facts.go:356: internal error: gob encoding of analysis fact goFixInline alias failed: gob: type not registered for interface: gofix.goFixInlineAliasFact; please report a bug against fact *gofix.goFixInlineAliasFact in package "golang.org/x/tools/gopls/internal/analysis/gofix"
panic: internal error: gob encoding of analysis fact goFixInline alias failed: gob: type not registered for interface: gofix.goFixInlineAliasFact; please report a bug against fact *gofix.goFixInlineAliasFact in package "golang.org/x/tools/gopls/internal/analysis/gofix"
goroutine 6652 gp=0x1400a1f3180 m=3 mp=0x14000100008 [running]:
panic({0x1052827c0?, 0x1400750d3c0?})
~/go/src/runtime/panic.go:823 +0x150 fp=0x1400752b970 sp=0x1400752b8c0 pc=0x1045ac910
log.Panicf({0x104f63723?, 0x30?}, {0x1400752bb20?, 0x14006bdf560?, 0x1053967a0?})
~/go/src/log/log.go:439 +0x64 fp=0x1400752b9c0 sp=0x1400752b970 pc=0x10464ac44
golang.org/x/tools/internal/facts.(*Set).Encode(0x140073e3428)
~/tools/internal/facts/facts.go:356 +0x898 fp=0x1400752bc10 sp=0x1400752b9c0 pc=0x104c2dbb8
golang.org/x/tools/gopls/internal/cache.(*action).exec(0x14007adc2d0, {0x10544e118, 0x14006e2a750})
~/tools/gopls/internal/cache/analysis.go:1234 +0x9b4 fp=0x1400752beb0 sp=0x1400752bc10 pc=0x104cdce74
golang.org/x/tools/gopls/internal/cache.execActions.func1.1()
~/tools/gopls/internal/cache/analysis.go:908 +0x48 fp=0x1400752bf10 sp=0x1400752beb0 pc=0x104cdc3a8
sync.(*Once).doSlow(0x0?, 0x0?)
~/go/src/sync/once.go:78 +0xe8 fp=0x1400752bf60 sp=0x1400752bf10 pc=0x1045beb08
sync.(*Once).Do(...)
~/go/src/sync/once.go:69
golang.org/x/tools/gopls/internal/cache.execActions.func1()
~/tools/gopls/internal/cache/analysis.go:906 +0x74 fp=0x1400752bfd0 sp=0x1400752bf60 pc=0x104cdc304
runtime.goexit({})
~/go/src/runtime/asm_arm64.s:1273 +0x4 fp=0x1400752bfd0 sp=0x1400752bfd0 pc=0x1045b5354
created by golang.org/x/tools/gopls/internal/cache.execActions in goroutine 6132
~/tools/gopls/internal/cache/analysis.go:904 +0x50