Thanks for the explanation, Uwe On Fri, Apr 8, 2022, 11:30 AM Uwe Schindler <[email protected]> wrote:
> The reason for this is a change in Java 16 that disallows to access > packages in modules which are not exported. The compiler internals are not > exported. Originally this was already planned for Java 9 but changed > shortly before release. Instead a warning was printed that a classpath > based application tries to access non-exported packages. It was > controllable by parameter "--illegal-access=....". In Jdk 16 the default > was changed from "warn/permit" to "deny". In Jdk 17 the setting was > completely removed (https://openjdk.java.net/jeps/403). > > So you have to tell java to export the affected packages (each one > separately listed) also to classpath applications (unnamed module). > > Uwe > > Am 8. April 2022 15:07:44 UTC schrieb Michael Sokolov <[email protected] > >: >> >> I guess this is related to the use of Java modules that now hide symbols? >> >> On Fri, Apr 8, 2022 at 3:05 AM Dawid Weiss <[email protected]> wrote: >> >>> >>> >>> Maybe a check like this? >>> https://github.com/apache/lucene/pull/802 >>> >>> On Thu, Apr 7, 2022 at 9:26 PM Dawid Weiss <[email protected]> wrote: >>> >>>> >>>>> Does spotless have an option to fork (like the old ant fork=true), >>>>> >>>> >>>> >>>> I don't know but I don't think so. It's a plain plugin for gradle, with >>>> its own set of dependencies. Gradle plugins are not forked - they run >>>> within the process (much like ant tasks). >>>> >>>> >>>>> Are all gradle spotless users having to do these things? Can they be >>>>> somewhere other than this file? >>>>> >>>> >>>> >>>> I don't think there is any other way. The problem is not even spotless >>>> itself - it's the google formatting code that is a dependency of spotless >>>> that is causing problems here. >>>> >>>> >>>> https://github.com/diffplug/spotless/tree/main/plugin-gradle#google-java-format >>>> https://github.com/diffplug/spotless/issues/834 >>>> >>>> You could run this plugin via methods other than the gradle integration >>>> layer (for example via forked ant). This has drawbacks though - no >>>> incremental inputs, worse reporting, etc. >>>> >>>> Dawid >>>> >>> ------------------------------ >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> -- > Uwe Schindler > Achterdiek 19, 28357 Bremen > https://www.thetaphi.de >
