Post

Replies

Boosts

Views

Activity

Reply to SwiftUI MacOS TableColumn compiler can't type-check expression in reasonable time.
I found this problem as well. My solution is not very elegant, I'm afriad. I had to be very specific about the types. I moved the columns into their own @TableColumnBuilder with all the generics specified:   @TableColumnBuilder<Weather.State.Row, Never>   private var columns: TupleTableColumnContent<     Weather.State.Row, Never, (       TableColumn<Weather.State.Row, Never, Text, Text>,       TableColumn<Weather.State.Row, Never, Text, Text>,       TableColumn<Weather.State.Row, Never, Text, Text>,       TableColumn<Weather.State.Row, Never, Text, Text>,       TableColumn<Weather.State.Row, Never, Text, Text>,       TableColumn<Weather.State.Row, Never, Text, Text>     )   > {     TableColumn("Local Date/Time", value: \.dateTime)     TableColumn("Temperature", value: \.temp)     TableColumn("Apparent Temperature", value: \.apparentTemp)     TableColumn("Dew Point", value: \.dewPoint)     TableColumn("Humidity", value: \.humidity)     TableColumn("Rain", value: \.rain)   } Though this is a lot of ugly specificity, it's the type inference that slowing Swift down here. I was lucky because I don't need a sort comparator (hence the Never above) and all my labels and views are simply Texts. There may be a way to clean this up further with buildPartialBlock
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’22
Reply to SwiftUI MacOS TableColumn compiler can't type-check expression in reasonable time.
I found this problem as well. My solution is not very elegant, I'm afriad. I had to be very specific about the types. I moved the columns into their own @TableColumnBuilder with all the generics specified:   @TableColumnBuilder<Weather.State.Row, Never>   private var columns: TupleTableColumnContent<     Weather.State.Row, Never, (       TableColumn<Weather.State.Row, Never, Text, Text>,       TableColumn<Weather.State.Row, Never, Text, Text>,       TableColumn<Weather.State.Row, Never, Text, Text>,       TableColumn<Weather.State.Row, Never, Text, Text>,       TableColumn<Weather.State.Row, Never, Text, Text>,       TableColumn<Weather.State.Row, Never, Text, Text>     )   > {     TableColumn("Local Date/Time", value: \.dateTime)     TableColumn("Temperature", value: \.temp)     TableColumn("Apparent Temperature", value: \.apparentTemp)     TableColumn("Dew Point", value: \.dewPoint)     TableColumn("Humidity", value: \.humidity)     TableColumn("Rain", value: \.rain)   } Though this is a lot of ugly specificity, it's the type inference that slowing Swift down here. I was lucky because I don't need a sort comparator (hence the Never above) and all my labels and views are simply Texts. There may be a way to clean this up further with buildPartialBlock
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’22
Reply to can't open Xcode 13.2.1 after build my app using Xcode 14 Beta-4
This is an issue in Xcode restoring its previous sessions. I had a similar problem and solved it by holding shift while launching Xcode 13.
Replies
Boosts
Views
Activity
Aug ’22