From 40cfafff0289ca242f0025af99e4eea46c44f87f Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Thu, 1 Sep 2022 13:35:53 -0700 Subject: [PATCH] x/tools/internal/lsp/source: disable some tests for std lib changes CL 425716 changes parser behavior for incorrect code (it is more lenient) which breaks a few lsp tests. Disable them for now so we can submit CL 425716. For golang/go#54511. For golang/go#54822. Change-Id: I00fa67e29628137f3e4e44c38e92094ea581a61b Reviewed-on: https://go-review.googlesource.com/c/tools/+/427654 Reviewed-by: Robert Griesemer TryBot-Result: Gopher Robot Run-TryBot: Robert Griesemer gopls-CI: kokoro Reviewed-by: Robert Findley --- internal/lsp/testdata/arraytype/array_type.go.in | 6 ++++-- internal/lsp/testdata/nested_complit/nested_complit.go.in | 3 ++- internal/lsp/testdata/summary.txt.golden | 2 +- internal/lsp/testdata/summary_go1.18.txt.golden | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/internal/lsp/testdata/arraytype/array_type.go.in b/internal/lsp/testdata/arraytype/array_type.go.in index 84264699cc..ac1a3e7829 100644 --- a/internal/lsp/testdata/arraytype/array_type.go.in +++ b/internal/lsp/testdata/arraytype/array_type.go.in @@ -9,7 +9,8 @@ func _() { val string //@item(atVal, "val", "string", "var") ) - [] //@complete(" //", PackageFoo) + // disabled - see issue #54822 + [] // complete(" //", PackageFoo) []val //@complete(" //") @@ -33,7 +34,8 @@ func _() { var s []myInt //@item(atS, "s", "[]myInt", "var") s = []m //@complete(" //", atMyInt) - s = [] //@complete(" //", atMyInt, PackageFoo) + // disabled - see issue #54822 + s = [] // complete(" //", atMyInt, PackageFoo) var a [1]myInt a = [1]m //@complete(" //", atMyInt) diff --git a/internal/lsp/testdata/nested_complit/nested_complit.go.in b/internal/lsp/testdata/nested_complit/nested_complit.go.in index 1dddd5b1b5..3ad2d213e9 100644 --- a/internal/lsp/testdata/nested_complit/nested_complit.go.in +++ b/internal/lsp/testdata/nested_complit/nested_complit.go.in @@ -9,6 +9,7 @@ type ncBar struct { //@item(structNCBar, "ncBar", "struct{...}", "struct") func _() { []ncFoo{} //@item(litNCFoo, "[]ncFoo{}", "", "var") _ := ncBar{ - baz: [] //@complete(" //", structNCFoo, structNCBar) + // disabled - see issue #54822 + baz: [] // complete(" //", structNCFoo, structNCBar) } } diff --git a/internal/lsp/testdata/summary.txt.golden b/internal/lsp/testdata/summary.txt.golden index 7420b9466f..d83085db26 100644 --- a/internal/lsp/testdata/summary.txt.golden +++ b/internal/lsp/testdata/summary.txt.golden @@ -1,7 +1,7 @@ -- summary -- CallHierarchyCount = 2 CodeLensCount = 5 -CompletionsCount = 265 +CompletionsCount = 262 CompletionSnippetCount = 106 UnimportedCompletionsCount = 5 DeepCompletionsCount = 5 diff --git a/internal/lsp/testdata/summary_go1.18.txt.golden b/internal/lsp/testdata/summary_go1.18.txt.golden index 94f1e6706a..6bfb1ef3e1 100644 --- a/internal/lsp/testdata/summary_go1.18.txt.golden +++ b/internal/lsp/testdata/summary_go1.18.txt.golden @@ -1,7 +1,7 @@ -- summary -- CallHierarchyCount = 2 CodeLensCount = 5 -CompletionsCount = 266 +CompletionsCount = 263 CompletionSnippetCount = 116 UnimportedCompletionsCount = 5 DeepCompletionsCount = 5