Skip to content

Commit

Permalink
gopls/internal/lsp/cache: suppress crashes in fact_purity analyzer
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
adonovan committed Oct 7, 2022
1 parent a410e98 commit 709f108
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gopls/internal/lsp/cache/analysis.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,10 @@ func actionImpl(ctx context.Context, snapshot *snapshot, deps []*actionHandle, a
if r := recover(); r != nil {
// An Analyzer crashed. This is often merely a symptom
// of a problem in package loading.
if bug.PanicOnBugs {
if bug.PanicOnBugs && analyzer.Name != "fact_purity" {
// During testing, crash. See issues 54762, 56035.
// But ignore analyzers with known crash bugs:
// - fact_purity (dominikh/go-tools#1327)
debug.SetTraceback("all") // show all goroutines
panic(r)
} else {
Expand Down

0 comments on commit 709f108

Please sign in to comment.