I have been working on a new test project, focusing on generics, and got to the point where it would start indexing but would not complete, sending the CPU into overdrive
After reading several posts about similar problems, I thought I would try commenting out all code and reinstating it one type at a time, deleting the project.xcworkspace from the project, as well as cleaning the DerivedData folder each time.
Eventually, it boiled down to a typealias to a typealias to a closure
public typealias EventClosure<senderT, argsT : EventArgs> = (senderT, argsT) -> ()
public typealias PropertyChangedEventClosure<senderT> = EventClosure<senderT, PropertyChangedEventArgs>
As soon as I changed the second typealias to :
public typealias PropertyChangedEventClosure<senderT> = (senderT, PropertyChangedEventArgs) -> ()
... indexing happened and completed in a matter of a couple of seconds
Now, this might not solve everyone's problems but I learnt (at least) two things :
The question for Apple to answer is : is the creation of a typealias to a typealias not meant to be allowed and, if it is, can you fix this indexing bug?