davidB / scala-maven-plugin

The scala-maven-plugin (previously maven-scala-plugin) is used for compiling/testing/running/documenting scala code in maven.
https://davidb.github.io/scala-maven-plugin/
The Unlicense
560 stars 151 forks source link

Fix incremental compiler not being able to find JDK classes when compiler macros with Java 11, close #502 #608

Closed slandelle closed 2 years ago

slandelle commented 2 years ago

Motivation:

Jigsaw has changed the behavior of ClassLoaders. For some reason, ScalaCompilerLoader with a null parent is able to find JDK classes on Java 8 but not on Java 11.

Modification:

Make the parent the root loader.

Result:

We can compile macros with Java 11.