New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/internal/lsp: TestDiagnostics/GOPATH is failing on Go 1.10 #28581

Closed
dmitshur opened this Issue Nov 3, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@dmitshur
Member

dmitshur commented Nov 3, 2018

On Go 1.10:

--- FAIL: TestDiagnostics (1.66s)
    --- FAIL: TestDiagnostics/GOPATH (1.66s)
    	diagnostics_test.go:84: diagnostics failed for /var/folders/dx/k53rs1s93538b4x20g46cj_w0000gn/T/TestDiagnostics_GOPATH259002893/lsp/src/golang.org/x/tools/internal/lsp/bad/bad.go: (expected: [{{{4 9} {4 9}} 1  LSP: Go compiler cannot use x (variable of type string) as int value in argument to random2 []} {{{6 1} {6 1}} 1  LSP: Go compiler y declared but not used []} {{{16 2} {16 2}} 1  LSP: Go compiler unknown field f in struct literal []}]), (got: [{{{4 9} {4 9}} 1  LSP: Go compiler cannot use x (variable of type string) as int value in argument to random2 []} {{{6 1} {6 1}} 1  LSP: Go compiler y declared but not used []} {{{14 5} {14 5}} 1  LSP: Go compiler q declared but not used []} {{{16 2} {16 2}} 1  LSP: Go compiler unknown field f in struct literal []}])
FAIL
FAIL	golang.org/x/tools/internal/lsp	1.674s

The test is passing on Go 1.11 and tip.

Source: https://build.golang.org/?repo=golang.org%2fx%2ftools

/cc @heschik @ianthehat

@gopherbot gopherbot added this to the Unreleased milestone Nov 3, 2018

@dmitshur

This comment has been minimized.

Member

dmitshur commented Nov 3, 2018

It looks like this started to happen after CL 145697. I can reproduce locally:

$ git checkout master^^
HEAD is now at f7a8a58e internal/lsp: use packagestest markers to test diagnostics
$ go test golang.org/x/tools/internal/lsp
ok  	golang.org/x/tools/internal/lsp	1.347s
$ go1.10.5 test golang.org/x/tools/internal/lsp
--- FAIL: TestDiagnostics (0.84s)
    --- FAIL: TestDiagnostics/GOPATH (0.84s)
    	diagnostics_test.go:84: diagnostics failed for /var/folders/3m/rg2zm24d1jg40wb48wr0hdjw00jwcj/T/TestDiagnostics_GOPATH825381758/lsp/src/golang.org/x/tools/internal/lsp/bad/bad.go: (expected: [{{{4 9} {4 9}} 1  LSP: Go compiler cannot use x (variable of type string) as int value in argument to random2 []} {{{6 1} {6 1}} 1  LSP: Go compiler y declared but not used []} {{{16 2} {16 2}} 1  LSP: Go compiler unknown field f in struct literal []}]), (got: [{{{4 9} {4 9}} 1  LSP: Go compiler cannot use x (variable of type string) as int value in argument to random2 []} {{{6 1} {6 1}} 1  LSP: Go compiler y declared but not used []} {{{14 5} {14 5}} 1  LSP: Go compiler q declared but not used []} {{{16 2} {16 2}} 1  LSP: Go compiler unknown field f in struct literal []}])
FAIL
FAIL	golang.org/x/tools/internal/lsp	0.892s
$ git checkout master^^^
HEAD is now at 633a9364 go/packages: disable network, improve debug logging
$ go test golang.org/x/tools/internal/lsp
?   	golang.org/x/tools/internal/lsp	[no test files]
$ go1.10.5 test golang.org/x/tools/internal/lsp
?   	golang.org/x/tools/internal/lsp	[no test files]

/cc @stamblerre

@stamblerre

This comment has been minimized.

Contributor

stamblerre commented Nov 5, 2018

Sorry for the delay on fixing it--we were trying to decide the best approach for testing different versions of Go. Should be fixed by https://go-review.googlesource.com/c/tools/+/147439.

@stamblerre stamblerre closed this Nov 5, 2018

@dmitshur

This comment has been minimized.

Member

dmitshur commented Nov 6, 2018

No worries, thanks for taking care of it!

Now that #17626 is resolved, trybots should help catch this in advance next time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment