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)

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?

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

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

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