question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JDK 17-EA failure

See original GitHub issue

Description of the problem / feature request:

Exception when using 2.7.1 with JDK 17-ea in github actions

Feature requests: what underlying problem are you trying to solve with this feature?

exception in errorprone run

Bugs: what’s the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Compile using github actions, ubuntu-20.04, dist: adopt

What version of Error Prone are you using?

2.7.1

Have you found anything relevant by searching the web?

Similar issue with Gradle and https://github.com/google/error-prone/issues/2400

Same build passes on JDK 15 and 16. Error-Prone is using an older version of java-setup

Please report this at https://github.com/google/error-prone/issues/new and include the following:
  
     error-prone version: 2.7.1
     BugPattern: JavaLangClash
     Stack Trace:
     java.lang.LinkageError: com.sun.tools.javac.code.Scope.anyMatch(java.util.function.Predicate)
  	at com.google.errorprone.util.ErrorProneScope.getMethodOrDie(ErrorProneScope.java:123)
  	at com.google.errorprone.util.ErrorProneScope.getImpl(ErrorProneScope.java:86)
  	at com.google.errorprone.util.ErrorProneScope.<clinit>(ErrorProneScope.java:68)
  	at com.google.errorprone.util.ASTHelpers.scope(ASTHelpers.java:2180)
  	at com.google.errorprone.bugpatterns.JavaLangClash.check(JavaLangClash.java:66)
  	at com.google.errorprone.bugpatterns.JavaLangClash.matchClass(JavaLangClash.java:53)
  	at com.google.errorprone.scanner.ErrorProneScanner.processMatchers(ErrorProneScanner.java:450)
  	at com.google.errorprone.scanner.ErrorProneScanner.visitClass(ErrorProneScanner.java:548)
  	at com.google.errorprone.scanner.ErrorProneScanner.visitClass(ErrorProneScanner.java:151)
  	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:832)
  	at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:86)
  	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:74)
  	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:48)
  	at jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:109)
  	at jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:117)
  	at jdk.compiler/com.sun.source.util.TreeScanner.visitCompilationUnit(TreeScanner.java:148)
  	at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:561)
  	at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:151)
  	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:603)
  	at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:60)
  	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:58)
  	at com.google.errorprone.scanner.ErrorProneScannerTransformer.apply(ErrorProneScannerTransformer.java:43)
  	at com.google.errorprone.ErrorProneAnalyzer.finished(ErrorProneAnalyzer.java:152)
  	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:1421)
  	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1368)
  	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:960)
  	at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:317)
  	at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:176)
  	at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:64)
  	at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:50)
  Caused by: java.lang.NoSuchMethodException: com.sun.tools.javac.code.Scope.anyMatch(java.util.function.Predicate)
  	at java.base/java.lang.Class.getMethod(Class.java:2195)
  	at com.google.errorprone.util.ErrorProneScope.getMethodOrDie(ErrorProneScope.java:121)
  	... 30 more

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
codylerumcommented, Jul 13, 2021

@cushon Adopt has fixed their side and now everything is building correctly

1reaction
codylerumcommented, Jul 11, 2021

@cushon Thanks I’m following up with the setup-java action project as others are going to run into this same thing as they start to test 17 in CI.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hidden gems in Java 16 and Java 17, from Stream.mapMulti ...
And, yes: I know it's strange to describe deprecations and removals as “gems.” However, those are parts of Java that have outlived their ......
Read more >
[JDK-8262511] A simple testing method is causing a fatal error
A fatal error has been detected by the Java Runtime Environment: ... Create a java file ... and is fixed in JDK 17ea....
Read more >
What does the term "EA" mean in "openJDK 17-ea"?
I am using Debian and I installed standard OS package of Java 17 as "openjdk 17-ea 2021-09-14". I found that in [1] such...
Read more >
JDK-8262134 compiler/uncommontrap/TestDeoptOOM.java ... - Bug ID
JDK -8278758 - runtime/BootstrapMethod/BSMCalledTwice.java fails with release VMs ... findProviders(Ljava/util/Locale;Z)Ljava/util/List;+68 java.base@17-ea j ...
Read more >
KaptJavaLog fails on Java 17 due to removed constructor in ...
KaptJavaLog fails on Java 17 due to removed constructor in ... KT-47784 Kapt: IllegalAccessError with Gradle 7.2 (snapshot) and JDK 17 (ea).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found