Skip to content

Can't build using Xcode 16 beta?  #251

@gesabo

Description

@gesabo

Not sure if its just me, but I tried to build 2 of my apps using this lib in Xcode 16 beta and they both fail because of

The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions

extension CTMultiDataSetProtocol where Self.DataSet.DataPoint: CTStandardDataPointProtocol {
    public func maxValue() -> Double {
        self.dataSets.compactMap {
            $0.dataPoints
                .map(\.value)
                .max()
        }
        .max() ?? 0
    }
    public func minValue() -> Double {
        self.dataSets.compactMap {
            $0.dataPoints
                .map(\.value)
                .min()
        }
        .min() ?? 0
    }
    public func average() -> Double {
        
        self.dataSets
            .compactMap {
                $0.dataPoints
                    .map(\.value)
                    .reduce(0, +)
                    .divide(by: Double($0.dataPoints.count))
            }
            .reduce(0, +)
            .divide(by: Double(self.dataSets.count))
    }
}

on this line:

self.dataSets

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions