I'm building a form with a button that brings up a modal sheet. I found that if I modify one of the form's @State variables in the dismiss closure of the .sheet, SourceKitService goes nuts. Specifically, it consumes memory without limit - I've seen over 90 GB in activity monitor - and does not terminate once it's in that state even if Xcode will. I've also seen a few zombies named swift hang around.
I don't think (in my case) that the issue is complexity of the form, as it's divided into sections and no section has more than 4 elements; no element has more than three views in it. I can print the content of the var in the dismiss closure and all is copacetic, but even something as benign as thatvar = [] leads to disaster.
My guess is that the type system is stuck in a loop, but all I really know is that by starting to comment things out I finally isolated the chunk that triggers the problem. Watching for processes running away with memory usage in activity monitor was the best tool I had to know if I was on the path to success or not.
I filed feedback demonstrating the problem. If you can isolate the trigger, you might want to do so too. Maybe just in any case file one.