groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul King (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GROOVY-8953) Imported enum causes compilation bug preventing tests from compiling
Date Thu, 10 Jan 2019 12:50:00 GMT

    [ https://issues.apache.org/jira/browse/GROOVY-8953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16739373#comment-16739373
] 

Paul King commented on GROOVY-8953:
-----------------------------------

If you can create just a dummy test with a dummy enum that exhibits the problem and highlights
which spock versions etc., it should be possible to not have any copyright code and would
allow us to identify the problem more quickly. No one else has reported this particular problem
so perhaps some of the details are specific to your usage.

> Imported enum causes compilation bug preventing tests from compiling
> --------------------------------------------------------------------
>
>                 Key: GROOVY-8953
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8953
>             Project: Groovy
>          Issue Type: Bug
>         Environment: JDK 8
> groovy-all:2.4.+
>            Reporter: Rhys Cox
>            Priority: Blocker
>
> In early December our spock tests were compiling fine, but at the start of this year
they're all breaking with the following error:
> Error:Groovyc: While compiling tests of REDACTED: BUG! exception in phase 'semantic analysis'
in source unit 'REDACTEDSpec.groovy' Constructor parameter annotations length [5] does not
match the parameter length: private REDACTEDENUMCLASS(java.lang.String,int,int,java.lang.String,ANOTHERREDACTEDENUMCLASS,java.lang.String,java.util.regex.Pattern)
>     at org.codehaus.groovy.vmplugin.v5.Java5.getConstructorParameterAnnotations(Java5.java:438)
>     at org.codehaus.groovy.vmplugin.v5.Java5.configureClassNode(Java5.java:386)
>     at org.codehaus.groovy.ast.ClassNode.lazyClassInit(ClassNode.java:280)
>     at org.codehaus.groovy.ast.ClassNode.getDeclaredMethods(ClassNode.java:877)
>     at org.codehaus.groovy.ast.ClassNode.getMethods(ClassNode.java:892)
>     at org.codehaus.groovy.ast.ClassNode.hasPossibleStaticMethod(ClassNode.java:1313)
>     at org.codehaus.groovy.control.StaticImportVisitor.findStaticMethod(StaticImportVisitor.java:597)
>     at org.codehaus.groovy.control.StaticImportVisitor.findStaticPropertyAccessorByFullName(StaticImportVisitor.java:565)
>     at org.codehaus.groovy.control.StaticImportVisitor.findStaticPropertyAccessor(StaticImportVisitor.java:532)
>     at org.codehaus.groovy.control.StaticImportVisitor.findStaticFieldOrPropAccessorImportFromModule(StaticImportVisitor.java:440)
>     at org.codehaus.groovy.control.StaticImportVisitor.transformVariableExpression(StaticImportVisitor.java:198)
>     at org.codehaus.groovy.control.StaticImportVisitor.transform(StaticImportVisitor.java:99)
>     at org.codehaus.groovy.ast.expr.Expression.transformExpressions(Expression.java:51)
>     at org.codehaus.groovy.ast.expr.ArgumentListExpression.transformExpression(ArgumentListExpression.java:69)
>     at org.codehaus.groovy.control.StaticImportVisitor.transform(StaticImportVisitor.java:117)
>     at org.codehaus.groovy.ast.expr.ConstructorCallExpression.transformExpression(ConstructorCallExpression.java:50)
>     at org.codehaus.groovy.control.StaticImportVisitor.transformConstructorCallExpression(StaticImportVisitor.java:339)
>     at org.codehaus.groovy.control.StaticImportVisitor.transform(StaticImportVisitor.java:114)
>     at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitField(ClassCodeExpressionTransformer.java:70)
>     at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1073)
>     at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:53)
>     at org.codehaus.groovy.control.StaticImportVisitor.visitClass(StaticImportVisitor.java:78)
>     at org.codehaus.groovy.control.CompilationUnit$13.call(CompilationUnit.java:692)
>     at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1087)
>     at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:624)
>     at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:602)
>     at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:579)
>     at org.jetbrains.groovy.compiler.rt.GroovyCompilerWrapper.compile(GroovyCompilerWrapper.java:62)
>     at org.jetbrains.groovy.compiler.rt.DependentGroovycRunner.runGroovyc(DependentGroovycRunner.java:118)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:498)
>     at org.jetbrains.groovy.compiler.rt.GroovycRunner.intMain2(GroovycRunner.java:91)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:498)
>     at org.jetbrains.jps.incremental.groovy.InProcessGroovyc.runGroovycInThisProcess(InProcessGroovyc.java:160)
>     at org.jetbrains.jps.incremental.groovy.InProcessGroovyc.lambda$runGroovyc$0(InProcessGroovyc.java:89)
>     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>     at java.lang.Thread.run(Thread.java:748)
> The thing it's complaining about appears to be when using one of our enums in a spock
test.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message