-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kotlin parser failures on project without Kotlin sources #658
Comments
@Bananeweizen Thanks for the report. This is really odd. The Kotlin parser should only be trying to parse Kotlin ( |
I haven't been able to debug, but after reading the code I would conclude that the maven plugin always invokes both Java and Kotlin parser, even if it has zero matching files of the respective language. There is no conditional code before or after rewrite-maven-plugin/src/main/java/org/openrewrite/maven/MavenMojoProjectParser.java Lines 330 to 332 in 18501f9
|
With empty lists of main or test, Java or Kotlin files avoid invoking the parsers completely. That's more performant and avoids any bad side effects during initialization of the parsers. Fixes openrewrite#658.
With empty lists of main or test, Java or Kotlin files avoid invoking the parsers completely. That's more performant and avoids any bad side effects during initialization of the parsers. Fixes #658.
The Maven plugin tries to run the Kotlin parser, and that fails. The project does not contain Kotlin sources, and there is no Kotlin tooling installed. I'm not sure if this is a Maven plugin issue or one for the project maintaining the Kotlin parser.
What version of OpenRewrite are you using?
I am using
How are you running OpenRewrite?
I have quite some dependencies configured, because I'd like to use a lot of receipes. However, the issue occurs even with a single trivial Java recipe as the active recipe
What is the full stack trace of any errors you encountered?
There are some things to note here:
I have no idea why OpenRewrite tries to use its Kotlin parser at all here.
Are you interested in contributing a fix to OpenRewrite?
Since I have no idea what's going on, I'm not sure that's possible.
The text was updated successfully, but these errors were encountered: