groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul King <pa...@asert.com.au>
Subject Re: groovy.text.markup.MarkupTemplateEngine issue since 2.5.3
Date Sat, 30 Mar 2019 04:29:51 GMT
Hi,

It does look vaguely familiar as a regression we are currently looking into
related to "train wreck" style expressions, e.g. "a.b.c.d.e", inside nested
closures.
The workaround might be to simplify your expressions until we get that
fixed. There are a couple of related issues but none exactly match the
symptoms as you describe them.
If you can tease out a reproducer, that would be great as another testcase
as we work on that area. You could just create a separate issue and if we
can merge later, we'll do that.

Cheers, Paul.


On Fri, Mar 29, 2019 at 8:14 PM Arnaud Yahoo <a_mergey@yahoo.fr> wrote:

> Hello,
>
> I am using MarkupTemplateEngine to generate some html pages
>
> Until I used groovy 2.5.2 everything was working but since I upgraded to
> 2.5.6 it start failing with stack trace given above.
>
> It tried with several versions and it start failing with 2.5.3.
>
> I am trying to reproduce this with a simple sample (my generation code
> is quite complex), in the meantime, does this
> "groovy.lang.MissingPropertyException: No such property: implicitThis
> for class: org.codehaus.groovy.ast.expr.StaticMethodCallExpression"means
> something to someone ?
>
> groovy.lang.MissingPropertyException: No such property: implicitThis for
> class: org.codehaus.groovy.ast.expr.StaticMethodCallExpression
>      at
>
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:65)
>      at
>
> org.codehaus.groovy.runtime.callsite.GetEffectivePojoPropertySite.getProperty(GetEffectivePojoPropertySite.java:65)
>      at
>
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:298)
>      at
>
> groovy.text.markup.MarkupTemplateTypeCheckingExtension$_run_closure3.doCall(MarkupTemplateTypeCheckingExtension.groovy:127)
>      at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
>      at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>      at java.lang.reflect.Method.invoke(Method.java:498)
>      at
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101)
>      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
>      at
>
> org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:263)
>      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1041)
>      at groovy.lang.Closure.call(Closure.java:405)
>      at
>
> org.codehaus.groovy.transform.stc.AbstractTypeCheckingExtension.safeCall(AbstractTypeCheckingExtension.java:183)
>      at
>
> org.codehaus.groovy.transform.stc.GroovyTypeCheckingExtensionSupport.handleMissingMethod(GroovyTypeCheckingExtensionSupport.java:357)
>      at
>
> org.codehaus.groovy.transform.stc.DefaultTypeCheckingExtension.handleMissingMethod(DefaultTypeCheckingExtension.java:114)
>      at
>
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitStaticMethodCallExpression(StaticTypeCheckingVisitor.java:2540)
>      at
>
> org.codehaus.groovy.ast.expr.StaticMethodCallExpression.visit(StaticMethodCallExpression.java:43)
>      at
>
> org.codehaus.groovy.ast.CodeVisitorSupport.visitExpressionStatement(CodeVisitorSupport.java:120)
>      at
>
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitExpressionStatement(ClassCodeVisitorSupport.java:197)
>      at
>
> org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
>      at
>
> org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:86)
>      at
>
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:106)
>      at
>
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitBlockStatement(StaticTypeCheckingVisitor.java:3771)
>      at
> org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
>      at
>
> org.codehaus.groovy.ast.CodeVisitorSupport.visitClosureExpression(CodeVisitorSupport.java:225)
>      at
>
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitClosureExpression(StaticTypeCheckingVisitor.java:2322)
>      at
>
> org.codehaus.groovy.ast.expr.ClosureExpression.visit(ClosureExpression.java:46)
>      at
>
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethodCallArguments(StaticTypeCheckingVisitor.java:2632)
>      at
>
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethodCallExpression(StaticTypeCheckingVisitor.java:3466)
>      at
>
> org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethodCallExpression(StaticCompilationVisitor.java:397)
>      at
>
> org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:68)
>      at
>
> org.codehaus.groovy.ast.CodeVisitorSupport.visitExpressionStatement(CodeVisitorSupport.java:120)
>      at
>
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitExpressionStatement(ClassCodeVisitorSupport.java:197)
>      at
>
> org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
>      at
>
> org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:86)
>      at
>
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:106)
>      at
>
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitBlockStatement(StaticTypeCheckingVisitor.java:3771)
>      at
> org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
>      at
>
> org.codehaus.groovy.ast.CodeVisitorSupport.visitClosureExpression(CodeVisitorSupport.java:225)
>      at
>
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitClosureExpression(StaticTypeCheckingVisitor.java:2322)
>      at
>
> org.codehaus.groovy.ast.expr.ClosureExpression.visit(ClosureExpression.java:46)
>      at
>
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethodCallArguments(StaticTypeCheckingVisitor.java:2632)
>      at
>
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethodCallExpression(StaticTypeCheckingVisitor.java:3466)
>      at
>
> org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethodCallExpression(StaticCompilationVisitor.java:397)
>      at
>
> org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:68)
>      at
>
> org.codehaus.groovy.ast.CodeVisitorSupport.visitExpressionStatement(CodeVisitorSupport.java:120)
>      at
>
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitExpressionStatement(ClassCodeVisitorSupport.java:197)
>      at
>
> org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
>      at
>
> org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:86)
>      at
>
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:106)
>      at
>
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitBlockStatement(StaticTypeCheckingVisitor.java:3771)
>      at
> org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
>      at
>
> org.codehaus.groovy.ast.CodeVisitorSupport.visitClosureExpression(CodeVisitorSupport.java:225)
>      at
>
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitClosureExpression(StaticTypeCheckingVisitor.java:2322)
>      at
>
> org.codehaus.groovy.ast.expr.ClosureExpression.visit(ClosureExpression.java:46)
>      at
>
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethodCallArguments(StaticTypeCheckingVisitor.java:2632)
>      at
>
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethodCallExpression(StaticTypeCheckingVisitor.java:3466)
>      at
>
> org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethodCallExpression(StaticCompilationVisitor.java:397)
>      at
>
> org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:68)
>      at
>
> org.codehaus.groovy.ast.CodeVisitorSupport.visitExpressionStatement(CodeVisitorSupport.java:120)
>      at
>
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitExpressionStatement(ClassCodeVisitorSupport.java:197)
>      at
>
> org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
>      at
>
> org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:86)
>      at
>
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:106)
>      at
>
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitBlockStatement(StaticTypeCheckingVisitor.java:3771)
>      at
> org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
>      at
>
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:110)
>      at
>
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:121)
>      at
>
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitConstructorOrMethod(StaticTypeCheckingVisitor.java:2079)
>      at
>
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:132)
>      at
>
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.startMethodInference(StaticTypeCheckingVisitor.java:2453)
>      at
>
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethod(StaticTypeCheckingVisitor.java:2411)
>      at
>
> org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethod(StaticCompilationVisitor.java:224)
>      at
> org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1103)
>      at
>
> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:54)
>      at
>
> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitClass(StaticTypeCheckingVisitor.java:392)
>      at
>
> org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitClass(StaticCompilationVisitor.java:182)
>      at
>
> org.codehaus.groovy.transform.sc.StaticCompileTransformation.visit(StaticCompileTransformation.java:65)
>      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.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite.doInvoke(PlainObjectMetaMethodSite.java:43)
>      at
>
> org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSite.invoke(PojoMetaMethodSite.java:188)
>      at
>
> org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
>      at
>
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:135)
>      at
>
> org.codehaus.groovy.control.customizers.ASTTransformationCustomizer.call(ASTTransformationCustomizer.groovy:292)
>      at
>
> org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1084)
>      at
>
> org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:645)
>      at
>
> org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:623)
>      at
>
> org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:600)
>      at
> groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:390)
>      at groovy.lang.GroovyClassLoader.access$300(GroovyClassLoader.java:89)
>      at groovy.lang.GroovyClassLoader$5.provide(GroovyClassLoader.java:330)
>      at groovy.lang.GroovyClassLoader$5.provide(GroovyClassLoader.java:327)
>      at
>
> org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache.getAndPut(ConcurrentCommonCache.java:147)
>      at
> groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:325)
>      at
> groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:309)
>      at
>
> groovy.text.markup.MarkupTemplateEngine$TemplateGroovyClassLoader.parseClass(MarkupTemplateEngine.java:258)
>      at
>
> groovy.text.markup.MarkupTemplateEngine$MarkupTemplateMaker.<init>(MarkupTemplateEngine.java:231)
>      at
>
> groovy.text.markup.MarkupTemplateEngine.createTypeCheckedModelTemplate(MarkupTemplateEngine.java:180)
>      at groovy.text.markup.BaseTemplate.layout(BaseTemplate.java:415)
>
> Thanks
>
>

Mime
View raw message