Apologies if this comes off as a bit of a rant, and TLDR: Compiler hangs or gives an unhelpful error with any level of complexity in SwiftUI - which makes me want to back to IB
Porting a project over to iPhone. Made great progress the first week. However, lately I have been encountering compiler bugs where either the build never finishes, or the build take a really long time and ends with just the error : The compiler is unable to type-check this expression in reasonable time
Sometimes I can get it to go away by playing divide and conquer and finding some small error, but other times with my nested scrollview it just seems unhappy with any level of complexity (and I don't think my views are all that complex compared to lots of other apps out there)
I've read several posts on these forums for things to try and do to fix it but the bottom line is its impacting my ability to produce a working solution in a reasonable amount of time. So considering going back to Interface Builder though it means starting over with some of the code.
If there was another independent way to syntax check my swiftUI code other than line by line myself I'd welcome something like that. The compiler going away and never coming back is very discouraging -- what if I have to make some kind of emergency fix in the future with limited time?
Open for any suggestions.
Xcode : 16.2
yes to splitting up views into smaller chunks. They can be easier to test that way.
I've often pasted non-working code into Copilot and asked "why doesn't this compile?". LLMs are quite good a pointing out errant commas and the like, where a compiler will often give you an entirely logical, but useless error message (unless you write compilers for a living).