Tuesday, June 28, 2005

Succeeded with one error

I was building a project of mine in Xcode yesterday, and I got an interesting message in the build results window.

My build, it seems, had "Succeeded with one error"

This, it seems to me, is "a definition of succeeded that I was previously unaware of" (with apologies to Douglas Adams).

I've got a screen capture of the bottom of the xcode:

1 Comments:

At 2:28 PM, Blogger Mark Bessey said...

This curious circumstance comes about because Xcode uses two different mechanisms for counting errors vs. determining whether a build phase succeeded.

If any of the commands run during the build process return an error (usually via a non-zero exit status), then that build step is considered to have "failed", otherwise it's considered to have succeeded.

Meanwhile, the errors and warnings counts are derived by parsing the text of the build output for things that "look like" error and warning messages. This process is less precise than the one used for determining success or failure, so it's possible to fool the parser with build output that looks like an error message, but actually isn't. This sometimes happens when your build process runs a tool that Xcode wasn't tested with (via a Makefile, or a Shell Script build phase).

If you're seeing this misbehavior with the Apple-provided tools (C compiler, Rez, etc), then you should file a bug with a reproducible case, which will help Apple improve the error message parser.

 

Post a Comment

<< Home