My apologies to everyone experiencing this problem, we are actively trying to get to the bottom of this issue.
If anyone experiencing this problem is in a position where they can share their entire project, as well as a video of experiencing the bug (ideally multiple times) via a screen recording, that would be immensely valuable to us.
In the meantime, we believe that setting:
HEADERMAP_USES_VFS = YES
to true in your project (or for all your targets) may be an effective workaround for many people. This is not guaranteed to work (which is the reason it isn't already on by default), but it should work for most projects.
Mine (28645028) has been marked as a dupe of 28292226
And yes, currently still using
HEADERMAP_USES_VFS = YES
It's made a slight difference
And Xcode8 crash frequently, I don't know whether it related to this bug. BTW, Xcode recompiling all source files every time and it make The storage space of Macintosh HD comsume very fast
And when I reboot my mac pro, the project compiling very fast. As I use for a period of time, Xcode compiling files become slow and slow and crash frequently.
SO, I GUESS the bug that Xcode recompiling all source files if cause by "DerivedData“ cache in mac.
Thank you ddunbar!
This workaround seems to be working for us so our team is now writing code more than waiting
Where we have to set to true this setting? I can't find it in the build settings of my project
Where is this setting ?
I added as a User-Defined Setting in my Project Build Settings and it seems to be helping.
Update: It seemed to help for a few builds then my project started recompiling all files on even single line changes.
This issue is also causing us a lot of wated times.
For us, the incremental builds are working only if we change something INSIDE a function.
Incremental builds don't work if we:
1) change a function name
2) add a new class
3) add a new var to a class
I have filed RADAR
Which contain a small swift project with 2 classes, unrelated to each other to show the problem.
- Go to Product -> Scheme -> Edit Scheme. Select Build in left side column and uncheck "Find implicit dependencies"
- But this flag should remain checked when you are building the project for first time.
This worked for me. It no longer recompiles the entire project. The only side effect I have noticed so far is that I have to turn it back on for the first build if i clean the project and/or purge DerivedData.
I haven't been able to replicate this issue in a new dummy project, that I would be able to share. I have noticed it only in larger project for customers, all of which have started as Xcode 7.x projects with a bunch of Cocoapods dependencies.
This didn't change anything for us. Even with this flag on, changing a single line of code results in a non-incremental build (about 7 minutes). The current situation is getting us in big trouble holding an important deadline and lets us reconsider our decision for using Swift in future projects. I've been an early adopter working with Swift since 1.0 and was a big fan but this experience destroys my trust in Swift. How can we be sure that such a show stopper issue won't happen in future anymore. I think a big part of the problem is that Apple doesn't eat it's own dog food (e.g. like eskimo wrote "I generally work on small sample code projects and I wouldn’t notice this problem even if it did crop up.").
Your workaround seems to work for bug 28799303.
Without your workaround we can easily reproduce the bug, but with your workaround we haven't had the compilation issue for two business days and we haven't been able to reproduce it since then.
Many thanks. Hope the issue will be solved soon.
Filed one more bug (28908050) with small example project there.
Simply adding/removing ": Equatable" to a separate class that is not related to any others triggers full rebuild in my case.
The issue still persist in the Xcode 8.1 GM.
it recompiles everything due to " (running because command line arguments are different from the last time)"
"Find implicit dependencies" continues to be the solution (don't forget to turn it back on after a project clean).
This setting fixed my issue with whole target recompilation. Thanks for help, but I'm expecting for this issue to be fixed in a future xcode 8.1 release without any custom setting configuration required
Can you tell me where to set the setting: HEADERMAP_USES_VFS = YES, thanks in advance .