groovy
groovy copied to clipboard
GROOVY-10615: Bump Codenarc to 3.0.1 (build dependency)
@eric-milles When the codenarcMain task is run, there are stack traces like below:
Error from [org.codenarc.rule.naming.ClassNameRule] processing source file [D:/projects/groovyCopy/subprojects/groovy-ant/src/main/groovy/groovy/ant/FileNameFinder.groovy]
groovy.lang.MissingMethodException: No signature of method: org.codenarc.rule.naming.AbstractTypeNameAstVisitor.visitClassEx() is applicable for argument types: (org.codehaus.groovy.ast.ClassNode) values: [groovy.ant.FileNameFinder]
Possible solutions: visitClassEx(org.codehaus.groovy.ast.ClassNode), visitClass(org.codehaus.groovy.ast.ClassNode), visitClass(org.codehaus.groovy.ast.ClassNode)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:72)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:148)
at org.codenarc.rule.naming.AbstractTypeNameAstVisitor.visitClassEx(AbstractTypeNameAstVisitor.groovy:44)
at org.codenarc.rule.AbstractAstVisitor.visitClass(AbstractAstVisitor.java:131)
Does that look like GROOVY-10302 to you? I haven't started to debug as yet. It might also be a classloader issue.
Relevant code is here: https://github.com/CodeNarc/CodeNarc/blob/master/src/main/groovy/org/codenarc/rule/naming/AbstractTypeNameAstVisitor.groovy#L44
AbstractTypeNameAstVisitor
or visitClassEx
should be tagged @CompileStatic
if the intent is to use it across major Groovy versions. The changes to super method indexing in MetaClassImpl
can cause problems for old ScriptBytecodeAdapted.invokeMethodOnSuper
call sites.
Yes, for our use of CodeNarc, the following changes are required: https://github.com/CodeNarc/CodeNarc/pull/707 There might be more rules we don't use that also need a change.
We'll wait for the next release