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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to