Problems with JDK 10
java at stefan-marr.de
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/ActivitySpawn.java:167: error: expression not allowed as annotation value
[javac] @Primitive(primitive = "threading:threadSpawn:with:",
The same compiles fine with JDK 8 and 9.
Even worse, just cleaning out ActivitySpawn compiles fine too:
$ rm ./src_gen/som/primitives/ActivitySpawnFactory.java ./build/classes/som/primitives/ActivitySpawn*
$ ant -Dskip.graal=true compile-som
[echo] ant.java.version: 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: com.oracle.truffle.api.nodes.Node.Child,com.oracle.truffle.api.dsl.Cached,com.oracle.truffle.api.CompilerDirectives.CompilationFinal,bd.primitives.Primitive.Container,com.oracle.truffle.api.CompilerDirectives.TruffleBoundary,com.oracle.truffle.api.dsl.GenerateNodeFactory,com.oracle.truffle.api.dsl.Specialization,com.oracle.truffle.api.dsl.NodeChild,com.oracle.truffle.api.dsl.ImportStatic
[javac] warning: No processor claimed any of these annotations: com.oracle.truffle.api.dsl.GeneratedBy,com.oracle.truffle.api.nodes.Node.Child,com.oracle.truffle.api.CompilerDirectives.CompilationFinal
[javac] 2 warnings
Total time: 1 second
Did anyone see anything like this before?
Might this be a javac bug?
School of Computing, University of Kent
More information about the graal-dev