(filed on behalf of Stefan Marr <java@stefan-marr.de>)
Since JDK 10 (also confirmed with OpenJDK 11-ea+5), the code at the URL http://stefan-marr.de/downloads/truffle/javac-anno-error.zip results in:
src/som/primitives/ActivitySpawn.java:22: error: expression not allowed as annotation value
@Primitive(primitive = "threading:threadSpawn:with:",
^
The problem seems to be a somewhat odd parse error, which recognizes the name of a class, which needs to be generated by an annotation processors, as an expression.
This in turn causes javac to skip execution of any annotation processors. Specifically, javac aborts before the first round of annotation processing is started.
Steps to reproduce:
Take code at http://stefan-marr.de/downloads/truffle/javac-anno-error.zip extract and run `ant compile-som`.
It succeeds with JDK 9, but not with any later JDK.
The code is as small and self-contained as I could get it while still producing the error.
It comes with a precompiled library and annotation processor.
However, these are likely not influencing the bug.
The same parse error can be observed without the annotation processor being available. The error goes away if the missing ToArgumentsArrayNodeFactory class is provided manually.
I would expect the behavior to be identical between Java 8 and 9.
Not sure what change would explain this behavior.
Currently, I don’t have a work around, so, this blocks use of Java 10.
Since JDK 10 (also confirmed with OpenJDK 11-ea+5), the code at the URL http://stefan-marr.de/downloads/truffle/javac-anno-error.zip results in:
src/som/primitives/ActivitySpawn.java:22: error: expression not allowed as annotation value
@Primitive(primitive = "threading:threadSpawn:with:",
^
The problem seems to be a somewhat odd parse error, which recognizes the name of a class, which needs to be generated by an annotation processors, as an expression.
This in turn causes javac to skip execution of any annotation processors. Specifically, javac aborts before the first round of annotation processing is started.
Steps to reproduce:
Take code at http://stefan-marr.de/downloads/truffle/javac-anno-error.zip extract and run `ant compile-som`.
It succeeds with JDK 9, but not with any later JDK.
The code is as small and self-contained as I could get it while still producing the error.
It comes with a precompiled library and annotation processor.
However, these are likely not influencing the bug.
The same parse error can be observed without the annotation processor being available. The error goes away if the missing ToArgumentsArrayNodeFactory class is provided manually.
I would expect the behavior to be identical between Java 8 and 9.
Not sure what change would explain this behavior.
Currently, I don’t have a work around, so, this blocks use of Java 10.
- duplicates
-
JDK-8200166 Repeating annotations refering to to-be-generated classes don't work.
-
- Closed
-