You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my swift package directory however I'm shown this error:
Traceback (most recent call last):
File "/opt/homebrew/bin/xcode-build-server", line 114, in <module>
main()
~~~~^^
File "/opt/homebrew/bin/xcode-build-server", line 77, in main
main(subcommand_argv())
~~~~^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/xcode-build-server/1.2.0/libexec/config/cmd.py", line 95, in main
build_dir = output[0]["buildSettings"]["SYMROOT"]
~~~~~~^^^
IndexError: list index out of range
There technically isn't any "runnable" targets in a Swift package so maybe this error is correct, but I should still be able to Build without running and generate a config no?
Swift Package Project is not a normal xcode project, and xcodebuild -showBuildSettings not works. you can choose following solutions:
sourcekit-lsp already support Swift Package Project, so just use it, don't need buildServer.json. (manual build by swift build)
if you still want to base on xcode project to build, newest head support specify build_root directly, just use --build_root instead of -workspace. eg: xcode-build-server --build_root /Users/<username>/Library/Developer/Xcode/DerivedData/<project_name>-<hash>.
in version 1.2.0 on brew, you can use the same buildServer.json generated by 2, or you can copy other buildServer.json, can modify the build_root field.
Activity
SolaWing commentedon Aug 19, 2025
Swift Package Project is not a normal xcode project, and xcodebuild -showBuildSettings not works. you can choose following solutions:
swift build)--build_rootinstead of-workspace. eg:xcode-build-server --build_root /Users/<username>/Library/Developer/Xcode/DerivedData/<project_name>-<hash>.build_rootfield.