Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 69679200D3E for ; Thu, 16 Nov 2017 17:07:33 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 684FE160BE6; Thu, 16 Nov 2017 16:07:33 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 61E00160BE5 for ; Thu, 16 Nov 2017 17:07:32 +0100 (CET) Received: (qmail 31921 invoked by uid 500); 16 Nov 2017 16:07:31 -0000 Mailing-List: contact users-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@groovy.apache.org Delivered-To: mailing list users@groovy.apache.org Received: (qmail 31911 invoked by uid 99); 16 Nov 2017 16:07:31 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Nov 2017 16:07:31 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 953831A10F7 for ; Thu, 16 Nov 2017 16:07:30 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.68 X-Spam-Level: * X-Spam-Status: No, score=1.68 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, HTML_OBFUSCATE_05_10=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id iVYvkzzu2ift for ; Thu, 16 Nov 2017 16:07:28 +0000 (UTC) Received: from mail-qt0-f178.google.com (mail-qt0-f178.google.com [209.85.216.178]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 523D060DBD for ; Thu, 16 Nov 2017 16:07:28 +0000 (UTC) Received: by mail-qt0-f178.google.com with SMTP id v41so43868285qtv.12 for ; Thu, 16 Nov 2017 08:07:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=XscENl65L9ZXDetmXCa6yaIspDsLa0D/zzawoRDzPvg=; b=CfK4pg4rHwzcYTj4HUou28YkRN4JMHRHWiB0TQQkSvSBzURC0O9OWRe1xWZPBl8lLH 21JC23T86iP/sdMhC6/bYkGlmHIU1McMHoYe8CgmZOKR6l/Alngqfb2ocxA7gS/QneP/ 7PJOuXa3d1B6lGJUStuVROzhy3RVXccUGimDsFG/AvF9ddKEREqgM7qbEd9e12Z1D/D/ bto+GdK1d+m7lPjaBh4ig/TbxdmPrIOGXXNGiB/h4T60D28AMC2bOamGHvRNdDtPe7WS 6NtqeWmHkLoDox7YDyfO2Q/puwH4krjAz+gJP0O/Ff4EUqDWVEaCSQA4+A2ZmJ+eC94Y 46CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=XscENl65L9ZXDetmXCa6yaIspDsLa0D/zzawoRDzPvg=; b=Ny86Z3wWXkcbme2rc93GuQlcVY22doMGIswXlL17nsYcLlLc8ejn363fJMwwobGF2Z z+nTHdga/jHhNbVWbTJI9cyV3uPr+6QKxXFWsb/BUSmA6yzlxUnPMS4E6Lto9YNWkHf/ ONgjfuXbTR3rqTPO6jJ/XZBbTZEM/+gkw4rbdpxs0kOcz0BjGh+y8e8hXMl4W8R5uzq4 jcE3fzzjU1TFTTipW80HcpHZhOMwDPsdBhJEXscgrp8T26/oo4VOurQOh35+8vi0R8uZ II2DrGN9sUpZHj0iJ+vkzMo9oKEknPmlBLykn8f85V5tWWXlLI3MIC4zXKzT0lit2TZd uPgg== X-Gm-Message-State: AJaThX7alZBYO5b7gSHMWWKnBcVOv/WS/qU3/fNrg5NF22iAOPKEUZnd vmgMa0BW1PjBZwDaZVeFEgd0tZnlDncEPCssNW8= X-Google-Smtp-Source: AGs4zMb4EHKM541eiQtt1Xjf7Fqpihc5p0WCQv+Bc1FwiaoVSjb5ZVlmDIEbVGalNVzFdcklqajqiCfhut5abOM65iU= X-Received: by 10.233.235.81 with SMTP id b78mr3014558qkg.288.1510848447449; Thu, 16 Nov 2017 08:07:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.200.42.79 with HTTP; Thu, 16 Nov 2017 08:06:46 -0800 (PST) In-Reply-To: References: From: Paolo Di Tommaso Date: Thu, 16 Nov 2017 17:06:46 +0100 Message-ID: Subject: Re: NF build error To: users@groovy.apache.org, Paul King Content-Type: multipart/alternative; boundary="001a114f1966051b2c055e1bd1f6" archived-at: Thu, 16 Nov 2017 16:07:33 -0000 --001a114f1966051b2c055e1bd1f6 Content-Type: text/plain; charset="UTF-8" OK. Thanks! p On Thu, Nov 16, 2017 at 2:16 PM, Paul King wrote: > Actually, I created GROOVY-8382 to cover some new cases and fix the bug > you observed. > > On Thu, Nov 16, 2017 at 9:05 PM, Paul King wrote: > >> Incidentally, here is the reproducer I have been using: >> >> @groovy.transform.CompileStatic >> class Foo { >> List baz = ['foo'] ?: [] // 1 >> def bar() { >> List items = ['foo'] ?: [] // 2 >> } >> static bar2() { >> new Foo().baz = ['foo'] ?: [] // 3 >> } >> } >> >> new Foo().bar() >> >> The applied fix targets 2, doesn't cover 1 and gives the >> ClassCastException for 3. Our test coverage obviously still needs further >> attention. :-( >> >> Cheers, Paul. >> >> >> On Thu, Nov 16, 2017 at 8:59 PM, Paul King wrote: >> >>> Feel free to create one. We can always close it if we end up fixing >>> under another issue number. >>> >>> On Thu, Nov 16, 2017 at 6:51 PM, Paolo Di Tommaso < >>> paolo.ditommaso@gmail.com> wrote: >>> >>>> Let me know if you want I open an issue for this problem. >>>> >>>> >>>> Cheers, >>>> Paolo >>>> >>>> >>>> On Wed, Nov 15, 2017 at 10:19 PM, Paolo Di Tommaso < >>>> paolo.ditommaso@gmail.com> wrote: >>>> >>>>> Apparently the latest 2.4.13 SNAPSHOT introduced a compilation error >>>>> in the Nextflow joint build: >>>>> >>>>> >>>>> startup failed: >>>>> General error during instruction selection: >>>>> org.codehaus.groovy.ast.expr.PropertyExpression cannot be cast to >>>>> org.codehaus.groovy.ast.expr.VariableExpression >>>>> >>>>> java.lang.ClassCastException: org.codehaus.groovy.ast.expr.PropertyExpression >>>>> cannot be cast to org.codehaus.groovy.ast.expr.VariableExpression >>>>> at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor. >>>>> checkForTargetType(StaticTypeCheckingVisitor.java:3455) >>>>> at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor. >>>>> visitTernaryExpression(StaticTypeCheckingVisitor.java:3428) >>>>> at org.codehaus.groovy.ast.expr.TernaryExpression.visit(Ternary >>>>> Expression.java:45) >>>>> at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor. >>>>> visitBinaryExpression(StaticTypeCheckingVisitor.java:585) >>>>> at org.codehaus.groovy.ast.expr.BinaryExpression.visit(BinaryEx >>>>> pression.java:51) >>>>> at org.codehaus.groovy.ast.CodeVisitorSupport.visitExpressionSt >>>>> atement(CodeVisitorSupport.java:71) >>>>> at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitExpress >>>>> ionStatement(ClassCodeVisitorSupport.java:196) >>>>> >>>>> >>>>> More details here >>>>> >>>>> . >>>>> >>>>> >>>>> >>>>> p >>>>> >>>>> >>>>> >>>> >>> >> > --001a114f1966051b2c055e1bd1f6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
OK. Thanks!

p

On Thu, Nov 16, 2017 at 2:16 PM= , Paul King <paulk@asert.com.au> wrote:
Actually, I created GROOVY-8382 to cover so= me new cases and fix the bug you observed.

On T= hu, Nov 16, 2017 at 9:05 PM, Paul King <paulk@asert.com.au>= wrote:
Incidentally, he= re is the reproducer I have been using:

@groovy.transform.Compi= leStatic
class Foo {
=C2=A0 List<String> baz= =3D ['foo'] ?: [] // 1
=C2=A0 def bar() {
=C2= =A0 =C2=A0 List<String> items =3D ['foo'] ?: [] // 2
=C2=A0 }
=C2=A0 static bar2() {
=C2=A0 =C2=A0 new Foo= ().baz =3D ['foo'] ?: [] // 3
=C2=A0 }
}
<= div>
new Foo().bar()

The applied fix targets 2,= doesn't cover 1 and gives the ClassCastException for 3. Our test cover= age obviously still needs further attention. :-(

C= heers, Paul.


=
On Thu, Nov 16, 2017 at 8:59 PM, Paul King <pa= ulk@asert.com.au> wrote:
Feel free to create one. We can always close it if we end up= fixing under another issue number.

On= Thu, Nov 16, 2017 at 6:51 PM, Paolo Di Tommaso <paolo.ditommaso@g= mail.com> wrote:
Let me know if you want I open an issue for this problem.=C2=A0

Cheers,
Paolo

=

On Wed, Nov 15, 2017 at 10:19 PM, Paolo Di Tommaso <<= a href=3D"mailto:paolo.ditommaso@gmail.com" target=3D"_blank">paolo.ditomma= so@gmail.com> wrote:
Apparently the latest 2.4.13 SNAPSHOT introduced a compilation e= rror in the Nextflow joint build:=C2=A0


<= div>=C2=A0startup failed:
<= div>=C2=A0General error during instruct= ion selection: org.codehaus.groovy.ast.expr.PropertyExpression cannot = be cast to org.codehaus.groovy.ast.expr.VariableExpression
=C2=A0
=C2=A0java.lang.ClassCastException: org.codehaus= .groovy.ast.expr.PropertyExpression cannot be cast to org.codehaus.gro= ovy.ast.expr.VariableExpression
=C2=A0 at org.co= dehaus.groovy.transform.stc.StaticTypeCheckingVisitor.checkForTar= getType(StaticTypeCheckingVisitor.java:3455)
=C2=A0 at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitTernaryExpression(StaticTypeCheckingVisitor.java:3428)
=C2=A0 at org.codehaus.groovy.ast.expr.TernaryExpression= .visit(TernaryExpression.java:45)
=C2=A0 at org.= codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitBina= ryExpression(StaticTypeCheckingVisitor.java:585)
=C2=A0= at org.codehaus.groovy.ast.expr.BinaryExpression.visit(BinaryE= xpression.java:51)
at org.codehaus.groovy= .ast.CodeVisitorSupport.visitExpressionStatement(CodeVisitorSuppo= rt.java:71)
=C2= =A0 at org.codehaus.groovy.ast.= ClassCodeVisitorSupport.visitExpressionStatement(ClassCodeVisitor= Support.java:196)


More details here.


p







--001a114f1966051b2c055e1bd1f6--