bnorm / kotlin-power-assert

Kotlin compiler plugin to enable diagrammed function calls in the Kotlin programming language
Apache License 2.0
581 stars 15 forks source link

support kotlin 1.8.20 #81

Closed christophsturm closed 1 year ago

christophsturm commented 1 year ago

I just bumped my project to kotlin 1.8.20-RC and it seems power assert does not yet work with it. here is the stacktrace:

e: java.lang.NoSuchMethodError: 'org.jetbrains.kotlin.ir.declarations.IrVariable org.jetbrains.kotlin.ir.builders.ExpressionHelpersKt.irTemporary$default(org.jetbrains.kotlin.ir.builders.IrStatementsBuilder, org.jetbrains.kotlin.ir.expressions.IrExpression, java.lang.String, org.jetbrains.kotlin.ir.types.IrType, boolean, int, java.lang.Object)'
        at com.bnorm.power.diagram.IrTemporaryExtractionTransformer.visitExpression(IrTemporaryVariable.kt:42)
        at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitDeclarationReference(IrElementTransformerVoid.kt:178)
        at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitMemberAccess(IrElementTransformerVoid.kt:208)
        at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitFunctionAccess(IrElementTransformerVoid.kt:211)
        at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitConstructorCall(IrElementTransformerVoid.kt:217)
        at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitConstructorCall(IrElementTransformerVoid.kt:218)
        at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitConstructorCall(IrElementTransformerVoid.kt:24)
        at org.jetbrains.kotlin.ir.expressions.IrConstructorCall.accept(IrConstructorCall.kt:27)
        at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:28)
        at org.jetbrains.kotlin.ir.expressions.IrMemberAccessExpression.transformChildren(IrMemberAccessExpression.kt:78)
        at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitExpression(IrElementTransformerVoid.kt:131)
TWiStErRob commented 1 year ago

This is expected, because the latest version is coupled with Kotlin 1.7: https://github.com/bnorm/kotlin-power-assert/releases/tag/v0.12.0

See also https://github.com/bnorm/kotlin-power-assert#compatibility Sadly, in Kotlin compiler plugin world "compatibility" means it works with this version only, unlike other dependencies where there's some level of forward compatibility.

christophsturm commented 1 year ago

This is expected, because the latest version is coupled with Kotlin 1.7: https://github.com/bnorm/kotlin-power-assert/releases/tag/v0.12.0

See also https://github.com/bnorm/kotlin-power-assert#compatibility Sadly, in Kotlin compiler plugin world "compatibility" means it works with this version only, unlike other dependencies where there's some level of forward compatibility.

for me the latest released version works with kotlin 1.8.10 but not with 1.8.20.

bnorm commented 1 year ago

The compatibility table in the README assumes compatibility with unlisted and newer versions of Kotlin. So by listing 1.7.0 | 0.12.0, it can be inferred that newer versions of Kotlin are also supported (minus beta and RC releases). Maybe I should add a + and/or range to the README to make that more clear?

christophsturm commented 1 year ago

@bnorm can you release a version that is compatible to 1.8.2x?

bnorm commented 1 year ago

Just released version 0.13.0!