openrewrite / rewrite-kotlin

Work-in-progress implementation of Kotlin language support for OpenRewrite.
Apache License 2.0
43 stars 12 forks source link

AnnotationMatcher doesn`t work in kotlin #466

Closed jeonyeonbin closed 10 months ago

jeonyeonbin commented 10 months ago

Hi, i send bug report in rewrite-kotlin While using AnnotationMatcher, I think I found a bug that doesn't work only in Kotlin.

If you check the JavaType when using Kotlin, It appears as JavaType$Method, and when using java, it appears as JavaType$Class.

in AnnotationMatcher method matchesAnnotationName got false in kotlin. can u help me?

image
timtebeek commented 10 months ago

That seems like a bug indeed; would you be open to creating a draft pull request that adds a test for this recipe here? That way we can run the above in a debugger from the unit test and look at what's needed for a fix.

jeonyeonbin commented 10 months ago

i add sample code in

traceyyoshima commented 10 months ago

Hi @jeonyeonbin, thank you for reporting the issue and providing a test -- we'll fix it shortly :)

jbellenger commented 10 months ago

Hi! Thanks for fixing this! I'm running in to the same issue, do you have an ETA for the next release?

timtebeek commented 10 months ago

Hi @jbellenger ; we typically do a full release train every two weeks or so, with occasional patch releases in between, provided there's no dependencies on upstream changes (which I think there might be just now). Tracey can probably best tell you if and when we can do a release of rewrite-kotlin specifically, and the downstream plugins following that. If you want to try this out in the meantime it's best to use our snapshot versions. Hope that helps!