Skip to content

Preserve more context in cross-project stack traces #3725

Description

Today, if a codeLens/resolve request fails, we end up with a stack trace like

internal/ls.handleCrossProject[...]()
	internal/ls/crossproject.go:210
internal/ls.(*LanguageService).ProvideReferences()
	internal/ls/findallreferences.go:659
internal/ls.(*LanguageService).ResolveCodeLens()
	internal/ls/codelens.go:65
internal/lsp.(*Server).handleCodeLensResolve()
	internal/lsp/server.go:1590
internal/lsp.init.func1.registerRequestHandler[...].43()
	internal/lsp/server.go:787
internal/lsp.(*Server).handleRequestOrNotification()
	internal/lsp/server.go:648
internal/lsp.(*Server).dispatchLoop()
	internal/lsp/server.go:527

handleCrossProject swallows up the rest of the context so we don't know the actual problem. We need a way to preserve the "real" stack.

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions