Search This Blog

Saturday, February 4, 2012

Yes, XCode 4.2 Just Destroyed Your Source...

No, I am not insane.

I had two projects.  One points to a set of files in directory A.  The files are D.h and D.m.

I had a second, new project open in XCode 4.2.  It points to directory B.  The files are also D.h and D.m.

These files are similar but not the same as I am refactoring the code and upgrading the code from A to B.  So I am moving code from the old files in A to the new files in B.

Simple enough from a developer perspective.

Well good old XCode 4.2 apparently thinks these are (somehow) the same while both projects are open.  (XCode 3.2.6 knew the difference.)  Magically and incorrectly the file hash project mumbo-jumbo apparently tells XCode 4.2 that somehow the files are not different and the content is interchangeable.

So I spent an hour updating the new files in B - flipping between the two projects.  Stupidly believing that saving files in the B-based project were actually updating the file system.

Suddenly, without warning, in the project referencing B all the changes magically revert back to the original files in A.

All the code changes vanished.

Not a single warning.

Nothing.

I guess the idiots at Apple working on XCode 4.2 never have to do something like this and hence this aspect of XCode never got tested.

XCode should never, ever overwrite files without a warning.

Worse, I am running Lion.  So when I do searches for these files, e.g., D.h, good old Lion only shows "Last Opened" dates.  So if I touch the file by opening it I can no longer tell which D.* was created when.

I have to go back to the regular finder and look to see "Created Date."

I have written before how you cannot copy XCode 4 projects - apparently no one at Apple even imagines one has to do work like this.

Come on, Apple...

Stop your slow death spiral into becoming Microsoft circa 1998.



No comments:

Post a Comment