While trying to setup the Lyft project to use xcbuild, I ran into some issues with dependencies. We use CocoaPods to integrated 3rd party, and some first party development dependencies. The structure looks something like this:
Main Project
-> Alamofire
-> Internal Library
-> zipzap
...
In this simplified example, the issue we're running into is that zipzap cannot be found. This leads to errors in the Internal Library, and stops us from getting anywhere else.
I've attempted to reproduce the same issue in a sample project:
test-xcbuild4.zip
In this project if you run (with or without specifying -executor ninja):
$ xcbuild -executor ninja -workspace test-xcbuild4 -scheme test-xcbuild4
You will see that it fails to build with the error:
{
"kind": "finished",
"name": "compile",
"pid": 48974,
"output": "blah blah/AppDelegate.swift:10:8: error: no such module 'zipzap'\nimport zipzap\n ^\n",
"exit-status": 1
}
(here's the entire build log)
But if you build from within Xcode, everything compiles correctly.
I would love some advice for where to start when I'm facing errors like this, as I'd love to be able to set our project up to benefit from the speed of Ninja! ⚡
Thanks!