Ben has already been very helpful recently with some preparing tasks
Now, I haven't yet managed to get useful responses back from sourcekit-lsp, and after days of trying to narrow down the issue, I want to kindly ask for help again ...
The client sends an initialize
request and gets server capabilities back. (The initialize request has in params.rootUri
an absolute file path to a Swift package folder.)
Then the client gets 2 notifications of type 4 and with these messages:
-
manifest parse error(s):\nThe operation couldn’t be completed. (TSCBasic.Process.Error error 0.)
-
failed to create SwiftPMWorkspace: the package does not contain a buildable target
However, the Swift packages I tried are valid and can be built from Xcode and console and do have buildable targets.
After that, no request works: The textDocument/didOpen
request produces the error LSP response method not found
. And textDocument/documentSymbol
and workspace/symbol
requests return successful responses with empty results.
My main question: Do the above LSP notifications indicate an underlying error that would prevent the mentioned requests to work?
Because I know so little, I can imagine (and have tried) a million levers that might be relevant here ... Btw, the picture is the same when I use SwiftLSPClient, so my client side implementation can't be the only problem.
A few "sub-questions":
- Does the sourcekit-lsp process need to be launched with specific option arguments to make the above requests work?
- Does the process need a specific environment?
- Does the initialize request need to have specific capabilities or other properties?
- And generally: Are there any resources out there aside from the LSP specs and sourcekit-lsp itself that help with implementing a sourcekit-lsp (or other LSP-) client?
Gonna take a break and practice patience now, as I can't force the project forward without help. I'm grateful for any hints that alleviate my ignorance