Save a copy of your gradle.properties and then rerun. There are add opens
options in the jvm opts we generate that were not there before

On Wed, Apr 6, 2022 at 3:46 PM Michael Sokolov <[email protected]> wrote:

> OK, this also happens with Oracle's JDK17. Now I'm confused
>
> On Wed, Apr 6, 2022 at 4:28 PM Michael Sokolov <[email protected]> wrote:
> >
> > Hi, locally I failed to run spotlessCheck/spotlessApply on main (10.x)
> > branch. I assume it's because of a JVM difference; here's the error:
> >
> >
> > Step 'google-java-format' found problem in
> > 'lucene/core/src/java/module-info.java':
> > null
> > java.lang.reflect.InvocationTargetException
> >         at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)
> >
> >         [giant gradle stack trace omitted]
> >
> > Caused by: java.lang.IllegalAccessError: class
> > com.google.googlejavaformat.java.JavaInput (in unnamed module
> > @0x1430dc06) cannot access class
> > com.sun.tools.javac.parser.Tokens$TokenKind (in module jdk.compiler)
> > because module jdk.compiler does not export com.sun.tools.javac.parser
> > to unnamed module @0x1430dc06
> >         at
> com.google.googlejavaformat.java.JavaInput.buildToks(JavaInput.java:349)
> >         at
> com.google.googlejavaformat.java.JavaInput.buildToks(JavaInput.java:334)
> >         at
> com.google.googlejavaformat.java.JavaInput.<init>(JavaInput.java:276)
> >         at
> com.google.googlejavaformat.java.Formatter.getFormatReplacements(Formatter.java:280)
> >         at
> com.google.googlejavaformat.java.Formatter.formatSource(Formatter.java:267)
> >         at
> com.google.googlejavaformat.java.Formatter.formatSource(Formatter.java:233)
> >
> > It seems like a no-no for Google to be relying on Sun packages, but IDK
> >
> > I tried changing
> >
> > >  id 'com.diffplug.spotless' version "6.4.2" apply false
> >
> > in build.gradle
> >
> > and
> >
> > > googleJavaFormat('1.15.0')
> >
> > in spotless.gradle
> >
> >  (the newest versions), because why not, but it didn't seem to help.
> >
> > Any idea how to fix? If it's a problem with my JDK, is there a thing I
> > can ask to have changed in that? Re-export the com.sun.tools.javac
> > package I guess?
> >
> > -Mike
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to