Xcode/clang should try to solve implementation detail failures themselves.
Originator: | eloy.de.enige | ||
Number: | rdar://18536864 | Date Originated: | 03-10-2014 |
Status: | Duplicate/18351434 | Resolved: | |
Product: | Developer Tools | Product Version: | |
Classification: | Reproducible: | Always |
Summary: Your build can get into a state where builds fail because clang (and by proxy Xcode) complains that a header has been modified since the precompiled header has been created. In my (naive) thinking this should not be a fatal error. Either clang/Xcode should just deal with it and rebuild automatically or it should provide information as to why it is so important to fail in this state. The clang diagnostic message can be found here https://github.com/llvm-mirror/clang/blob/release_35/include/clang/Basic/DiagnosticSerializationKinds.td#L27 Steps to Reproduce: 1. Manually create a nested/sibling workspace project (or use CocoaPods to generate a Pods.xcodeproj) 2. Build it with xcodebuild 3. Delete the complete project nested/sibling project 4. Rebuild with xcodebuild Expected Results: That clang or Xcode resolves this conflict automatically, optionally log a warning about it doing so, and successfully finish the build. Actual Results: fatal error: file '/Users/eloy/TestPrecompiledHeaderError/vendor/Pods/Target Support Files/Pods/Pods-environment.h' has been modified since the precompiled header '/var/folders/6m/_f14_9xj615g9vz27dg6mp5h0000gn/C/com.apple.DeveloperTools/6.0.1-6A317/Xcode/SharedPrecompiledHeaders/Pods-AFNetworking-prefix-dojgvfodjanafbckmbygraijgapv/Pods-AFNetworking-prefix.pch.pch' was built note: please rebuild precompiled header Version: I think this started since Xcode 6.
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!
Reproduction steps
https://gist.github.com/alloy/25b0e79f4dbbe31532e7
I’ve just got word that people have been seeing this issue since at least Xcode 5.1. Specifically when they switch branches: http://twitter.com/StepanHruda/status/517990811691413505