Skip to content

Commit 8b1d1ec

Browse files
adonovangopherbot
authored andcommitted
gopls/internal/lsp/cache: suppress panics during analysis
We now have a plausible model for the cause of the analysis crashes and are disabling this check until we have submitted a plausible fix. (Specifically: actionHandle.promise may be a stale promise for an older package with the same ID, since snapshot.actions uses the package ID as a key. This causes us to re-use stale inspectors, whose syntax nodes won't be found in TypesInfo.) Updates golang/go#54762 Updates golang/go#56035 Change-Id: I1a7cc1b02b8c322692b1a6bee03f6cd858c08ea0 Reviewed-on: https://go-review.googlesource.com/c/tools/+/440179 TryBot-Result: Gopher Robot <[email protected]> gopls-CI: kokoro <[email protected]> Run-TryBot: Alan Donovan <[email protected]> Reviewed-by: Bryan Mills <[email protected]> Auto-Submit: Alan Donovan <[email protected]>
1 parent 20c1ee7 commit 8b1d1ec

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

gopls/internal/lsp/cache/analysis.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,11 @@ 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 && analyzer.Name != "fact_purity" {
368+
// Now that we have a theory of these crashes,
369+
// we disable the check to stop flakes from being a nuisance.
370+
// TODO(adonovan): re-enable it when plausibly fixed.
371+
const strict = false
372+
if strict && bug.PanicOnBugs && analyzer.Name != "fact_purity" {
369373
// During testing, crash. See issues 54762, 56035.
370374
// But ignore analyzers with known crash bugs:
371375
// - fact_purity (dominikh/go-tools#1327)

0 commit comments

Comments
 (0)