Skip to content

Commit 709f108

Browse files
committed
gopls/internal/lsp/cache: suppress crashes in fact_purity analyzer
It has a known bug, and the purpose of the PanicOnBugs is to find unknown bugs. Updates golang/go#54762 Updates golang/go#56035 Change-Id: Id9fdfff478ef52b1d864acee366991808baeb574 Reviewed-on: https://go-review.googlesource.com/c/tools/+/440178 Run-TryBot: Alan Donovan <[email protected]> Reviewed-by: Robert Findley <[email protected]> gopls-CI: kokoro <[email protected]>
1 parent a410e98 commit 709f108

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gopls/internal/lsp/cache/analysis.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,10 @@ func actionImpl(ctx context.Context, snapshot *snapshot, deps []*actionHandle, a
365365
if r := recover(); r != nil {
366366
// An Analyzer crashed. This is often merely a symptom
367367
// of a problem in package loading.
368-
if bug.PanicOnBugs {
368+
if bug.PanicOnBugs && analyzer.Name != "fact_purity" {
369369
// During testing, crash. See issues 54762, 56035.
370+
// But ignore analyzers with known crash bugs:
371+
// - fact_purity (dominikh/go-tools#1327)
370372
debug.SetTraceback("all") // show all goroutines
371373
panic(r)
372374
} else {

0 commit comments

Comments
 (0)