Skip to content

Commit 4818d9e

Browse files
committed
Revert "gopls/internal/lsp/cache: disable strict analysis while we fix panics"
This reverts commit 9b5e55b. Reason for revert: Should have been fixed by https://go.dev/cl/443100 Change-Id: I44eeff6605697b745c3729ac1ec49b9c09114f71 Reviewed-on: https://go-review.googlesource.com/c/tools/+/443340 gopls-CI: kokoro <[email protected]> Reviewed-by: Alan Donovan <[email protected]> Run-TryBot: Robert Findley <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent b2efd4d commit 4818d9e

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

gopls/internal/lsp/cache/analysis.go

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -261,12 +261,7 @@ func actionImpl(ctx context.Context, snapshot *snapshot, deps []*actionHandle, a
261261
// discover this problem in regular packages.
262262
// For command-line-arguments we quietly abort the analysis
263263
// for now since we already know there is a bug.
264-
265-
// Temporarily disable bug reporting due to golang/go#56035: using
266-
// bug.Errorf causes too many test flakes.
267-
// TODO(rfindley): switch back to bug.Errorf once panics are fixed.
268-
errorf := fmt.Errorf
269-
264+
errorf := bug.Errorf // report this discovery
270265
if source.IsCommandLineArguments(pkg.ID()) {
271266
errorf = fmt.Errorf // suppress reporting
272267
}
@@ -372,9 +367,9 @@ func actionImpl(ctx context.Context, snapshot *snapshot, deps []*actionHandle, a
372367
// An Analyzer crashed. This is often merely a symptom
373368
// of a problem in package loading.
374369
//
375-
// We are aware of a likely cause for these panics: the actionHandle
376-
// cache key is not correct. In the meantime, disable strict mode.
377-
const strict = false
370+
// We believe that CL 420538 may have fixed these crashes, so enable
371+
// strict checks in tests.
372+
const strict = true
378373
if strict && bug.PanicOnBugs && analyzer.Name != "fact_purity" {
379374
// During testing, crash. See issues 54762, 56035.
380375
// But ignore analyzers with known crash bugs:

0 commit comments

Comments
 (0)