Skip to content

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

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

Open
laciferin2024 opened this issue Mar 16, 2025 · 1 comment
Open

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

laciferin2024 opened this issue Mar 16, 2025 · 1 comment

Comments

@laciferin2024
Copy link

laciferin2024 commented Mar 16, 2025

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.
@john-landgrave
Copy link

I can see that it isn't necessarily the same cause, but I ran into this yesterday when I had an "Untitled - 1" kind of file (a "scratchpad" sort of editor that wasn't ever saved) and it caused the LSP to crash enough that it stopped trying to boot itself up. I had set the language of the file to Typescript (for syntax highlighting) so I suppose the LSP was trying to find it and failing to?

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

No branches or pull requests

2 participants