tschuchortdev / kotlin-compile-testing

A library for testing Kotlin and Java annotation processors, compiler plugins and code generation
Mozilla Public License 2.0
659 stars 63 forks source link

Java 8 support #214

Closed Jeffset closed 2 years ago

Jeffset commented 2 years ago

When using jdk8, I get the following error:

java.lang.IllegalAccessError: tried to access class com.sun.tools.javac.util.Log$2 from class com.sun.tools.javac.util.Log
    at com.sun.tools.javac.util.Log.getWriter(Log.java:372)
    at com.sun.tools.javac.main.Main.bugMessage(Main.java:588)
    at com.sun.tools.javac.main.Main.compile(Main.java:568)
    at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
    at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
    at com.tschuchort.compiletesting.KotlinCompilation.compileJava(KotlinCompilation.kt:578)
    at com.tschuchort.compiletesting.KotlinCompilation.compile(KotlinCompilation.kt:653)
    [... redacted]

Is there something wrong with my environment or this framework is broken under Java 8?

tschuchortdev commented 2 years ago

The CI pipeline always runs the tests with multiple JDKs, including JDK 8, to make sure that it works with all versions, so I'm inclined to say that it's an issue with your environment. It's weird that the problem seems to arise within javac itself.

tschuchortdev commented 2 years ago

Were you able to figure out the problem?

Jeffset commented 2 years ago

Oh, no, started using jdk11 long ago. I think we can reopen this if anybody else reproduces the issue