Hi,
since Eric recently fixed a pesky @CompileStatic/@TypeChecked Groovy
error I wanted to use a snapshot build to hopefully be able to complete
my switch to Groovy 3.
But when I "gradlew clean dist"-build a groovy-3.0.0-SNAPSHOT.jar and
using that in our project, I get an "Groovyc: Unsupported class file
major version 55" build error.
The groovyjarjarasm\asm\ClassReader.class in the
groovy-3.0.0-SNAPSHOT.jar is mv 49 (i.e. Java 5), but everything in my
system/setup to me looks like it's Java 11 (i.e. mv 55), and it does not
occur when using the Groovy 3.0.7 downloaded from the webpage, so I am
not sure what I am looking at (bug, need to configure
groovy-3.0.0-SNAPSHOT build differently, ...), and therefore how to
debug it.
Cheers,
mg
Groovyc: While compiling [groovymacro]: BUG! exception in phase
'semantic analysis' in source unit
'<removed>\MacroStubShouldNeverBeCalledException.groovy' Unsupported
class file major version 55
at
org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:972)
at
org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:633)
at
org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:582)
at
org.jetbrains.groovy.compiler.rt.GroovyCompilerWrapper.compile(GroovyCompilerWrapper.java:48)
at
org.jetbrains.groovy.compiler.rt.DependentGroovycRunner.runGroovyc(DependentGroovycRunner.java:118)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at
org.jetbrains.groovy.compiler.rt.GroovycRunner.intMain2(GroovycRunner.java:81)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at
org.jetbrains.jps.incremental.groovy.InProcessGroovyc.runGroovycInThisProcess(InProcessGroovyc.java:167)
at
org.jetbrains.jps.incremental.groovy.InProcessGroovyc.lambda$runGroovyc$0(InProcessGroovyc.java:77)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.IllegalArgumentException: Unsupported class file
major version 55
at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:166)
at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:148)
at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:136)
at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:237)
at
org.codehaus.groovy.ast.decompiled.AsmDecompiler.parseClass(AsmDecompiler.java:82)
at
org.codehaus.groovy.control.ClassNodeResolver.findDecompiled(ClassNodeResolver.java:254)
at
org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:192)
at
org.codehaus.groovy.control.ClassNodeResolver.findClassNode(ClassNodeResolver.java:172)
at
org.codehaus.groovy.control.ClassNodeResolver.resolveName(ClassNodeResolver.java:128)
at
org.codehaus.groovy.control.ResolveVisitor.resolveToOuter(ResolveVisitor.java:740)
at
org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:390)
at
org.codehaus.groovy.control.ResolveVisitor.resolveFromDefaultImports(ResolveVisitor.java:518)
at
org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:388)
at
org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:351)
at
org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:335)
at
org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:347)
at
org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:343)
at
org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:1344)
at
org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:217)
at
org.codehaus.groovy.control.CompilationUnit$13.call(CompilationUnit.java:691)
at
org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:968)
... 19 more