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 handling invalid directoryFilters setting #51843

Closed
kou-wang opened this issue Mar 20, 2022 · 1 comment
Closed

x/tools/gopls: panic handling invalid directoryFilters setting #51843

kou-wang opened this issue Mar 20, 2022 · 1 comment
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@kou-wang
Copy link

gopls version: v0.8.1 (go1.16.2)
gopls flags:
update flags: proxy
extension version: 0.32.0
go version: 1.16.2
environment: Visual Studio Code darwin
initialization error: undefined
issue timestamp: Sun, 20 Mar 2022 03:02:15 GMT
restart history:
Thu, 17 Mar 2022 21:17:27 GMT: activation (enabled: true)
Fri, 18 Mar 2022 14:54:12 GMT: manual (enabled: true)
Fri, 18 Mar 2022 14:55:51 GMT: manual (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

panic: runtime error: index out of range [0] with length 0

goroutine 125 [running]:
golang.org/x/tools/internal/lsp/source.(*Options).set(0xc00017c240, 0xc0001ce1ce, 0x10, 0x1958320, 0xc000196d20, 0xc0006fcea0, 0x0, 0x0, 0x0, 0x0, ...)
	  options.go:818  0x2972
golang.org/x/tools/internal/lsp/source.SetOptions(0xc00017c240, 0x19a2f20, 0xc0003d7ad0, 0xc0000b73e0, 0xc00027a200, 0x1)
	  options.go:645  0x345
golang.org/x/tools/internal/lsp.(*Server).fetchConfig(0xc000340000, 0x1cfba20, 0xc000342f90, 0xc0003aaf70, 0x8, 0xc0001363f0, 0x25, 0xc00017c240, 0xc00010f3e0, 0xc0003425e4)
	  general.go:396  0x18d
golang.org/x/tools/internal/lsp.(*Server).addView(0xc000340000, 0x1cfba20, 0xc000342f90, 0xc0003aaf70, 0x8, 0xc0001363f0, 0x25, 0x19657c0, 0xc000180d10, 0x0, ...)
	  workspace.go:39  0x10a
golang.org/x/tools/internal/lsp.(*Server).addFolders(0xc000340000, 0x1cfba20, 0xc000342f90, 0xc000305a80, 0x1, 0x1, 0x0, 0x0)
	  general.go:234  0x77b
golang.org/x/tools/internal/lsp.(*Server).initialized(0xc000340000, 0x1cfba20, 0xc000342f90, 0x21f0ba8, 0x0, 0x0)
	  general.go:186  0x1d9
golang.org/x/tools/internal/lsp.(*Server).Initialized(0xc000340000, 0x1cfba20, 0xc000342f90, 0x21f0ba8, 0x21f0ba8, 0x0)
	  server_gen.go:156  0x49
golang.org/x/tools/internal/lsp/protocol.serverDispatch(0x1cfba20, 0xc000342f90, 0x1d140c8, 0xc000340000, 0xc000184cf0, 0x1cfbc18, 0xc000342ed0, 0x981fd00, 0x20300000000000, 0x1ce9960)
	  tsserver.go:140  0xa04
golang.org/x/tools/internal/lsp/protocol.ServerHandler.func1(0x1cfba20, 0xc000342f90, 0xc000184cf0, 0x1cfbc18, 0xc000342ed0, 0x0, 0xc08544d990d02360)
	  protocol.go:154  0xc5
golang.org/x/tools/internal/lsp/lsprpc.handshaker.func1(0x1cfba20, 0xc000342f90, 0xc000184cf0, 0x1cfbc18, 0xc000342ed0, 0x0, 0x0)
	  lsprpc.go:506  0x459
golang.org/x/tools/internal/jsonrpc2.MustReplyHandler.func1(0x1cfba20, 0xc000342f90, 0xc00030eaf8, 0x1cfbc18, 0xc000342ed0, 0x0, 0x0)
	  handler.go:35  0xd7
golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1.2(0xc000118120, 0xc000343440, 0xc0004441a0, 0x1cfba20, 0xc000342f90, 0xc00030eaf8, 0x1cfbc18, 0xc000342ed0)
	  handler.go:103  0x86
created by golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1
	  handler.go:100  0x173
[Error - 9:49:10 AM] 

OPTIONAL: If you would like to share more information, you can attach your complete gopls logs.

NOTE: THESE MAY CONTAIN SENSITIVE INFORMATION ABOUT YOUR CODEBASE.
DO NOT SHARE LOGS IF YOU ARE WORKING IN A PRIVATE REPOSITORY.

<OPTIONAL: ATTACH LOGS HERE>

@findleyr findleyr changed the title gopls: automated issue report (crash) x/tools/gopls: panic handling invalid directoryFilters setting Mar 21, 2022
@findleyr findleyr transferred this issue from golang/vscode-go Mar 21, 2022
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Mar 21, 2022
@gopherbot gopherbot added this to the Unreleased milestone Mar 21, 2022
@findleyr findleyr modified the milestones: Unreleased, gopls/v0.8.2 Mar 21, 2022
@gopherbot
Copy link

Change https://go.dev/cl/395675 mentions this issue: internal/lsp/source: handle empty strings in directoryFilters

@findleyr findleyr self-assigned this Mar 31, 2022
@golang golang locked and limited conversation to collaborators Jun 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants