Skip to content

Commit 94ed378

Browse files
committed
internal/lsp/testdata: update for new diagnostic from go list
Now that go list reports import errors on the importing package, update the disabled part of the test to expect that error. (We commented out the line generating the diagnostic in the test before making the change so that the change itself wouldn't generate a diagnostic and break the test). For golang/go#59157 Change-Id: I207f507c8e07dd55d3609ca2bb9bdf25528ec898 Reviewed-on: https://go-review.googlesource.com/c/tools/+/482999 TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: David Chase <[email protected]> Reviewed-by: Michael Matloob <[email protected]> Run-TryBot: Michael Matloob <[email protected]> Reviewed-by: Robert Findley <[email protected]>
1 parent a5c37ba commit 94ed378

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

gopls/internal/lsp/testdata/bad/bad0_go121.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package bad
55

66
// TODO(matloob): uncomment this and remove the space between the // and the @diag
77
// once the changes that produce the new go list error are submitted.
8-
// import _ "golang.org/lsptests/assign/internal/secret" // @diag("\"golang.org/lsptests/assign/internal/secret\"", "compiler", "could not import golang.org/lsptests/assign/internal/secret \\(invalid use of internal package \"golang.org/lsptests/assign/internal/secret\"\\)", "error"),diag("_", "go list", "use of internal package golang.org/lsptests/assign/internal/secret not allowed", "error")
8+
import _ "golang.org/lsptests/assign/internal/secret" //@diag("\"golang.org/lsptests/assign/internal/secret\"", "compiler", "could not import golang.org/lsptests/assign/internal/secret \\(invalid use of internal package \"golang.org/lsptests/assign/internal/secret\"\\)", "error"),diag("_", "go list", "use of internal package golang.org/lsptests/assign/internal/secret not allowed", "error")
99

1010
func stuff() { //@item(stuff, "stuff", "func()", "func")
1111
x := "heeeeyyyy"

gopls/internal/lsp/testdata/summary_go1.21.txt.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ DeepCompletionsCount = 5
88
FuzzyCompletionsCount = 8
99
RankedCompletionsCount = 174
1010
CaseSensitiveCompletionsCount = 4
11-
DiagnosticsCount = 41
11+
DiagnosticsCount = 43
1212
FoldingRangesCount = 2
1313
FormatCount = 6
1414
ImportCount = 8

0 commit comments

Comments
 (0)