SolaWing / xcode-build-server

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

xcodebuild config support #31

Closed yaroslavyaroslav closed 4 months ago

yaroslavyaroslav commented 4 months ago

Hi, I had read man once more and have found that there's such option as config for this tool that allows to stick xcode-build-server with the original Index.noindex db skipping an intermediate .compile file in a project root folder.

I've found that if to call xcodebuild -resultBundlePath /whatever/ it spits some build logs (*.xcactivitylog) into the very same folder as the Xcode itself and even updates the LogStoreManifest.plist on the path that is watched by xcode-build-server.

But when I try this approach to update lsp-server index it spits empty responses.

Any ideas why?

yaroslavyaroslav commented 4 months ago

This is actually a weird one, but it seems that the issue is gone. Let me keep this issue for a while, as I'll play with this setup a little bit more.

PS: I believe that an addition could be added to a README to that section, that allows to use the config approach with xcodebuild with little effor: xcodebuild -workspace XXX.xcworkspace -scheme XXX -destination 'generic/platform=iOS Simulator' -resultBundlePath /dev/null/1 build. This one allows to both provide the absence destination path and to forward all its input to a void as redundant.

SolaWing commented 4 months ago

in mine test, the -resultBundlePath /dev/null/1 add a empty log..

图片

but with a valid path, eg .bundle, it create log successfully. and also notice the path shouldn't exist else xcodebuild will error. so the build command will be:

rm .bundle; xcodebuild -workspace XXX.xcworkspace -scheme XXX -destination 'generic/platform=iOS Simulator' -resultBundlePath .bundle build

yaroslavyaroslav commented 4 months ago

Oh, got it, thank you for this hint!