kord icon indicating copy to clipboard operation
kord copied to clipboard

Kotlin 1.7 fails with TimeMark error

Open rawilder opened this issue 2 years ago • 5 comments

In the kotlin upgrade to 1.7, TimeMark was changed from a class to an interface.

Here timemark is used as an implementation: https://github.com/kordlib/kord/blob/0.8.x/common/src/main/kotlin/ratelimit/TimeSourceIntervalRateLimiter.kt#L41

My best guess is the compiled versions don't like each other resulting in this error on kotlin 1.7.

Exception in thread "DefaultDispatcher-worker-4" java.lang.IncompatibleClassChangeError: Found interface kotlin.time.TimeMark, but class was expected

rawilder avatar Aug 08 '22 01:08 rawilder

The newest version is on Kotlin 1.7. This should fix this problem.

lukellmann avatar Aug 08 '22 01:08 lukellmann

The newest version is on Kotlin 1.7. This should fix this problem.

Is the newest version (as of 08/08/2022) 0.7.4?

LeadWoods0902 avatar Aug 08 '22 15:08 LeadWoods0902

No, it's 0.8.0-M15, see releases.

lukellmann avatar Aug 08 '22 15:08 lukellmann

Got it working, thank you! I use kord-extensions so I had to go digging for a snapshot version which uses the M15 kord package. After I resolved that

rawilder avatar Aug 09 '22 15:08 rawilder

iirc think the latest kordex snapshot should be fine

lukellmann avatar Aug 09 '22 16:08 lukellmann

Closing this as it has been stale for half a year

DRSchlaubi avatar Mar 31 '23 11:03 DRSchlaubi