SolaWing / xcode-build-server

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

xcode-build-server not starting? #20

Closed humblehacker closed 10 months ago

humblehacker commented 10 months ago

Hello, and thanks for putting this together! I'm trying to find a replacement for AppCode with IdeaVim since it's going away at the end of the year, and if I can get this to work it would be a huge help!

Following your instructions, I got this working with a simple personal project. But when I perform the same setup with a much larger project, it doesn't work. When I check the process tree for the simple project, I get:

<my editor>sourcekit-lspPython

But on the larger project the Python process is absent, which I assume is why I can't jump to definition, for example.

How do I get started debugging this? I tried looking for something in Console logs but couldn't find anything useful.

SolaWing commented 10 months ago

You should check your workspace dir,if the buildserver.json is in it。or you can post your sourcekit debug log to find the problem

humblehacker commented 10 months ago

I discovered the SOURCEKIT_LOGGING environment variable, so I set it to 3 and got a bunch more info in my logs. But nothing obvious to me. However, there are a lot of logs that look like this:

2023-06-24 20:30:39.764332 -0700    debug   sourcekit-lsp       <Missing Description>   <private>

So I assume I'm going to need to build sourcekit-lsp from source (I'm currently using the one that ships with Xcode-14.3.1). So I guess I'll give that a try unless you have another suggestion.

SolaWing commented 10 months ago
level = os.environ.get("SOURCEKIT_LOGGING")
if level is not None and int(level) >= 1:
    logging.getLogger().setLevel(logging.DEBUG)
    logging.debug(f"# xcode builde server with python {sys.version}]")

have you see any xcode-build-server log, like # xcode builde server with python or root:Req -->? if no, your xcode-build-server is not start.

you should check your workspace dir, if the buildServer.json is in it and valid. if your sourcekit-lsp has log like could not find manifest, or not a SwiftPM package: <workspacedir_path>