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: Connection got disposed, panic: interface conversion: types.Type is *types.Basic, not *types.Signature #53489

Closed
toy80 opened this issue Jun 19, 2022 · 2 comments
Assignees
Labels
gopls Tools
Milestone

Comments

@toy80
Copy link

@toy80 toy80 commented Jun 19, 2022

(go version go version go1.18 windows/amd64)
(valid build configuration = true)
(build flags: [-tags debug])

parameterized function is missing function body helper.go:300:6:


func ArraySliceCopy[T any](arr Array[T]) []T {
	s := unsafe.Slice(arr.Elem, arr.Len)
	d := make([]T, len(s))
	copy(d, s)
	return d
}


falling back to safe trimming due to type errors: [C:\go\pkg\mod\golang.org\x\image@v0.0.0-20220413100746-70e8d0d3baa9\font\sfnt\sfnt.go:85:24: invalid operation: signed shift count 29 (untyped int constant) requires go1.13 or later C:\go\pkg\mod\golang.org\x\image@v0.0.0-20220413100746-70e8d0d3baa9\font\sfnt\sfnt.go:86:24: invalid operation: signed shift count 29 (untyped int constant) requires go1.13 or later C:\go\pkg\mod\golang.org\x\image@v0.0.0-20220413100746-70e8d0d3baa9\font\sfnt\truetype.go:15:26: invalid operation: signed shift count 0 (untyped int constant) requires go1.13 or later C:\go\pkg\mod\golang.org\x\image@v0.0.0-20220413100746-70e8d0d3baa9\font\sfnt\truetype.go:16:26: invalid operation: signed shift count 1 (untyped int constant) requires go1.13 or later ...


panic: interface conversion: types.Type is *types.Basic, not *types.Signature

goroutine 5399 [running]:
golang.org/x/tools/refactor/satisfy.(*Finder).expr(0xc01f37d500, {0x156e7a0?, 0xc0034af1c0?})
	C:/go/pkg/mod/golang.org/x/tools@v0.1.11-0.20220513164230-dfee1649af67/refactor/satisfy/find.go:442 +0xeab
golang.org/x/tools/refactor/satisfy.(*Finder).expr(0xc01f37d500, {0x156e710?, 0xc0034ba1b0?})
	C:/go/pkg/mod/golang.org/x/tools@v0.1.11-0.20220513164230-dfee1649af67/refactor/satisfy/find.go:452 +0x4d9
golang.org/x/tools/refactor/satisfy.(*Finder).stmt(0xc01f37d500, {0x156e620?, 0xc0034af200?})
	C:/go/pkg/mod/golang.org/x/tools@v0.1.11-0.20220513164230-dfee1649af67/refactor/satisfy/find.go:518 +0xd5b
golang.org/x/tools/refactor/satisfy.(*Finder).stmt(0xc01f37d500, {0x156e740?, 0xc0034bb560?})
	C:/go/pkg/mod/golang.org/x/tools@v0.1.11-0.20220513164230-dfee1649af67/refactor/satisfy/find.go:568 +0xbc5
golang.org/x/tools/refactor/satisfy.(*Finder).Find(0xc01f37d500, 0xc002e3fc70?, {0xc01f18d7d0, 0x1, 0x1?})
	C:/go/pkg/mod/golang.org/x/tools@v0.1.11-0.20220513164230-dfee1649af67/refactor/satisfy/find.go:108 +0x1c5
golang.org/x/tools/internal/lsp/source.(*renamer).satisfy(0xc00946cdc0)
	C:/go/pkg/mod/golang.org/x/tools@v0.1.11-0.20220513164230-dfee1649af67/internal/lsp/source/rename_check.go:800 +0xdc
golang.org/x/tools/internal/lsp/source.(*renamer).checkMethod(0xc00946cdc0, 0xc006640640)
	C:/go/pkg/mod/golang.org/x/tools@v0.1.11-0.20220513164230-dfee1649af67/internal/lsp/source/rename_check.go:718 +0x2d4
golang.org/x/tools/internal/lsp/source.(*renamer).check(0xc00946cdc0, {0x1576968, 0xc006640640?})
	C:/go/pkg/mod/golang.org/x/tools@v0.1.11-0.20220513164230-dfee1649af67/internal/lsp/source/rename_check.go:46 +0x16b
golang.org/x/tools/internal/lsp/source.Rename({0x156fdf0?, 0xc00ff809c0?}, {0x15788a0, 0xc0000f57a0}, {0x1570138, 0xc002d686c0}, {0x107718?, 0xc0?}, {0xc00bfa2576, 0x7})
	C:/go/pkg/mod/golang.org/x/tools@v0.1.11-0.20220513164230-dfee1649af67/internal/lsp/source/rename.go:149 +0x945
golang.org/x/tools/internal/lsp.(*Server).rename(0x11ab580?, {0x156fdf0, 0xc00ff809c0}, 0xc01f37aa00)
	C:/go/pkg/mod/golang.org/x/tools@v0.1.11-0.20220513164230-dfee1649af67/internal/lsp/rename.go:20 +0x10d
golang.org/x/tools/internal/lsp.(*Server).Rename(0xc018ee66c0?, {0x156fdf0?, 0xc00ff809c0?}, 0x11ab580?)
	C:/go/pkg/mod/golang.org/x/tools@v0.1.11-0.20220513164230-dfee1649af67/internal/lsp/server_gen.go:224 +0x25
golang.org/x/tools/internal/lsp/protocol.serverDispatch({0x156fdf0, 0xc00ff809c0}, {0x157c410, 0xc00061e000}, 0xc01f37d050, {0x1570090, 0xc00ff80940})
	C:/go/pkg/mod/golang.org/x/tools@v0.1.11-0.20220513164230-dfee1649af67/internal/lsp/protocol/tsserver.go:727 +0xc5c
golang.org/x/tools/internal/lsp/protocol.ServerHandler.func1({0x156fdf0, 0xc00ff809c0}, 0xc01f37d050, {0x1570090, 0xc00ff80940})
	C:/go/pkg/mod/golang.org/x/tools@v0.1.11-0.20220513164230-dfee1649af67/internal/lsp/protocol/protocol.go:157 +0x90
golang.org/x/tools/internal/lsp/lsprpc.handshaker.func1({0x156fdf0, 0xc00ff809c0}, 0xc01f37d050, {0x1570090?, 0xc00ff80940?})
	C:/go/pkg/mod/golang.org/x/tools@v0.1.11-0.20220513164230-dfee1649af67/internal/lsp/lsprpc/lsprpc.go:511 +0xa43
golang.org/x/tools/internal/jsonrpc2.MustReplyHandler.func1({0x156fdf0, 0xc00ff809c0}, 0xc00f65ec00, {0x1570090?, 0xc00ff80940?})
	C:/go/pkg/mod/golang.org/x/tools@v0.1.11-0.20220513164230-dfee1649af67/internal/jsonrpc2/handler.go:35 +0xf6
golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1.2()
	C:/go/pkg/mod/golang.org/x/tools@v0.1.11-0.20220513164230-dfee1649af67/internal/jsonrpc2/handler.go:103 +0xa3
created by golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1
	C:/go/pkg/mod/golang.org/x/tools@v0.1.11-0.20220513164230-dfee1649af67/internal/jsonrpc2/handler.go:100 +0x20a
[Info  - 07:53:02] Connection to server got closed. Server will restart.
[Error - 07:53:02] Request textDocument/rename failed.
Error: Connection got disposed.
	at Object.dispose (.vscode\extensions\golang.go-0.33.1\dist\goMain.js:4909:25)
	at Object.dispose (.vscode\extensions\golang.go-0.33.1\dist\goMain.js:9694:35)
	at LanguageClient2.handleConnectionClosed (.vscode\extensions\golang.go-0.33.1\dist\goMain.js:11902:38)
	at LanguageClient2.handleConnectionClosed (.vscode\extensions\golang.go-0.33.1\dist\goMain.js:14311:15)
	at closeHandler (.vscode\extensions\golang.go-0.33.1\dist\goMain.js:11890:16)
	at CallbackList.invoke (.vscode\extensions\golang.go-0.33.1\dist\goMain.js:3025:35)
	at Emitter.fire (.vscode\extensions\golang.go-0.33.1\dist\goMain.js:3076:34)
	at closeHandler (.vscode\extensions\golang.go-0.33.1\dist\goMain.js:4171:24)
	at CallbackList.invoke (.vscode\extensions\golang.go-0.33.1\dist\goMain.js:3025:35)
	at Emitter.fire (.vscode\extensions\golang.go-0.33.1\dist\goMain.js:3076:34)
	at StreamMessageReader.fireClose (.vscode\extensions\golang.go-0.33.1\dist\goMain.js:3218:27)
	at Socket.<anonymous> (.vscode\extensions\golang.go-0.33.1\dist\goMain.js:3301:42)
	at Socket.emit (node:events:402:35)
	at Pipe.<anonymous> (node:net:687:12)
@dle8 dle8 changed the title Connection got disposed, panic: interface conversion: types.Type is *types.Basic, not *types.Signature x/tools/gopls: Connection got disposed, panic: interface conversion: types.Type is *types.Basic, not *types.Signature Jun 21, 2022
@dle8 dle8 transferred this issue from golang/vscode-go Jun 21, 2022
@gopherbot gopherbot added Tools gopls labels Jun 21, 2022
@gopherbot gopherbot added this to the Unreleased milestone Jun 21, 2022
@dle8
Copy link

@dle8 dle8 commented Jun 21, 2022

This issue looks like the same with this issue. @alandonovan

@dle8 dle8 removed this from the Unreleased milestone Jun 21, 2022
@dle8 dle8 added this to the gopls/v0.9.0 milestone Jun 21, 2022
@adonovan
Copy link
Member

@adonovan adonovan commented Jun 24, 2022

Indeed, this is a duplicate of #52940.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls Tools
Projects
None yet
Development

No branches or pull requests

4 participants