Skip to content
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/gopls: panic running `gopls check <file>` #36769

Closed
JAicewizard opened this issue Jan 25, 2020 · 2 comments
Closed

x/tools/gopls: panic running `gopls check <file>` #36769

JAicewizard opened this issue Jan 25, 2020 · 2 comments
Labels
Milestone

Comments

@JAicewizard
Copy link

@JAicewizard JAicewizard commented Jan 25, 2020

Does this issue reproduce with the latest release?

Yes

What did you expect to see?

A non-panix

What did you see instead?

Panic

panic: interface conversion: interface {} is []span.URI, not []interface {}

goroutine 1 [running]:
golang.org/x/tools/internal/lsp.(*Server).nonstandardRequest(0xc0002c8000, 0xdf3d00, 0xc00003c0d0, 0xcc21b9, 0x13, 0xba4da0, 0xc0003ea1b0, 0x20, 0xb96d60, 0xc68601, ...)
        /home/jaap/go/pkg/mod/golang.org/x/tools@v0.0.0-20200124212728-cb786845cd63/internal/lsp/server.go:117 +0x63d
golang.org/x/tools/internal/lsp.(*Server).NonstandardRequest(0xc0002c8000, 0xdf3d00, 0xc00003c0d0, 0xcc21b9, 0x13, 0xba4da0, 0xc0003ea1b0, 0x0, 0x0, 0xc000323698, ...)
        /home/jaap/go/pkg/mod/golang.org/x/tools@v0.0.0-20200124212728-cb786845cd63/internal/lsp/server_gen.go:116 +0x77
golang.org/x/tools/internal/lsp/cmd.(*connection).diagnoseFiles(0xc00026ee40, 0xdf3d00, 0xc00003c0d0, 0xc000269420, 0x1, 0x1, 0x0, 0x0)
        /home/jaap/go/pkg/mod/golang.org/x/tools@v0.0.0-20200124212728-cb786845cd63/internal/lsp/cmd/cmd.go:439 +0x1dd
golang.org/x/tools/internal/lsp/cmd.(*check).Run(0xc00026a290, 0xdf3d00, 0xc00003c0d0, 0xc0000320b0, 0x1, 0x1, 0x0, 0x0)
        /home/jaap/go/pkg/mod/golang.org/x/tools@v0.0.0-20200124212728-cb786845cd63/internal/lsp/cmd/check.go:59 +0x352
golang.org/x/tools/internal/tool.Run(0xdf3d00, 0xc00003c0d0, 0xdf7240, 0xc00026a290, 0xc0000320b0, 0x1, 0x1, 0x0, 0x0)
        /home/jaap/go/pkg/mod/golang.org/x/tools@v0.0.0-20200124212728-cb786845cd63/internal/tool/tool.go:152 +0x29d
golang.org/x/tools/internal/lsp/cmd.(*Application).Run(0xc0002aaf00, 0xdf3d00, 0xc00003c0d0, 0xc0000320b0, 0x2, 0x2, 0x0, 0x0)
        /home/jaap/go/pkg/mod/golang.org/x/tools@v0.0.0-20200124212728-cb786845cd63/internal/lsp/cmd/cmd.go:144 +0x33a
golang.org/x/tools/internal/tool.Run(0xdf3d00, 0xc00003c0d0, 0xdf7180, 0xc0002aaf00, 0xc0000320a0, 0x2, 0x2, 0x0, 0x0)
        /home/jaap/go/pkg/mod/golang.org/x/tools@v0.0.0-20200124212728-cb786845cd63/internal/tool/tool.go:152 +0x29d
golang.org/x/tools/internal/tool.Main(0xdf3d00, 0xc00003c0d0, 0xdf7180, 0xc0002aaf00, 0xc0000320a0, 0x2, 0x2)
        /home/jaap/go/pkg/mod/golang.org/x/tools@v0.0.0-20200124212728-cb786845cd63/internal/tool/tool.go:91 +0x12f
main.main()
        /home/jaap/go/pkg/mod/golang.org/x/tools/gopls@v0.3.0-pre1/main.go:22 +0xdb

This happens because at internal/lsp/cmd/cmd.go:439 a []span.URI is stored but at internal/lsp/server.go:117 a []interface{} is expected (which is then converted to span.URI).

@gopherbot gopherbot added this to the Unreleased milestone Jan 25, 2020
@gopherbot
Copy link

@gopherbot gopherbot commented Jan 25, 2020

Thank you for filing a gopls issue! Please take a look at the Troubleshooting guide, and make sure that you have provided all of the relevant information here.

@gopherbot
Copy link

@gopherbot gopherbot commented Jan 27, 2020

Change https://golang.org/cl/216539 mentions this issue: internal/lsp/cmd: fix gopls check``

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.