Closed koppor closed 1 week ago
Very strange that you're seeing differences on those two Java versions. You might want to check the very latest Gradle plugin version, as I see you're using an older version still that does not contain a recent fix to detect missing method types.
Very strange that you're seeing differences on those two Java versions. You might want to check the very latest Gradle plugin version, as I see you're using an older version still that does not contain a recent fix to detect missing method types.
Hi, JabRef developer here.
Issue persists on trying .\gradlew rewriteRun
with id 'org.openrewrite.rewrite' version '6.20.1'
in build.gradle
.
We just merged a fix for a very similar issue, there affecting static imports of variables, not methods:
Figured that might be interesting to call out here as the fix could be similar.
Reading this issue again I think it's logged against the wrong project. With the changes since it's hard to say if this has been solved or not; If you feel there's anything left to do then let's open an issue against rewrite-testing-frameworks with steps to reproduce, as it looks like StaticImports has been permanently enabled there already: https://github.com/JabRef/jabref/blob/de81430c1472920304c8348207ee2af9ec525822/rewrite.yml#L212
Just for reference:
JAVA_HOME=CC:\Program Files\Eclipse Adoptium\jdk-21.0.5.11-hotspot
JAVA_HOME=C:\Program Files\Eclipse Adoptium\jdk-23.0.1.11-hotspot
I think this is becoming increasingly common: https://github.com/JabRef/jabref/pull/12246#issuecomment-2508840286 https://github.com/JabRef/jabref/pull/12198/commits/f37793967797f786bd329efd1459668f51791873
Sorry to hear; Are there any missing types perhaps that differ between 21 and 21? Useing the Find missing types recipe, and the data table it produces, do you find any missing types in your codebase? If there are any missing types you might want to double-check your dependencies are set up correctly, or whether you're using Lombok, as Lombok leads to missing types.
Any help troubleshooting this would be appreciated, as it's hard for me to find the time with the amount of requests we have coming in.
I encountered this issue with the removed imports now on 21.0.2 temurin on mac openrewrite 6.27.2 and org.openrewrite.recipe:rewrite-recipe-bom:2.22.0"
Sorry to hear; Are there any missing types perhaps that differ between 21 and 21? Useing the Find missing types recipe,
In the Java code exclusively in the JavaDoc commts
/**
- * @implNote Tests inspired by {@link org.jabref.model.database.BibDatabaseContextTest#getFileDirectoriesWithRelativeMetadata}
+ * @implNote Tests inspired by {@link ~~(MemberReference type is missing or malformed)~~>org.jabref.model.database.BibDatabaseContextTest#getFileDirectoriesWithRelativeMetadata}
*/
There are also type issues in build.gradle
, but I assume, they do not harm?
I made a check on my WSL (together with SDKMan). My results:
Version | working |
---|---|
21-tem | no |
21.0.1-tem | no |
21.0.3-tem | no |
21.0.4-tem | no |
21.0.5-tem | no |
22.0.1-tem | yes |
23-tem | yes |
23.0.1-tem | yes |
I do not know why it worked here with JDK21 in August.
Context: https://github.com/JabRef/jabref/blob/f4e87e5ef45bd87c373b17717343a59af7b4e931/rewrite.yml#L208
When using JDK21, everything is fine.
When using JDK17, imports are removed
This import, however, is necessary.
Since JDK17 is eol in 5 years from now, I wanted to report the issue. If someone stumbles over it.