Return-Path: X-Original-To: apmail-groovy-users-archive@minotaur.apache.org Delivered-To: apmail-groovy-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 556A918186 for ; Wed, 28 Oct 2015 23:58:59 +0000 (UTC) Received: (qmail 63074 invoked by uid 500); 28 Oct 2015 23:30:58 -0000 Delivered-To: apmail-groovy-users-archive@groovy.apache.org Received: (qmail 63038 invoked by uid 500); 28 Oct 2015 23:30:58 -0000 Mailing-List: contact users-help@groovy.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@groovy.incubator.apache.org Delivered-To: mailing list users@groovy.incubator.apache.org Received: (qmail 63021 invoked by uid 99); 28 Oct 2015 23:30:58 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Oct 2015 23:30:58 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 6EADBC0F5F for ; Wed, 28 Oct 2015 23:30:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.12 X-Spam-Level: X-Spam-Status: No, score=-0.12 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id Sd4gE253rSxa for ; Wed, 28 Oct 2015 23:30:49 +0000 (UTC) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 5659F20924 for ; Wed, 28 Oct 2015 23:30:49 +0000 (UTC) Received: by wicfv8 with SMTP id fv8so29321961wic.0 for ; Wed, 28 Oct 2015 16:30:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=tNF+TAC/T0esTbIVbFurq6nCF9WKSuSxnisNlEe0zws=; b=iBDebC57QpOWhew/dmeJpUijY4UE2fMu2Zhp4BX1knda0RzzIjb40D8quuY3Mvb1Tf 2UkXs2sRXaBgakQquadC1pNMD8+mgeQKdGGvl6esiYHD/asu9xSVXqPp5jc3keuDs33L WNIXaJvxOhuhHpYxq8F+ACtBHJESAIXQw7KLQ3tUVgPLOrTpgpb2BN+JCGg2CH9LLQ8H XSkGTcyehlUZ6SHoqVTdyjd4J6AoQE3qft37CZmqHctnvi9H1QI+t706de+eyshdRdMv My0DYZM3u8oiS59Lz2fLvfJliGxL9gtoHzlTWmBTDkFKfsKWHE8eEgpEWQ4zyvLdNoRb xcWw== X-Received: by 10.194.78.162 with SMTP id c2mr34584423wjx.112.1446075049031; Wed, 28 Oct 2015 16:30:49 -0700 (PDT) Received: from icidi.local (cpc66935-ayle3-2-0-cust217.15-2.cable.virginm.net. [81.108.68.218]) by smtp.googlemail.com with ESMTPSA id xt1sm51814893wjb.32.2015.10.28.16.30.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Oct 2015 16:30:48 -0700 (PDT) Subject: Re: Internal compiler error when using for loop on a collection. To: users@groovy.incubator.apache.org References: <562FB51B.4060500@gmail.com> <562FC12B.70305@gmail.com> <56314F33.2070209@gmx.net> From: =?UTF-8?Q?Schalk_Cronj=c3=a9?= Message-ID: <56315AA7.2030403@gmail.com> Date: Wed, 28 Oct 2015 23:30:47 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <56314F33.2070209@gmx.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit No. I did not try a newer Groovy as it had to be the version that is bundled with Gradle 2.0. Actually the code is now online https://github.com/ysb33r/groovy-vfs/blob/master/gradle-plugin/src/main/groovy/org/ysb33r/gradle/vfs/internal/UpToDateCheck.groovy#L55 Replace that .each with a for loop and it fails with the below error. On 28/10/2015 22:41, Pascal Schumacher wrote: > Hard to say. Are using compile static? Did you try a newer groovy > version? > > Am 27.10.2015 um 19:23 schrieb Schalk Cronjé: >> To add a note to this. The exception does not occur when using .each >> on the collection. >> >> On 27/10/2015 17:32, Schalk Cronjé wrote: >>> I appreciate this might be hard to provide info on without the lack >>> of source code to look at, but I have not been able to distill this >>> down to a simplified case. I am still working on a piece of new code >>> for Groovy-VFS so have not even pushed it upstream yet. However this >>> compilation error has caught me out. >>> >>> Maybe one of the Groovy Devs might have a clue as to what can cause >>> this kind of error. >>> >>> General error during class generation: Internal compiler error while >>> compiling **/**/UpToDateCheck.groovy >>> Method: MethodNode@1811575933[boolean >>> forUriCollection(org.gradle.api.logging.Logger, >>> org.ysb33r.groovy.dsl.vfs.VFS, >>> org.ysb33r.gradle.vfs.VfsURICollection, java.lang.Object)] >>> Line 35, expecting casting to java.util.Iterator >> java.lang.Object> but operand stack is empty >>> >>> java.lang.ArrayIndexOutOfBoundsException: Internal compiler error >>> while compiling **/**/UpToDateCheck.groovy >>> Method: MethodNode@1811575933[boolean >>> forUriCollection(org.gradle.api.logging.Logger, >>> org.ysb33r.groovy.dsl.vfs.VFS, >>> org.ysb33r.gradle.vfs.VfsURICollection, java.lang.Object)] >>> Line 35, expecting casting to java.util.Iterator >> java.lang.Object> but operand stack is empty >>> at >>> org.codehaus.groovy.classgen.asm.OperandStack.throwExceptionForNoStackElement(OperandStack.java:310) >>> at >>> org.codehaus.groovy.classgen.asm.OperandStack.doConvertAndCast(OperandStack.java:315) >>> at >>> org.codehaus.groovy.classgen.asm.OperandStack.doGroovyCast(OperandStack.java:279) >>> at >>> org.codehaus.groovy.classgen.asm.OperandStack.storeVar(OperandStack.java:629) >>> at >>> org.codehaus.groovy.classgen.asm.CompileStack.defineTemporaryVariable(CompileStack.java:308) >>> at >>> org.codehaus.groovy.classgen.asm.sc.StaticTypesStatementWriter.writeForInLoop(StaticTypesStatementWriter.java:85) >>> >>> It seems to be related to a for-loop over an internal Groovy VFS >>> class that implements the Iterable interface. >>> >>> The version of Groovy would be 2.3.3. >>> >> >> > -- Schalk W. Cronjé Twitter / Ello / Toeter : @ysb33r