Closed wojciech-kulik closed 9 months ago
Ah, the problem is with generated buildServer.json
. It sets incorrect path:
"argv": [
"/usr/local/bin/xcode-build-server"
],
but it should be:
/opt/homebrew/bin/xcode-build-server
did /opt/homebrew/bin add into your PATH?
argv is read by your command absolute path. so if which xcode-build-server
is in /use/local/bin, the argv will be there. if you prefer brew version, should ensure PATH contains /opt/homebrew/bin, and ensure which xcode-build-server
refer to it
I switched from local version. It looks like this path is not being updated, once it's configured. I removed the buildServer.json
regenerated it and now it correctly points to homebrew location.
One more thing. I noticed that Xcode Build Server Startup. Waiting Request...
is logged to stderr
which makes it appear in LspLog
as an error. Could it be changed? It's not an error after all.
[START][2024-02-20 12:10:04] LSP logging initiated
[ERROR][2024-02-20 12:10:04] .../vim/lsp/rpc.lua:734 "rpc" "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/sourcekit-lsp" "stderr" "INFO:root:Xcode Build Server Startup. Waiting Request...\n"
I switched from local version. It looks like this path is not being updated, once it's configured. I removed the buildServer.json regenerated it and now it correctly points to homebrew location.
I push a commit to always update basic info. but it will only effect when next formal release. now have to remove and regenerate it.
is logged to stderr which makes it appear in LspLog as an error. Could it be changed? It's not an error after all.
for log, xcode-build-server need a place to show. since stdout is occupied by communicate with lsp, the convenience output only left stderr. It just log, log level will output in log too. if this really annoy, may need to provide a config to redirect the log..
It would be nice to keep those entries out of LspLog. Every time I need to find an actual problem in LspLog, I see tons of false errors from xcode-build-server
, so I guess the best option would be to log them to some other file and forward to LspLog only true errors.
But it's not a must-have :).
newest Head add a environment XBS_LOGPATH, which can redirect all logs. set to :null to disable it.
Thank you! 🍻
I switched to the latest version from Homebrew and I get:
It turns out that I had to manually create a symlink:
Is it possible to make it automatically via Homebrew? If not then it should be documented in the readme.