Xcode success/failure logic is confusing and irritating

Originator:atomicbird
Number:rdar://15451913 Date Originated:12-Nov-2013 02:56 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 5.0.2
Classification: Reproducible:Sometimes
 
Summary:
In some situations (the exact nature of which I can't exactly define), Xcode will report a nonzero number of build errors but still declare that the build succeeded.

This is frankly insane. What is a build error if not an indication that something failed? If Xcode encountered errors building a project, what does it mean that it succeeded anyway? Can I trust the resulting build product?

I've been informed by Dave Ewing that "Build failure means non-zero exit status from a command. Errors and warnings are counted, but don't come into play." And I've read that a few times but it still doesn't make sense. If a build "error" can lead to "success", then there are some serious semantic games going on with the meaning of those words, to the point where I don't even know what Xcode means if it reports a successful build. Or a failed one, for that matter.

I've seen this in some cases where it seemed to be related to something in the derived data folder, or where the error count would simply disappear after another build. But in other situations the conflict is persistent and repeatable. Removing derived data or building again doesn't change anything.

Steps to Reproduce:
1. Build a project with Xcode that contains errors but causes Xcode to report success (as explained above, I don't know the exact circumstances that cause this).

Expected Results:
If there are build errors, the build would fail, and Xcode would report failure.

Actual Results:
In some situations Xcode reports success anyway.

Version:
Xcode 5.0.2, Mac OS X 10.9.


Notes:
The attached screenshot shows Xcode state when this situation occurs. This particular example involves the pngcrush command, but the situation is not unique to pngcrush.

Configuration:
This isn't new, but I'm certain I never saw it before Xcode 4.

Attachments:
'Xcode-1.png' was successfully uploaded.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!