I was looking into enhancing the rewrite-gradle subproject by adding recipes for detecting (and ideally fixing) eager task creation in build scripts. For this I've added this to the RewriteGradleProject.groovy file:
this breaks the groovy parser with the following error message:
Caused by:
org.openrewrite.groovy.GroovyParsingException: Failed to parse at cursor position 9471. The next 10 characters in the original source are ` extends T`
at app//org.openrewrite.groovy.GroovyParserVisitor.visit(GroovyParserVisitor.java:147)
at app//org.openrewrite.groovy.GroovyParser.parseInputs(GroovyParser.java:109)
... 8 more
Caused by:
java.lang.AssertionError
at app//org.openrewrite.java.tree.JavaType$Parameterized.getType(JavaType.java:539)
at app//org.openrewrite.groovy.GroovyTypeMapping.classType(GroovyTypeMapping.java:90)
at app//org.openrewrite.groovy.GroovyTypeMapping.parameterizedType(GroovyTypeMapping.java:142)
at app//org.openrewrite.groovy.GroovyTypeMapping.type(GroovyTypeMapping.java:66)
at app//org.openrewrite.groovy.GroovyTypeMapping.methodType(GroovyTypeMapping.java:254)
at app//org.openrewrite.groovy.GroovyTypeMapping.classType(GroovyTypeMapping.java:114)
at app//org.openrewrite.groovy.GroovyTypeMapping.type(GroovyTypeMapping.java:68)
at app//org.openrewrite.groovy.GroovyParserVisitor$RewriteGroovyClassVisitor.visitClass(GroovyParserVisitor.java:205)
at app//org.openrewrite.groovy.GroovyParserVisitor.convertTopLevelStatement(GroovyParserVisitor.java:1465)
at app//org.openrewrite.groovy.GroovyParserVisitor.visit(GroovyParserVisitor.java:138)
... 9 more
I was looking into enhancing the rewrite-gradle subproject by adding recipes for detecting (and ideally fixing) eager task creation in build scripts. For this I've added this to the
RewriteGradleProject.groovy
file:this breaks the groovy parser with the following error message: