Closed koppor closed 1 month ago
MWE (still) only with Java 11, because I wanted to keep things going (and not working on backwards compatbility)
When module-info.java
is present, types cannot be determined. Shown by the test case.
Example file:
module demo {
requires org.slf4j;
}
I checked the required JDK (https://github.com/openrewrite/rewrite-gradle-plugin/blob/0029c7afd15730c1679e2006784feec118c7e373/plugin/build.gradle.kts#L72). Since the plugin is build with Java 17, the check is IMHO finished. I put this PR as "ready". -- OK, to solve the issue with module-info.java
is still open (and much more work), this is far beyond my skills.
Current state: Issue at JavaParser. See https://github.com/openrewrite/rewrite/issues/4054#issuecomment-1966527187.
Let's continue to track proper support in
There's also a workaround proposed in
This adds two small test for issue openrewrite/rewrite#4054.
This is just an outline.
It resembles the MWE at https://github.com/koppor/mwe-openrewrite-rewrite-gradle-plugin-issue-261/.
However, here, all
.java
types can be determined. (Independent of a rewrite.yml is used or not)The test fail, because type information in
build.gradle
is missing.This PR is only made to enable discussions of debuggin the issue.