Xcode 6.1: pch files importing headers aren’t rebuilt correctly
| Originator: | rix.rob | ||
| Number: | rdar://19003842 | Date Originated: | 17-Nov-2014 02:15 PM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 6.1 (6A2006) |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: Our .pch imports a header that we end up using in most of our sources. Any time we change that header, builds fail: fatal error: file '/Users/rob/Developer/GitHub/Mac/Classes/Categories/NSFont+GHStyle.h' has been modified since the precompiled header '/Users/rob/Library/Developer/Xcode/DerivedData/GitHub-czytagsiudrpmjdgigwcrwiuinkd/Build/Intermediates/PrecompiledHeaders/GitHub_Prefix-gvznqpqxnsfcvqanokezhglwrmsk/GitHub_Prefix.pch.pch' was built note: please rebuild precompiled header '/Users/rob/Library/Developer/Xcode/DerivedData/GitHub-czytagsiudrpmjdgigwcrwiuinkd/Build/Intermediates/PrecompiledHeaders/GitHub_Prefix-gvznqpqxnsfcvqanokezhglwrmsk/GitHub_Prefix.pch.pch' It’s nice that it says “please” when asking us to do its job for it :D Steps to Reproduce: 1. Add a header used in an app to its .pch 2. Build 3. Change the header 4. Build Expected Results: I expected it to build. Actual Results: fatal error: file '/Users/rob/Developer/GitHub/Mac/Classes/Categories/NSFont+GHStyle.h' has been modified since the precompiled header '/Users/rob/Library/Developer/Xcode/DerivedData/GitHub-czytagsiudrpmjdgigwcrwiuinkd/Build/Intermediates/PrecompiledHeaders/GitHub_Prefix-gvznqpqxnsfcvqanokezhglwrmsk/GitHub_Prefix.pch.pch' was built note: please rebuild precompiled header '/Users/rob/Library/Developer/Xcode/DerivedData/GitHub-czytagsiudrpmjdgigwcrwiuinkd/Build/Intermediates/PrecompiledHeaders/GitHub_Prefix-gvznqpqxnsfcvqanokezhglwrmsk/GitHub_Prefix.pch.pch' Regression: Xcode 5 was reliably able to rebuild the pch in question. We enabled modules when we migrated to Xcode 6.1, tho, which could conceivably be related. Notes: We have precompilation of prefix headers enabled. We don’t have “increase sharing” enabled. The changes noted in the repro don’t involve macros at all. I’m not sure what best practices for pch files are with modules enabled. I’m not finding much relevant to this in Xcode’s docs either. If there’s a fine manual I could be reading, I’d be happy to <3 — thank you!
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!