Skip to content

bug/lsp: fails to resolve relative type files in a library #631

Open
@laciferin2024

Description

@laciferin2024

Lsp log

lsp.log

Walkthrough

https://youtu.be/QfcH8X-fvI0

Snap

Image

Issue 2 : LSP crashes multiple times

Perf 76   [10:20:45.728] textDocument/diagnostic: 84.334µs
unknown method $/setTrace

... $/cancel ... was reportedly unknown method too..


-----------------------------------------------
Info 16   [10:40:17.135] Open files: 
Info 16   [10:40:17.135] 	FileName: /Volumes/N/Decenter/ideomind/utils/lh.ts ProjectRootPath: 
Info 16   [10:40:17.135] 		Projects: /dev/null/inferredProject1*
Info 16   [10:40:17.135] 	FileName: /Volumes/N/Decenter/ideomind/node_modules/%40lighthouse-web3/sdk/dist/Lighthouse/index.d.ts ProjectRootPath: 
Info 16   [10:40:17.135] 		Projects: /dev/null/inferredProject1*
Info 16   [10:40:17.135] 	FileName: ^/untitled/ts-nul-authority/Untitled-1 ProjectRootPath: 
Info 16   [10:40:17.135] 		Projects: /dev/null/inferredProject1*
Perf 16   [10:40:17.152] textDocument/diagnostic: 16.830958ms
Perf 17   [10:40:17.152] textDocument/diagnostic: 235.75µs
panic: file not found

goroutine 1 [running]:
github.com/microsoft/typescript-go/internal/ls.(*LanguageService).getProgramAndFile(0x1400019a1d8?, {0x140042ce450, 0x26})
	/Volumes/N/goferHiro/tsgo/internal/ls/languageservice.go:62 +0x70
github.com/microsoft/typescript-go/internal/ls.(*LanguageService).GetDocumentDiagnostics(0x14000109360?, {0x140042ce450?, 0x1400019a2e8?})
	/Volumes/N/goferHiro/tsgo/internal/ls/diagnostics.go:10 +0x24
github.com/microsoft/typescript-go/internal/lsp.(*Server).handleDocumentDiagnostic(0x14000109360, 0x140076a2870)
	/Volumes/N/goferHiro/tsgo/internal/lsp/server.go:306 +0x60
github.com/microsoft/typescript-go/internal/lsp.(*Server).handleMessage(0x14000109360, 0x140076a2870)
	/Volumes/N/goferHiro/tsgo/internal/lsp/server.go:190 +0x13c
github.com/microsoft/typescript-go/internal/lsp.(*Server).Run(0x14000109360)
	/Volumes/N/goferHiro/tsgo/internal/lsp/server.go:118 +0xb8
main.runLSP({0x14000010170, 0x1, 0x1})
	/Volumes/N/goferHiro/tsgo/cmd/tsgo/lsp.go:44 +0x250
main.main()
	/Volumes/N/goferHiro/tsgo/cmd/tsgo/main.go:132 +0xb4
[Error - 10:40:17 AM] Server process exited with code 2.
[Error - 10:40:17 AM] The typescript-go-lsp server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions