Xcode changes case of header files names, which may confuse source control systems
| Originator: | jum | ||
| Number: | rdar://19090219 | Date Originated: | 27-Nov-2014 03:28 PM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 6.1 |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: Under certain circumstances (see steps below), Xcode will change the case of the name of an include file on disk. While on a standard case-insensitive filesystem, this will not cause troubles when building, this may still confuse source control systems, since they usually remember the filenames case-sensitively (because files might be checked out on a case-sensitive filesystem). Steps to Reproduce: - open the enclosed Xcode project „Casey“ - navigate to source file „AppDelegate.m“ - command-click on „foo.h“ in include statement to go to the „foo.h“ header file (this will open the file „FOO.H“ (upper-case filename)) - make a modification in FOO.H - save modified FOO.h Expected Results: Xcode should save the file with the exact same name and case as it was before. Actual Results: Xcode will save „FOO.h“ as „foo.h“ (i.e. it changes the case of the filename) This will confuse (at least some) source control systems, which consider filenames to be case sensitive (e.g. svn). Regression: Happens when the include statement uses a different case than the file on disk. While I agree that this is not good practice and this will only work on case-insensitive filesystems, this is still unfortunately something that’s found relatively frequent in cross-platform projects (especially those sharing code with a Windows implementation). Notes: Apparently, Xcode will save under the name used in the include statement that was used to command-click-open the file originally.
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!