google / google/compile-testing

Access to compiler internal APIs will fail starting with JDK 16

Open
#222 9 comments 4 reactions 0 assignees View on GitHub
P3 type=defect
Dominant language
Java
Stars
722
Forks
129
Avg merge
11m
Merged PRs (30d)
4

Description

JDK 16 will [change](https://openjdk.java.net/jeps/396) the default for the `--illegal-access` flag from `permit` to `deny`. This means that, by default, compile-testing tests will fail with messages like this:

```
class com.google.testing.compile.Parser (in unnamed module @0x4114d843) cannot access class
com.sun.tools.javac.api.JavacTool (in module jdk.compiler) because module jdk.compiler does not export
com.sun.tools.javac.api to unnamed module @0x4114d843
```

That can be worked around either by explicitly specifying, on the command line of the JVM running the tests, either `--illegal-access=permit` or `--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED`. We should document that, and perhaps later find a way to make it unnecessary.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.