Skip to content

Request textDocument/documentHighlight failedΒ #1772

@ivanvoznyakovsky

Description

@ivanvoznyakovsky

Stack trace

[Error - 17:43:57] Request textDocument/documentHighlight failed.
  Message: InternalError: panic handling request textDocument/documentHighlight: Unexpected symbol at KindStringLiteral: "/.../node_modules/@.../dist/index"
  Code: -32603 
panic handling request textDocument/documentHighlight Unexpected symbol at KindStringLiteral: "/.../node_modules/.../dist/index" goroutine 17247 [running]:
runtime/debug.Stack()
	runtime/debug/stack.go:26 +0x64
github.com/microsoft/typescript-go/internal/lsp.(*Server).recover(0x14000000f00, 0x14004b52b70)
	github.com/microsoft/typescript-go/internal/lsp/server.go:541 +0x44
panic({0x102e58820?, 0x14005ce9280?})
	runtime/panic.go:783 +0x120
github.com/microsoft/typescript-go/internal/ls.skipPastExportOrImportSpecifierOrUnion.func1(...)
	github.com/microsoft/typescript-go/internal/ls/findallreferences.go:327
github.com/microsoft/typescript-go/internal/core.FirstNonNil[...](...)
	github.com/microsoft/typescript-go/internal/core/core.go:260
github.com/microsoft/typescript-go/internal/ls.skipPastExportOrImportSpecifierOrUnion(0x14017d28b60, 0x14000651570, 0x14019745308, 0x70?)
	github.com/microsoft/typescript-go/internal/ls/findallreferences.go:320 +0x1d0
github.com/microsoft/typescript-go/internal/ls.getReferencedSymbolsForSymbol(0x14017d28b60, 0x14000651570, {0x14019d52d00, 0x1, 0x1}, 0x14019d52d48, 0x14019745308, {0x0, 0x0, 0x2, ...})
	github.com/microsoft/typescript-go/internal/ls/findallreferences.go:1036 +0x84
github.com/microsoft/typescript-go/internal/ls.(*LanguageService).getReferencedSymbolsForNode(0x140148c6930, {0x10306e050, 0x14015f45360}, 0x371, 0x14000651570, 0x1400075cf00, {0x14019d52d00, 0x1, 0x1}, {0x0, ...}, ...)
	github.com/microsoft/typescript-go/internal/ls/findallreferences.go:683 +0x59c
github.com/microsoft/typescript-go/internal/ls.(*LanguageService).getSemanticDocumentHighlights(0x140148c6930, {0x10306e050, 0x14015f45360}, 0x371, 0x14000651570, 0x1400075cf00, 0x14001124908)
	github.com/microsoft/typescript-go/internal/ls/documenthighlights.go:55 +0xc4
github.com/microsoft/typescript-go/internal/ls.(*LanguageService).ProvideDocumentHighlights(0x140148c6930, {0x10306e050, 0x14015f45360}, {0x14013f6ad20?, 0x1401582c6c0?}, {0x151d7208?, 0x140?})
	github.com/microsoft/typescript-go/internal/ls/documenthighlights.go:45 +0x34c
github.com/microsoft/typescript-go/internal/lsp.(*Server).handleDocumentHighlight(0x140001662a0?, {0x10306e050?, 0x14015f45360?}, 0x14013f6ad20?, 0x51?)
	github.com/microsoft/typescript-go/internal/lsp/server.go:844 +0x38
github.com/microsoft/typescript-go/internal/lsp.init.func1.registerLanguageServiceDocumentRequestHandler[...].24({0x10306e050, 0x14015f45360}, 0x14004b52b70)
	github.com/microsoft/typescript-go/internal/lsp/server.go:527 +0xe0
github.com/microsoft/typescript-go/internal/lsp.(*Server).handleRequestOrNotification(0x14000000f00, {0x10306e050, 0x14015f45360}, 0x14004b52b70)
	github.com/microsoft/typescript-go/internal/lsp/server.go:424 +0xf4
github.com/microsoft/typescript-go/internal/lsp.(*Server).dispatchLoop.func1()
	github.com/microsoft/typescript-go/internal/lsp/server.go:329 +0x34
created by github.com/microsoft/typescript-go/internal/lsp.(*Server).dispatchLoop in goroutine 34
	github.com/microsoft/typescript-go/internal/lsp/server.go:349 +0x6f8

Steps to reproduce

  1. Focus on path of any import statement.

Metadata

Metadata

Assignees

Labels

CrashDomain: EditorRelated to the LSP server, editor experience

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions