sourcekit-lsp icon indicating copy to clipboard operation
sourcekit-lsp copied to clipboard

[SR-13762] SourceKit-LSP textDocument/* requests return no results if document is not open

Open benlangmuir opened this issue 5 years ago • 1 comments

Previous ID SR-13762
Radar rdar://problem/70546468
Original Reporter @benlangmuir
Type Bug

Additional Detail from JIRA
Votes 0
Component/s SourceKit-LSP
Labels Bug
Assignee None
Priority Medium

md5: 90305bde26b3949654dd517a12e74963

Issue Description:

The "textDocument/*" requests such as completion, definition, references, documentSymbol, etc. will return a fallback value (e.g. [] for completion, nil for documentSymbol) when they are called on a document that has not been opened.

We should improve these to either return an error indicating what went wrong, or else support it by opening the file from disk.

benlangmuir avatar Oct 21 '20 17:10 benlangmuir

@swift-ci create

typesanitizer avatar Oct 21 '20 22:10 typesanitizer

These methods should all return an error now instead of the fallback result.

ahoppen avatar Jun 08 '24 13:06 ahoppen