There was some discussion online about xcodebuild being slower than a build inside Xcode. Mostly for people using VSCode or Cursor instead of Xcode. As far as I know tuist build and tuist cache uses xcodebuild under the hood. Apparently the reasons are that xcodebuild does a lot of work for each invocation that Xcode does on up front on launch or when opening a project. And there’s some network requests.
My questions are:
Which tuist commands use xcodebuild and are they affected by these issues?
Can Tuist temporarily block this domain to skip the networking as suggested in these URLs or does this have problematic side effects?
Is there other work that can be done upfront so that xcodebuild doesn’t have to do for each invocation?
Thanks for sharing these @kaioelfke. Answering your questions:
Which tuist commands use xcodebuild and are they affected by these issues?
A handful of commands use xcodebuild internally: tuist build, tuist test and tuist cache, so they must be impacted.
Can Tuist temporarily block this domain to skip the networking as suggested in these URLs or does this have problematic side effects?
We can add some convenience to apply those things automatically. Would you like to take a stab at implementing those? I remember reading one of the hacks, and i
tuist cache should run xcodebuild with CODE_SIGNING_REQUIRED="NO". I suppose tuist build and tuist test would be impacted, but both of those are mostly run on the CI where the hit from those network requests might not be so bad as you’re not doing incremental compilation there. That’s also why those issues were raised in the context of alternative IDEs as in those scenarios, you run xcodebuildoften with minor changes.
We might want to be a bit more aggressive with adding CODE_SIGNING_REQUIRED based on the platform being run – or at least adding some guidelines. I think it would be very useful if somebody compared tuist build and tuist test on CI with linked workarounds and shared the results with us. That could help in making an informed decision on what to do here.