Closed lelonco closed 9 months ago
xcode-build-server parse should use raw xcode build log, this can be get by xcodebuild build
command or export from Xcode Log UI. It can't work after filtered by xcpretty. also notice increment build from xcodebuild, not contains all logs. so first parse from xcodebuild should be a clean build.(Xcode Log UI has all logs, so don't have to clean build)
Thank you for fast response.
I removed xcpretty, and now my command is:
rm -r .compile*; rm -r .bundle*; xcodebuild -project *.xcodeproj -sdk ${command:ios-debug.targetSdk} -destination 'generic/platform=iOS Simulator' -configuration Debug -resultBundlePath .bundle build | pbpaste | xcode-build-server parse -a
But now I can't get the build log. I'm also trying to use exit ${PIPESTATUS[0]}
from xcpretty command, but it didn't help
also notice increment build from xcodebuild, not contains all logs. so first parse from xcodebuild should be a clean build.(Xcode Log UI has all logs, so don't have to clean build)
I make a clean build folder using Xcode. But it still not working
I also find that .compile
file is empty
Content of file:
pbpaste is used if you manual copy log from terminal or copy. if you use xcodebuild, the command should be: xcodebuild <param> clean build | xcode-build-server parse -a
. xcode build server only accept output from xcodebuild. if you run xcodebuild without xcode-build-server, you will see swiftc compile command in the output. that is the flags xcode-build-server get from
Thank you for your help. It works now If I want to see the xcpretty log I need to specify xclog file path?
if you want to see xcpretty output,you should reuse your log output. you tee your log output to a file, then reuse the file for parse. eg `xcodebuild clean build | tee /tmp/xcodebuild.log | xcpretty; xcode-build-server parse -a /tmp/xcodebuild.log
should I make a clean build every time?
should I make a clean build every time?
no,only first time. xcode-build-server parse -a
will ensure merge newest logs with old logs
thank you for detailed response
I'm using VSCode with an installed Swift extension. I'm using this build command to build the app
rm -r .bundle*; xcodebuild -project *.xcodeproj -sdk ${command:ios-debug.targetSdk} -destination 'generic/platform=iOS Simulator' -configuration Debug -resultBundlePath .bundle build | xcpretty && exit ${PIPESTATUS[0]} | xcode-build-server parse -a | pbpaste | xcode-build-server parse -a
It is built correctly. Xcode version: 15.2 Server path in Swift extension:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/sourcekit-lsp
Here is my log file from sourcekit lsp: log.txt
In this issue, I found that message from you. But I can't figure out how to set other sdk, mb I shouldn't change it 😅 https://github.com/SolaWing/xcode-build-server/issues/32
buildServer.json looks like that