https://kotlinlang.org logo
Title
p

Partho Paul

06/21/2022, 5:13 AM
Hi everyone, I’m using ktor and dynamodb for my backend project. I’m trying to fetch data from db using the below piece of code:
getDynamoDbClient().use { ddb ->
                return@use ddb.getItem(dbRequest)
            }
Upon running this, I’m getting
java.lang.IncompatibleClassChangeError: Found interface kotlin.time.TimeMark, but class was expected
error. I’m doing it as it’s shown in https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/GetItem.kt. Am I doing anything wrong? Kotlin version: 1.7.0, Ktor version: 2.0.2, aws version: 0.16.0 TIA
👀 2
i

itzik kasovitch

06/21/2022, 5:28 AM
I think it's a breaking change. Saw something similar in kotest when I tried to move to Kotlin 1.7.
p

Partho Paul

06/21/2022, 5:36 AM
@itzik kasovitch Yeah, just saw that issue. Anyway, I’ve created an issue for aws here
👍 1
l

Landry Norris

06/23/2022, 6:08 PM
The release notes for 1.7.0 note that time related classes are now inline classes to improve performance. It is interesting that the error notes it as an interface, however.
a

Alan B

06/24/2022, 4:21 PM
I can’t believe that the time apis are still marked as @ExperimentalTime (since 1.3). This needs to become stable at some point.