Problems with JDK 10

Stefan Marr java at
Thu Mar 22 07:29:24 UTC 2018


Are there any know problems with Truffle and JDK 10?
Since Homebrew updated its java cask to JDK 10, I got my builds failing on Travis.
My setup uses the `--release 8` flag, so, I was hoping to avoid any issues.

The javac output, when compiling the whole project is unfortunately less than helpful.
 I can only see “package does not exist”, or "cannot find symbol" errors.)

It looks to me as if the annotation processor is failing to run.

Locally, I have been trying to find out whether any specific single file is not building correctly.
So, I went, compiled everything with Java 9, and then tried compiling some subset with Java 10.

For individual files, nothing seems to be wrong.
However, when I clean out the compilation for all my builtin functions (som.primitives),
I get the following lovely error:

    [javac] /Users/smarr/Projects/SOM/SOMns/src/som/primitives/ error: expression not allowed as annotation value
    [javac]   @Primitive(primitive = "threading:threadSpawn:with:",
    [javac]   ^

The same compiles fine with JDK 8 and 9.

Even worse, just cleaning out ActivitySpawn compiles fine too:

$ rm ./src_gen/som/primitives/ ./build/classes/som/primitives/ActivitySpawn*
$ ant -Dskip.graal=true compile-som
Buildfile: /Users/smarr/Projects/SOM/SOMns/build.xml
     [echo] 9
     [echo]         java.version:     10
     [echo]         is.atLeastJava9:  true

    [javac] Compiling 1 source file to /Users/smarr/Projects/SOM/SOMns/build/classes
    [javac] warning: No processor claimed any of these annotations:,,,bd.primitives.Primitive.Container,,,,,
    [javac] warning: No processor claimed any of these annotations:,,
    [javac] 2 warnings

Total time: 1 second

Did anyone see anything like this before?

Might this be a javac bug?


Stefan Marr
School of Computing, University of Kent

More information about the graal-dev mailing list