Skip to content

When Kotlin 2.x is supported? #6621

@flex-gwanbin

Description

@flex-gwanbin

What problem are you trying to solve?

When running OpenRewrite on a project using Kotlin 2.x (K2 compiler), parsing fails with:

org.jetbrains.kotlin.utils.exceptions.KotlinIllegalArgumentExceptionWithAttachments:                                                                                                                                                   
  Unexpected FirClassLikeSymbol null for class ConeClassLikeLookupTagImpl

Current rewrite-kotlin uses kotlin-compiler-embeddable:1.9.25, which cannot parse Kotlin 2.x source code compiled with the K2 compiler.

Describe the solution you'd like

Have you considered any alternatives or workarounds?

Excluding Kotlin files via exclusion("**/*.kt"), but this prevents recipes from being applied to Kotlin sources.

Additional context

Are you interested in contributing this feature to OpenRewrite?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions