[
https://issues.apache.org/jira/browse/LUCENE-9650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17255736#comment-17255736
]
Uwe Schindler commented on LUCENE-9650:
---------------------------------------
Hi,
I tried it locally and it worked fine.
Nevertheless we should maybe wait for updates of Gradle and revisit this again.
Gradle itsself no longer works with recent JDK16 at all (for same reasons). But
this was fully expected to me (because it prohibits any access to internal APIs
by default). That's the best change finally in JDK 16: Encapsulate all private
stuff (except Unsafe and a few others).
> Errorprone on master/gradle no longer works with JDK-16
> -------------------------------------------------------
>
> Key: LUCENE-9650
> URL: https://issues.apache.org/jira/browse/LUCENE-9650
> Project: Lucene - Core
> Issue Type: Bug
> Components: general/build
> Affects Versions: master (9.0)
> Reporter: Uwe Schindler
> Priority: Major
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> JDK-16 no longer allows access to internal classes of any module by default.
> It looks like errorprone tries to access some internals from the Java
> compiler. This now fails with Exception. You have to fully open the module or
> pass `--illegal-access=allow`.
> We have 3 options:
> - install an update of errorprone
> - disable error-prone if we detect a runtimeJdk with version >=16
> - run javac as a separate forked task (i think we do already) and pass
> `--illegal-access=allow` or open the internal compile module.
> Error message:
> {noformat}
> > Task :solr:solr-ref-guide:compileJava FAILED
> Exception in thread "main" java.lang.IllegalAccessError: class
> com.google.errorprone.ErrorProneJavacPlugin (in unnamed module @0x887af79)
> cannot access class com.sun.tools.javac.api.BasicJavacTask (in module
> jdk.compiler) because module jdk.compiler does not export
> com.sun.tools.javac.api to unnamed module @0x887af79
> at
> com.google.errorprone.ErrorProneJavacPlugin.init(ErrorProneJavacPlugin.java:38)
> at
> jdk.compiler/com.sun.tools.javac.api.BasicJavacTask.initPlugin(BasicJavacTask.java:254)
> at
> jdk.compiler/com.sun.tools.javac.api.BasicJavacTask.initPlugins(BasicJavacTask.java:228)
> at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:292)
> at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:176)
> at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:64)
> at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:50)
> {noformat}
> Last failed build:
> https://jenkins.thetaphi.de/job/Lucene-Solr-master-Linux/29129/
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]