Build cycle errors with Xcode 13.3 beta 2 (13E5095k)

Hi, anyone else seeing random build cycle errors with the new Swift build mode in Xcode 13.3 beta 2 (13E5095k)?

defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1

Seems to be triggered by embedded XPC services. Building again usually resolves.

No change with clean build folder, reset DerivedData, reordering build phases (Copy Bundle Resources / Embed XPC Services), etc.

Cycle inside app; building could produce unreliable results. This usually can be resolved by moving the target's Headers build phase before Compile Sources.
Cycle details:
→ Target 'app' has copy command from '<snip>/DerivedData/Build/Products/Debug/<snip>service.xpc' to '<snip>/DerivedData/Build/Products/Debug/<snip>.app/Contents/XPCServices/<snip>service.xpc'

<snip>

CYCLE POINT ->

TODO: FB with reproducible example

  • Same random build cycle errors in Xcode 13.3 beta 3 (13E5104i)

Add a Comment

Replies

I also noticed this with beta 3 of XCode 13.3. The beta of XCode would crash its build system and you'd have to reboot before it could compile again. So I switched back to the production version (13.2.1) and continued using that for the past week.

But as of this morning (16th March) it looks like macOS decided to auto-update and my default version of Xcode is now 13.3 (release).

And guess what?

It still crashes its own build system with these (incorrect) build cycle errors and it's now totally unusable. Anyone know how to revert to a previous working version of Xcode?

  • To answer my own question: Xcode 13.2.1 can be downloaded from https://developer.apple.com/download/all/

    Of course this is just a stop-gap measure as Apps built with an old production version of Xcode can't be submitted to the App Store. But at least this keeps me able to work and build my Xcode projects while awaiting a fix to the crashes seen with Xcode 13.3.

  • Not fixed as Xcode 13.4.

Add a Comment

This usually can be resolved by moving the target's Headers build phase before Compile Sources.

  • I don't even seem to have a Headers section there, and still get the issue. What I did was to learn the clean build folder shortcut. With cleaning, it compiles fine. First time. :-)

  • In my case the problem was in the framework project. Give me some logs and I'll try to help

  • Same story, problem was in the framework project. Cleaning worked sometimes and for some users. Shifting Build order as instructed helped on system that failed even with cleaning.

Add a Comment

Hopefully my project issue might be fixed in Xcode 14 as not seeing the same random build cycle errors.

Also might have been fixed in Xcode 13.4.x while work on this project was paused.

Me too