Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error-prone logFatalError() incompatible with JDK 11 #1091

Closed
mmoayyed opened this issue Aug 15, 2018 · 2 comments
Closed

error-prone logFatalError() incompatible with JDK 11 #1091

mmoayyed opened this issue Aug 15, 2018 · 2 comments

Comments

@mmoayyed
Copy link

What version of Error Prone are you using?

2.3.1 along with the gradle errorprone plugin 0.3, based on JDK 11 such as:

 - unset -v _JAVA_OPTIONS
 - wget https://github.com/sormuras/bach/raw/master/install-jdk.sh
 - source install-jdk.sh -F 11 -L BCL

via Travis CI.

Does this issue reproduce with the latest release?

Assuming that would be 2.3.2-SNAPSHOT, I have restarted a new build to experiment with this snapshot:
https://travis-ci.org/apereo/cas/builds/416457606

I will update this post with the results of the new build.

What did you do?

Pull request to update CAS to use JDK 11:
https://github.com/apereo/cas/pull/3406/files

  • Update the JDK to use version 11
  • Install JDK 11 in Travis CI
  • Switch jacoco to the latest snapshot to handle JDK 11 (WIP)

What did you expect to see?

Error-prone passing successfully, or violations logged correctly.

What did you see instead?

Travis CI build failure:
https://travis-ci.org/apereo/cas/builds/415484147?utm_source=github_status&utm_medium=notification

Looks like logFatalError is invoking a method that in JDK 11 has changed/removed.

> Task :support:cas-server-support-surrogate-authentication-jdbc:compileTestJava FAILED
compiler message file broken: key=compiler.misc.msg.bug arguments=11-ea, {1}, {2}, {3}, {4}, {5}, {6}, {7}
java.lang.NoSuchMethodError: com.sun.tools.javac.util.Log.error(Lcom/sun/tools/javac/util/JCDiagnostic$DiagnosticPosition;Ljava/lang/String;[Ljava/lang/Object;)V
	at com.google.errorprone.ErrorProneError.logFatalError(ErrorProneError.java:55)
	at com.google.errorprone.ErrorProneAnalyzer.finished(ErrorProneAnalyzer.java:155)
	at jdk.compiler/com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:132)
	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1418)
	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1365)
	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:960)
	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104)
	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(JavacTaskImpl.java:147)
	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100)
	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94)
	at org.gradle.api.internal.tasks.compile.AnnotationProcessingCompileTask.call(AnnotationProcessingCompileTask.java:85)
	at org.gradle.api.internal.tasks.compile.ResourceCleaningCompilationTask.call(ResourceCleaningCompilationTask.java:53)
	at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:50)
	at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:36)
	at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegateAndHandleErrors(NormalizingJavaCompiler.java:100)
	at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:52)
	at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:38)
	at org.gradle.api.internal.tasks.compile.AnnotationProcessorDiscoveringCompiler.execute(AnnotationProcessorDiscoveringCompiler.java:49)
	at org.gradle.api.internal.tasks.compile.AnnotationProcessorDiscoveringCompiler.execute(AnnotationProcessorDiscoveringCompiler.java:35)
	at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:40)
	at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:27)
	at org.gradle.api.tasks.compile.JavaCompile.performCompilation(JavaCompile.java:156)
	at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:141)
	at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:113)
	at jdk.internal.reflect.GeneratedMethodAccessor452.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
	at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:50)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.ja
@cushon
Copy link
Collaborator

cushon commented Aug 15, 2018

This should be fixed at head, see #1083.

@mmoayyed
Copy link
Author

Thank you. Head does in fact build fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants