drewhamilton / Poko

A Kotlin compiler plugin that generates equals, hashCode, and toString for plain old Kotlin objects in public APIs.
Apache License 2.0
333 stars 11 forks source link

Kotlin 2.1.0 support #403

Open 3flex opened 2 months ago

3flex commented 2 months ago

I'm seeing errors with Kotlin 2.1.0-Beta1:

Caused by: java.lang.NoSuchMethodError: 'org.jetbrains.kotlin.fir.types.ConeKotlinType org.jetbrains.kotlin.fir.types.FirResolvedTypeRef.getType()'
    at dev.drewhamilton.poko.fir.PokoFirExtensionSessionComponent.classId(PokoFirExtensionSessionComponent.kt:39)
    at dev.drewhamilton.poko.fir.PokoFirExtensionSessionComponent.pokoAnnotation(PokoFirExtensionSessionComponent.kt:19)
    at dev.drewhamilton.poko.fir.PokoFirCheckersExtension$PokoFirRegularClassChecker.check(PokoFirCheckersExtension.kt:45)
    at dev.drewhamilton.poko.fir.PokoFirCheckersExtension$PokoFirRegularClassChecker.check(PokoFirCheckersExtension.kt:36)
drewhamilton commented 1 month ago

Easiest way to demonstrate this going forward is to add a variant to the build-sample CI job, as in the first commit of #411. Then we can try to use reflection to make the current version forward-compatible with upcoming betas.

drewhamilton commented 1 month ago

2.1.0-Beta2 is supported in the latest snapshot.

3flex commented 1 month ago

I'm not asking for an alpha release, I know there's effort involved, but just an FYI this is currently not convenient to test in our build (without a fair bit of refactoring) due to the need to add the snapshot repo all over the place in our tests because of https://github.com/drewhamilton/Poko/issues/328, so I can't verify locally.

I was going to revisit that issue to see what's changed in recent Kotlin releases but haven't had the time.

drewhamilton commented 1 month ago

I can do a dot release since it's still compiled with 2.0.21. I'll plan on doing that today.

drewhamilton commented 1 month ago

0.17.2 supports 2.0.0 – 2.1.0-Beta2