diff --git a/internal/lsp/cache/view.go b/internal/lsp/cache/view.go index b9cd3007d2..428584850d 100644 --- a/internal/lsp/cache/view.go +++ b/internal/lsp/cache/view.go @@ -304,6 +304,9 @@ func (v *view) shutdown(context.Context) { v.cancel() v.cancel = nil } + if v.modfiles != nil { + os.Remove(v.modfiles.temp) + } debug.DropView(debugView{v}) }