suzuki-0000 / CountdownLabel

Simple countdown UILabel with morphing animation, and some useful function.
MIT License
995 stars 190 forks source link

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

Open mushthak opened 3 years ago

mushthak commented 3 years ago

Issue

This issue is getting after Xcode 12 update.

The issue is caused by the expression which needed to be break down into sub-expressions

Using release version : 4.0.1

Screen Shot 2020-09-18 at 11 37 03 PM

Buid settings:

Screen Shot 2020-09-18 at 11 37 40 PM

Proposed solution:

Replacing expression:

return c * $0 * $0 * $0 * $0 * $0 + b

with

return c * ($0 * $0 * $0 * $0 * $0) + b

iranjith4 commented 3 years ago

Please merge this. Same thing happening for me too.

RanaHossam commented 3 years ago

Same issue occurred with me too.

iranjith4 commented 3 years ago

@RanaHossam , just to fix this temporarily, you can use @mushthak 's commit in your podfile. Here is how to add the commit in your Pod file.

pod 'CountdownLabel', :git => 'https://github.com/mushthak/CountdownLabel.git', :commit => '800205db7400624568be2711986bda7a66fdfde1'

Ezra-Black commented 3 years ago

@RanaHossam , just to fix this temporarily, you can use @mushthak 's commit in your podfile.

Here is how to add the commit in your Pod file.

pod 'CountdownLabel', :git => 'https://github.com/mushthak/CountdownLabel.git', :commit => '800205db7400624568be2711986bda7a66fdfde1'

This is an amazing tip in general

Isuru-Nanayakkara commented 3 years ago

@RanaHossam , just to fix this temporarily, you can use @mushthak 's commit in your podfile. Here is how to add the commit in your Pod file.

pod 'CountdownLabel', :git => 'https://github.com/mushthak/CountdownLabel.git', :commit => '800205db7400624568be2711986bda7a66fdfde1'

I'm getting this error now. I'm using Xcode 12.2.

Screenshot 2020-12-12 at 12 59 41 PM

hungHatto commented 3 years ago

@RanaHossam , just to fix this temporarily, you can use @mushthak 's commit in your podfile. Here is how to add the commit in your Pod file.

pod 'CountdownLabel', :git => 'https://github.com/mushthak/CountdownLabel.git', :commit => '800205db7400624568be2711986bda7a66fdfde1'

I use Xcode 12.5, it not working.

TorbenI commented 3 years ago

Hey @hungHatto. The LTEasing.swift file from the LTMorphingLabel is up to date and can be used.

https://github.com/lexrus/LTMorphingLabel/blob/master/LTMorphingLabel/LTEasing.swift

public static func easeOutQuint(_ t: Float, _ b: Float, _ c: Float, _ d: Float = 1.0) -> Float { return { (f: Float) in return c * (pow(f, 5) + 1.0) + b }(t / d - 1.0) }

iranjith4 commented 3 years ago

@TorbenI Great idea to use pow function.

@suzuki-0000 I have updated both the functions in LTEasing.swift file which causes the error and added a PR (https://github.com/suzuki-0000/CountdownLabel/pull/59/files).

For a temporary fix till the PR is merged, you guys can use the commit

pod 'CountdownLabel', :git => 'https://github.com/iranjith4/CountdownLabel.git', :commit => '5da1ccb7da5b493821f8217dd07d0191145b0b83'
kimxwan0319 commented 3 years ago

Hi, @iranjith4 I just install yours

pod 'CountdownLabel', :git => 'https://github.com/iranjith4/CountdownLabel.git', :commit => '5da1ccb7da5b493821f8217dd07d0191145b0b83'

but, why the time start from 01:12:00:00 + ⍺ and stop at 01:12:00:00??

iranjith4 commented 3 years ago

@kimxwan0319 My commit have the latest code from the repo. May be some updates in the library causing the issues ?

kimxwan0319 commented 3 years ago

@iranjith4 isn't '5da1ccb7da5b493821f8217dd07d0191145b0b83' your latest commit? I use that from the beginning and I have the problem

iranjith4 commented 3 years ago

@kimxwan0319 The latest commit of mine includes the latest pushes from Library. So for you, it may be breaking because of recent changes in the library itself. I would suggest you to change your code based on the changes in the library.

Elamuruga commented 3 years ago

Hi, @iranjith4 I just install yours

pod 'CountdownLabel', :git => 'https://github.com/iranjith4/CountdownLabel.git', :commit => '5da1ccb7da5b493821f8217dd07d0191145b0b83'

but, why the time start from 01:12:00:00 + ⍺ and stop at 01:12:00:00??

Same issue for me too

iranjith4 commented 3 years ago

@Elamuruga May be because of changes in the library itself?

The latest commit of mine includes the latest pushes from Library. So for you, it may be breaking because of recent changes in the library itself. I would suggest you to change your code based on the changes in the library.

Elamuruga commented 3 years ago

@mushthak @RanaHossam @iranjith4 just to fix this temporarily, you can use commit in your podfile. Here is how to add the commit in your Pod file

pod 'CountdownLabel', :git => 'https://github.com/linkstreet/CountdownLabel.git'