Charts
Charts copied to clipboard
Xcode 14 Beta 1: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
- [x] I've read, understood, and done my best to follow the *CONTRIBUTING guidelines.
What did you do?
Attempted to compile our project using Xcode 14 beta 1 while using Charts as a Cocoapod.
What did you expect to happen?
Charts compiled
What happened instead?
/Users/bdoig/Documents/Projects/xxx/Pods/Charts/Source/Charts/Animation/ChartAnimationEasing.swift:340:39: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions internal static let EaseOutBack = { (elapsed: TimeInterval, duration: TimeInterval) -> Double in
I suspect the compiler can not infer the type of EaseOutBack and a specific type is required to be declared.
Charts Environment
Charts 3.6.0 Version 14.0 beta (14A5228q) Swift 5 iOS platform macOS 12.4
This happens under Charts 4.0.3 as well.
As noted this is with Xcode 14.0 beta 1, so Swift 5.7.
If I change ChartAnimationEasing line 340 to a func
it allows it to compile. It seems like a Swift bug -- I don't see why this closure is different from the others in this file.
internal static func EaseOutBack(elapsed: TimeInterval, duration: TimeInterval) -> Double {
same here
It also works for me if I import Charts as a Swift Package instead of a Cocoapod.
The same error occurs if I add Charts as a Cocoapod to a brand new Xcode project, using latest Cocoapods 1.11.3.
I have submitted FB10209675 with the sample project using Cocoapods to Apple.
This is a duplicate of #4835
Same error with Xcode 14 beta 2
Seems to be fixed in Xcode 14 beta 3.
Same error with Xcode 14 beta 3
closed by https://github.com/danielgindi/Charts/releases/tag/v4.1.0