Another javac issue

Christian Humer christian.humer at gmail.com
Wed Apr 4 06:48:13 UTC 2018


Hi Stefan,

We haven't seen this yet as far as I know. You get some deprecation
warnings when compiling truffle, that you shouldn't get. Is your truffle
version patched?

Did you try to remove the suppresswarnings that cause the problem?
Otherwise, try to isolate the bug and report it to the javac guys.

- Christian Humer


Stefan Marr <java at stefan-marr.de> schrieb am Mi., 4. Apr. 2018, 00:57:

> Hi:
>
> Trying to update Truffle, I am running into the next javac issue.
> There might be two different things in Java 8 and Java 10:
>
> Java8: (see https://travis-ci.org/smarr/SOMns/jobs/361013742#L681)
>
> ```
> java.lang.AssertionError: annotation tree hasn't been attributed yet:
> @SuppressWarnings("deprecation")
>         at com.sun.tools.javac.util.Assert.error(Assert.java:133)
>         at com.sun.tools.javac.util.Assert.checkNonNull(Assert.java:118)
>         at
> com.sun.tools.javac.comp.Check.validateTypeAnnotation(Check.java:2745)
>         at
> com.sun.tools.javac.comp.Attr$TypeAnnotationsValidator.visitAnnotation(Attr.java:4484)
>         at
> com.sun.tools.javac.tree.JCTree$JCAnnotation.accept(JCTree.java:2317)
>         at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
>         at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:57)
>         at
> com.sun.tools.javac.tree.TreeScanner.visitModifiers(TreeScanner.java:315)
>         at
> com.sun.tools.javac.tree.JCTree$JCModifiers.accept(JCTree.java:2343)
>         at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
>         at
> com.sun.tools.javac.comp.Attr$TypeAnnotationsValidator.visitClassDef(Attr.java:4566)
>         at
> com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:693)
>         at
> com.sun.tools.javac.comp.Attr.validateTypeAnnotations(Attr.java:4473)
>         at
> com.sun.tools.javac.code.TypeAnnotations$2.run(TypeAnnotations.java:142)
>         at com.sun.tools.javac.comp.Annotate.flush(Annotate.java:155)
>         at com.sun.tools.javac.comp.Annotate.enterDone(Annotate.java:129)
>         at com.sun.tools.javac.comp.Enter.complete(Enter.java:512)
>         at com.sun.tools.javac.comp.Enter.main(Enter.java:471)
>         at
> com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:982)
>         at
> com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:857)
> ```
>
> and Java 10: (see https://travis-ci.org/smarr/SOMns/jobs/361013746#L4888)
>
> java.lang.NullPointerException
>         at jdk.compiler/com.sun.tools.javac.jvm.Code.width(Code.java:280)
>         at
> jdk.compiler/com.sun.tools.javac.jvm.ClassReader.initParameterNames(ClassReader.java:2449)
>         at
> jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readMethod(ClassReader.java:2398)
>         at
> jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readClass(ClassReader.java:2654)
>         at
> jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readClassBuffer(ClassReader.java:2718)
>         at
> jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readClassFile(ClassReader.java:2731)
>         at
> jdk.compiler/com.sun.tools.javac.code.ClassFinder.fillIn(ClassFinder.java:352)
>         at
> jdk.compiler/com.sun.tools.javac.code.ClassFinder.complete(ClassFinder.java:284)
>         at
> jdk.compiler/com.sun.tools.javac.code.Symbol.complete(Symbol.java:633)
>         at
> jdk.compiler/com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1308)
>         at
> jdk.compiler/com.sun.tools.javac.code.Symbol$ClassSymbol.flags(Symbol.java:1242)
>         at
> jdk.compiler/com.sun.tools.javac.comp.Resolve.isAccessible(Resolve.java:410)
>         at
> jdk.compiler/com.sun.tools.javac.comp.Resolve.isAccessible(Resolve.java:394)
>         at
> jdk.compiler/com.sun.tools.javac.comp.Resolve.findImmediateMemberType(Resolve.java:2167)
>
>
> Has anyone seen these issues before?
>
> I am trying to update SOMns’ Truffle to a version where I don’t need to
> make changes in SOMns.
> However, the same happens on later versions of Truffle, too.
>
> For completeness, the relevant SOMns branch:
> https://github.com/smarr/SOMns/tree/update-truffle-no-changes-needed
>
> The only work around currently seems to be to use ECJ instead of javac.
>
> Any ideas what the problem could be?
>
> [I am not using any custom annotation processors, beside the normal
> Truffle ones.]
>
> Thanks
> Stefan
>
> --
> Stefan Marr
> School of Computing, University of Kent
> http://stefan-marr.de/research/
>
>
>


More information about the graal-dev mailing list