manifold: javac crash when combined with Lombok

Running the Manifold and Lombok plugins together causes javac to crash/misbehave when there are compilation warnings/errors.

Both examples below are using these javac arguments:

javac -processorpath /path/to/lombok-1.18.10.jar:/path/to/manifold-util-2019.1.26.jar:/path/to/manifold-2019.1.26.jar "-Xplugin:Manifold no-bootstrap"
  1. javac crashes if the input contains syntax errors.

Given this class as input:

class Test {} }

…javac crashes with this exception in ManifoldJavaFileManager:

An exception has occurred in the compiler (11.0.2). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you.
java.lang.NullPointerException
        at manifold.internal.javac.ManifoldJavaFileManager.list(ManifoldJavaFileManager.java:203)
        at jdk.compiler/com.sun.tools.javac.code.ClassFinder.list(ClassFinder.java:734)
        at jdk.compiler/com.sun.tools.javac.code.ClassFinder.scanModulePaths(ClassFinder.java:597)
        at jdk.compiler/com.sun.tools.javac.code.ClassFinder.fillIn(ClassFinder.java:553)
        at jdk.compiler/com.sun.tools.javac.code.ClassFinder.complete(ClassFinder.java:299)
        at jdk.compiler/com.sun.tools.javac.code.Symbol.complete(Symbol.java:642)
        at jdk.compiler/com.sun.tools.javac.code.ClassFinder.completeOwners(ClassFinder.java:313)
        at jdk.compiler/com.sun.tools.javac.code.ClassFinder.complete(ClassFinder.java:289)
        at jdk.compiler/com.sun.tools.javac.code.Symbol.complete(Symbol.java:642)
        at jdk.compiler/com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1326)
        at jdk.compiler/com.sun.tools.javac.code.Symbol$ClassSymbol.members(Symbol.java:1264)
        at jdk.compiler/com.sun.tools.javac.jvm.ClassReader$AnnotationDeproxy.findAccessMethod(ClassReader.java:2135)
        at jdk.compiler/com.sun.tools.javac.jvm.ClassReader$AnnotationDeproxy.deproxyCompound(ClassReader.java:2126)
        at jdk.compiler/com.sun.tools.javac.jvm.ClassReader$AnnotationDeproxy.deproxyCompoundList(ClassReader.java:2115)
        at jdk.compiler/com.sun.tools.javac.jvm.ClassReader$AnnotationCompleter.run(ClassReader.java:2334)
        at jdk.compiler/com.sun.tools.javac.comp.Annotate.flush(Annotate.java:191)
        at jdk.compiler/com.sun.tools.javac.comp.Annotate.unblockAnnotations(Annotate.java:144)
        at jdk.compiler/com.sun.tools.javac.comp.Annotate.enterDone(Annotate.java:157)
        at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.enterDone(JavaCompiler.java:1741)
        at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.initModules(JavaCompiler.java:1047)
        at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:939)
        at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:311)
        at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:170)
        at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)
        at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)
  1. Compilation warnings are not reported correctly, and -Werror has no effect.

When compiling this class using -Xlint:all -Werror:

class Test {int x = 1/0;}

…it should print the following output:

Test.java:1: warning: [divzero] division by zero
class Test {int x = 1/0;}
                      ^
error: warnings found and -Werror specified
1 error
1 warning

…as well as setting a nonzero exit code, and terminating without producing a .class file.

However, the last 3 lines are absent, the resulting exit code is zero, and the .class is successfully created.

Relevant versions:

  • Windows 10
  • OpenJDK 11.0.2+9
  • Manifold 2019.1.26
  • Lombok 1.18.10

Both plugins work fine on their own, or when used together with ErrorProne, so the problem appears to be specific to this combination.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 20 (15 by maintainers)

Commits related to this issue

Most upvoted comments

Found the core issue. Should have a fix incorporated in the next release within a week.

Yes. I’m hopeful to have this fixed soon. I’ll keep you posted.

Excellent. I’ll dig into this today. I appreciate your cooperation.

Fix available in 2019.1.28

@rsmckinney: Yes, looks like both issues are resolved. Thanks again!

EDIT: My apologies, the crash is fixed, but the misreported warnings are still there. (I checked that x=1/0 broke our build, but it was actually caught by ErrorProne, not -Xlint). I’ve re-raised this as #153.

Fantastic, thanks a lot @rsmckinney !

Fix for this is complete, will be available in next release, probably a couple of days. Thanks again for reporting this!

Ok thanks for the update. This is on the short list, will be fixed soon. Thanks for your patience.