Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build using Xcode 16 beta? #251

Open
gesabo opened this issue Jun 17, 2024 · 2 comments
Open

Can't build using Xcode 16 beta? #251

gesabo opened this issue Jun 17, 2024 · 2 comments

Comments

@gesabo
Copy link

gesabo commented Jun 17, 2024

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

@dickysuryos
Copy link

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

@flbaue
Copy link

flbaue commented Sep 20, 2024

Please merge: #252

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants