Modify

Opened 4 years ago

Closed 4 years ago

#19140 closed defect (fixed)

Failure to compile plugin which worked flawless before

Reported by: stoecker Owned by: team
Priority: normal Milestone:
Component: Plugin Version:
Keywords: Cc: Don-vip, simon04

Description

I have a private plugin which compiled fine before. After the many changes in the build system now it fails in the build process.

compile:
     [echo] compiling sources for xyz.jar ...
    [javac] Compiling 18 source files to xyz/build
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 8
    [javac] xyz/Barefoot.java:1: error: An unhandled exception was thrown by the Error Prone static analysis plugin.
    [javac] package xyz;
    [javac] ^
    [javac]      Please report this at https://github.com/google/error-prone/issues/new and include the following:
    [javac]   
    [javac]      error-prone version: 2.3.5-SNAPSHOT
    [javac]      BugPattern: AutoValueSubclassLeaked
    [javac]      Stack Trace:
    [javac]      java.lang.NoClassDefFoundError: com/google/auto/value/AutoValue
    [javac]     at com.google.errorprone.bugpatterns.AutoValueSubclassLeaked$2.visitClass(AutoValueSubclassLeaked.java:123)
    [javac]     at com.google.errorprone.bugpatterns.AutoValueSubclassLeaked$2.visitClass(AutoValueSubclassLeaked.java:120)
    [javac]     at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:808)
    [javac]     at jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:86)
    [javac]     at jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
    [javac]     at jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:113)
    [javac]     at jdk.compiler/com.sun.source.util.TreeScanner.visitCompilationUnit(TreeScanner.java:144)
    [javac]     at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:591)
    [javac]     at com.google.errorprone.bugpatterns.AutoValueSubclassLeaked.findAutoValueClasses(AutoValueSubclassLeaked.java:119)
    [javac]     at com.google.errorprone.bugpatterns.AutoValueSubclassLeaked.matchCompilationUnit(AutoValueSubclassLeaked.java:63)
    [javac]     at com.google.errorprone.scanner.ErrorProneScanner.processMatchers(ErrorProneScanner.java:451)
    [javac]     at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:557)
    [javac]     at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:152)
    [javac]     at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:591)
    [javac]     at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:56)
    [javac]     at com.google.errorprone.scanner.Scanner.scan(Scanner.java:56)
    [javac]     at com.google.errorprone.scanner.ErrorProneScannerTransformer.apply(ErrorProneScannerTransformer.java:43)
    [javac]     at com.google.errorprone.ErrorProneAnalyzer.finished(ErrorProneAnalyzer.java:152)
    [javac]     at jdk.compiler/com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:132)
    [javac]     at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1418)
    [javac]     at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1365)
    [javac]     at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:960)
    [javac]     at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:311)
    [javac]     at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:170)
    [javac]     at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)
    [javac]     at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)
    [javac]   Caused by: java.lang.ClassNotFoundException: com.google.auto.value.AutoValue
    [javac]     at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
    [javac]     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
    [javac]     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    [javac]     ... 26 more
    [javac] 1 error
    [javac] 1 warning

Actually I don't need any errorprone checks, I only want to compile my plugin as before.

  • Is there a way to fix this error?
  • Is there a way to disable this, so that it compiles without these failing step?

Attachments (0)

Change History (4)

comment:1 by stoecker, 4 years ago

Summary: Failure to complie plugin which worked flawless beforeFailure to compile plugin which worked flawless before

comment:2 by taylor.smock, 4 years ago

There should be a way to disable checks. I've turned off various errorprone checks in gradle, using something like this:

tasks.withType(JavaCompile).configureEach {
  options.errorprone {
    if ((JavaVersion.current().majorVersion as Integer) > 11) {
      check('Finally', CheckSeverity.OFF)
    }
  }
}

I don't know how to do that with a build.xml/ant file.

comment:3 by simon04, 4 years ago

You're using build-common.xml? Have you updated also the 00_core_tools/ directory?

The error prone compiler is not yet resolved via Apache Ivy. Error prone has been added a long time ago and updated in [o34620] for Java 12. AutoValue has been added as a separate JAR in [o35342].

comment:4 by stoecker, 4 years ago

Resolution: fixed
Status: newclosed

Thanks for asking the right questions. Works now. Everything was updated, except the build-common.xml, as it must be modified for the paths and because it's a single file. Did that now and readded the necessary modifications.

Seems new core tools and old build-common.xml didn't like each other.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.