Is there a way to check for these missing module exports early and fail
with a more informative message?

On Mon, Jan 24, 2022 at 7:42 AM Alan Woodward <[email protected]> wrote:

> Hey Joel,
>
> The fix for this is to delete the gradle.properties file in the root
> directory and stop any daemons before running gradle check again.  The
> build will regenerate the gradle.properties file with some module exports
> that work around this problem in the formatter.
>
> - A
>
> On 24 Jan 2022, at 13:33, Joel Bernstein <[email protected]> wrote:
>
> Hi.
>
> I'm getting the following gradlew check failure with Java 17 on the lucene
> main branch:
>
> Caused by: java.lang.IllegalAccessError: class
> com.google.googlejavaformat.java.JavaInput (in unnamed module @0x3d6a6107)
> 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 @0x3d6a6107
>         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)
>         ... 142 more
>
> Is there a step I'm missing in the setup process?
>
> Thanks,
> Joel
>
>
>

Reply via email to