SolaWing / xcode-build-server

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

Order of options in 'config' command changes result #72

Open joeldrotleff opened 6 days ago

joeldrotleff commented 6 days ago

I notice that if I run:

xcode-build-server config -project *.xcodeproj -scheme MyProject

I get: find root: /Users/joeldrotleff/Library/Developer/Xcode/DerivedData/SDR-ftwiuwdxnnpumieoivglyxblxzbv

But if I change the order: xcode-build-server config -scheme MyProject -project *.xcodeproj

Then it gives me: find root: /Users/me/code/MyProjectsParent

This certainly tripped me up today, I only figured it out by having two machines where one was working correctly (because I happened to get the order right)

SolaWing commented 6 days ago

Strange, the order of parameters should not affect the results. You can look at https://github.com/SolaWing/xcode-build-server/blob/master/config/cmd.py in the code. The parameters are parsed first, and then Splice the root obtained from xcodebuild..

you may debug it by print the xcodebuild cmd, to see if the forward param is correct