SolaWing / xcode-build-server

a build server protocol implementation for integrate xcode with sourcekit-lsp
MIT License
426 stars 19 forks source link

"use index_store_path_at..." message #12

Closed charshep closed 2 years ago

charshep commented 2 years ago

I tried running this on an existing project and got "use index_path_at" error message. Presumably this is because my project has "enable index while building" set. I did try passing in the data store path specified by this error to sourcekit-lsp to try to use the data store directly, but the error logs complained about "no swift package management file found" (or something like that). That makes sense as my understanding is that sourcekit-lsp only supports IndexStoreDB for projects that user Swift Package Manager. And that shortcoming seems to be the basis for this project. So, my question is what should I do with this error?

Thanks for your help. This looks like it shows a lot of promise I hope to get it working.

SolaWing commented 2 years ago

Did you follow the usage section, generate the buildServer.json and .compile files in the project root directory?

If the file exists, did the file contents correct, and .compile files have the corresponding swift module's compile command?

charshep commented 2 years ago

I tried it again this morning with "enable index while building" disabled and I do have file contents in both of those files. Haven't had a chance to try integrating them yet though.

Thanks for the quick response.

charshep commented 2 years ago

Do you have a reference on how to use the buildServer.json and .compile files? I thought I'd find information under the spec linked on the main page but a quick look at least didn't reveal anything.

SolaWing commented 2 years ago

Do you have a reference on how to use the buildServer.json and .compile files? I thought I'd find information under the spec linked on the main page but a quick look at least didn't reveal anything.

if it at the workspace root, and content correct, it’s should just work.

Or maybe you upload a minimal reproduce project to show you problem?

charshep commented 2 years ago

Thanks again for the quick response. I won't get a chance to return to this for a few weeks but will report back then. If I still can't get it to work I'll put together a small project as you suggest.

charshep commented 2 years ago

I actually had the files down one level too deep in the directory tree. sourcekit-ls integration now seems to mostly work. objc/clangd integration much less so. It seems to only detect object definitions that are defined in the SDK framework itself, but still experimenting.

SolaWing commented 2 years ago

@charshep I havenot yet support and test objc code。 it should be done by export the corresponding compilation flags to the language server.

charshep commented 2 years ago

Yep, I figured that out after taking a closer look at your code so I'll go ahead and close this. Thanks again for your help!