From dev-return-5979-archive-asf-public=cust-asf.ponee.io@groovy.apache.org Thu Mar 28 18:13:51 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id C6D79180629 for ; Thu, 28 Mar 2019 19:13:50 +0100 (CET) Received: (qmail 60147 invoked by uid 500); 28 Mar 2019 18:13:49 -0000 Mailing-List: contact dev-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@groovy.apache.org Delivered-To: mailing list dev@groovy.apache.org Received: (qmail 60132 invoked by uid 99); 28 Mar 2019 18:13:48 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Mar 2019 18:13:48 +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 86581C2AF5 for ; Thu, 28 Mar 2019 18:13:48 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.5 X-Spam-Level: X-Spam-Status: No, score=-0.5 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=thomsonreuters.com header.b=mH6r1sqW; dkim=pass (1024-bit key) header.d=trten.onmicrosoft.com header.b=L0bC35xg Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id QiISlKDTB1FH for ; Thu, 28 Mar 2019 18:13:45 +0000 (UTC) Received: from mailout1-trp.thomsonreuters.com (mailout1-trp.thomsonreuters.com [163.231.6.6]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 83AF762465 for ; Thu, 28 Mar 2019 18:06:06 +0000 (UTC) Received: from trpusmneagrly01.int.westgroup.com (relay1 [163.231.22.97]) by mailout1-trp.thomsonreuters.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id x2SI5xOq030772 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 28 Mar 2019 18:05:59 GMT X-DKIM: OpenDKIM Filter v2.4.3 mailout1-trp.thomsonreuters.com x2SI5xOq030772 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=thomsonreuters.com; s=defaultdkim; t=1553796359; bh=Vnr8D2/u395IpyF8KwCx+Yi3r45Hx6mIgRB1Iqa5nVM=; h=From:To:Subject:Date:Message-ID:Content-Type:MIME-Version; b=mH6r1sqW+OHzmO+wfiNJpvWpCvdiiUXyV/LR5uThXR7UG/0vloyeQSPbpdel8oV5o Z33A2GpJCcF7KsTUfDhFLIS8+5U/nRltlsxCrYt2s1iWpMlm59HlLwrYeV7vId2fIh bN7PYr8X1ReZR2OrwzIVuU+eApancVOPikcBE684= Received: from EAGE-ERFPHUB02.ERF.thomson.com ([10.204.103.213]) by trpusmneagrly01.int.westgroup.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id x2SI5wrp021064 for ; Thu, 28 Mar 2019 18:05:58 GMT Received: from C134ZXDXM302.ERF.thomson.com (10.204.96.126) by EAGE-ERFPHUB02.ERF.thomson.com (163.231.23.34) with Microsoft SMTP Server (TLS) id 14.3.389.1; Thu, 28 Mar 2019 13:05:58 -0500 Received: from C008ZCDEFM306.ERF.thomson.com (10.204.200.87) by C134ZXDXM302.ERF.thomson.com (10.204.96.126) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 28 Mar 2019 13:05:57 -0500 Received: from NAM03-DM3-obe.outbound.protection.outlook.com (10.204.52.14) by C008ZCDEFM306.ERF.thomson.com (10.204.200.87) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 28 Mar 2019 13:05:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=TRTEN.onmicrosoft.com; s=selector1-thomsonreuters-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Y+akQeSW43HPwPNmPfQmmvhjCys7KgLGoEwsCOlJ5cE=; b=L0bC35xgyHf+1nnJR3xkxMLYgMkgWFgA3/1GpMVBwAWv6QasxuWqNQfxOQ3IxprGP7aCxRBbhDCVpZwNkHbg3MYXQYK4SYvJHdxNd2h9gzCeNCb7y/YaJpBmtdpaE8oUjwPQCidgMGeXtoy7smwBz55g2VAcOXrb75TzLG+Yoig= Received: from DM5PR03MB3161.namprd03.prod.outlook.com (10.174.190.34) by DM5PR03MB3322.namprd03.prod.outlook.com (10.174.241.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1750.16; Thu, 28 Mar 2019 18:05:56 +0000 Received: from DM5PR03MB3161.namprd03.prod.outlook.com ([fe80::fdd9:1fac:c15f:ba2c]) by DM5PR03MB3161.namprd03.prod.outlook.com ([fe80::fdd9:1fac:c15f:ba2c%3]) with mapi id 15.20.1730.019; Thu, 28 Mar 2019 18:05:56 +0000 From: "Milles, Eric (TR Tech, Content & Ops)" To: "dev@groovy.apache.org" Subject: AST Transformations and joint compilation Thread-Topic: AST Transformations and joint compilation Thread-Index: AQHU5Y9g13gEapaBaUC63yM3QhUFLw== Date: Thu, 28 Mar 2019 18:05:56 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=eric.milles@thomsonreuters.com; x-originating-ip: [198.179.137.223] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c421775a-5621-42b1-45b1-08d6b3a806ab x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020);SRVR:DM5PR03MB3322; x-ms-traffictypediagnostic: DM5PR03MB3322: x-ms-exchange-purlcount: 1 x-microsoft-antispam-prvs: x-forefront-prvs: 0990C54589 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(136003)(396003)(39860400002)(366004)(376002)(346002)(199004)(189003)(26005)(54896002)(105586002)(19627405001)(106356001)(6916009)(1730700003)(81156014)(966005)(486006)(81166006)(33656002)(2351001)(7736002)(102836004)(186003)(476003)(74316002)(6606003)(478600001)(5660300002)(53336002)(2906002)(5640700003)(8676002)(66066001)(99286004)(6116002)(14454004)(97736004)(3846002)(2501003)(55016002)(53936002)(52536014)(6306002)(6506007)(9686003)(86362001)(6436002)(1015004)(7696005)(8936002)(256004)(606006)(71190400001)(316002)(71200400001)(236005)(68736007)(25786009);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR03MB3322;H:DM5PR03MB3161.namprd03.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: thomsonreuters.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: kB+vKNe7PF5t9cGVFQ7uXfYTE0dtPgQpq+0v+/5AwY6gA1j0jHYtfkUL2vWARMKZutqUDkZkZ5F8eQQNErO+zrXiqL0/skZm5sSSzGq738vCfSYIm0XN/mLsg6kEfS9kLqAQTo56TyGsO5XshCVkl1xkcqDaDARikzCF+8QrYAWOSVnyB+BfbAVwXeOuCWNgfpVbCV+Aq/zYQKdwsNmPQv5mhZse+YAOukHjEQLgtaSby0PdF8wwzuOIrGpYblLm9Ob8uQohvBx+glcFyy30OepE3aq5Ujfv3XNnpqwwChEOIhFSzCrXihegEz8MSM9k1f1bUvXBpviOTs5M/zoju6jWdTcSt4D7MdkcJsM0V8U1czJ5mgBCQQ1ns9Jkx+++iyENaTlIqvINcCYjRxvwdNl+MJ/MhG19kBNJQEBkyJE= Content-Type: multipart/alternative; boundary="_000_DM5PR03MB316105130FCAFB77FED63F798A590DM5PR03MB3161namp_" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: c421775a-5621-42b1-45b1-08d6b3a806ab X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Mar 2019 18:05:56.5978 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 62ccb864-6a1a-4b5d-8e1c-397dec1a8258 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR03MB3322 X-OriginatorOrg: thomsonreuters.com X-TM-AS-Product-Ver: SMEX-12.0.0.1727-8.200.1013-24516.004 X-TM-AS-Result: No--8.651500-0.000000-31 X-TM-AS-MatchedID: 143723-106660-701618-700726-139705-860877-700752-704852-7 02358-703712-708855-704496-704611-704425-704195-709253-700038-700017-700104 -701094-709584-700079-705518-703788-188019-702169-701298-704980-706150-7114 32-702067-105700-703782-701177-711031-111600-111604-188119-705718-701827-70 2638-111605-700074-700264-700732-700345-700450-139703-111610-303156-700109- 188057-188092-148004-148007-148020-148036-148051-42003-63-190014 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-CFilter-Loop: Reflected --_000_DM5PR03MB316105130FCAFB77FED63F798A590DM5PR03MB3161namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable This subject has been discussed a few times in the past and I'd like to giv= e it a bump. As I mentioned in one of the bugs linked to https://issues.ap= ache.org/jira/browse/GROOVY-3683, joint compilation is our main use case fo= r Groovy. We have large Java projects and want to introduce Groovy little-= by-little. We don't want to mess with separate source folders and separate= compilation. This is generally possible, but in terms of AST transforms, = we need to be very selective. Introducing any new interfaces or methods vi= a AST xforms is a likely source of joint compilation errors. Some of the bugs mention efforts to replace stub generation with stub-less = joint compilation. Did any such exploration take place? Were there any fr= uitful discoveries or experiments? The specific case I ran into this week is a class that implements the List = interface and all method implementations are provided through @Delegate. class Foo implements Bar, List { @Delegate private List list } When this is joint compiled, the stub has compilation errors: [compile] org.codehaus.groovy.control.MultipleCompilationErrorsException:= startup failed: [compile] Compile error during compilation with javac. [compile] C:\Users\...\Local\Temp\groovy-generated-4358726042782385987-ja= va-source\...Foo.java:10: error: Foo is not abstract and does not override = abstract method subList(int,int) in List I didn't realize the stubs were actually compiled. I thought they were jus= t referenced by javac to understand the types. Is there any hope here for generating better stubs, telling javac not to co= mpile the stubs or to ignore errors, or something else? I had all this wor= king in the IDE and was ready to commit when I ran into the brick wall of g= roovyc/javac handling of Groovy AST transformations again. --_000_DM5PR03MB316105130FCAFB77FED63F798A590DM5PR03MB3161namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

This subject has been discussed a= few times in the past and I'd like to give it a bump.  As I mentioned= in one of the bugs linked to https://issues.apache.org/jira/browse/GROOVY-3683, joint compilation is= our main use case for Groovy.  We have large Java projects and want t= o introduce Groovy little-by-little.  We don't want to mess with separ= ate source folders and separate compilation.  This is generally possible, but in terms of AST transforms, we need to be = very selective.  Introducing any new interfaces or methods via AST xfo= rms is a likely source of joint compilation errors.


Some of the bugs mention efforts to replace stub generation with stub-less = joint compilation.  Did any such exploration take place?  Were th= ere any fruitful discoveries or experiments?


The specific case I ran into this= week is a class that implements the List interface and all method implemen= tations are provided through @Delegate.


class Foo implements Bar, List<= ;Baz> {

  @Delegate private List<= Baz> list

}


When this is joint compiled, the = stub has compilation errors:

  [compile] org.codehaus.groovy.control.MultipleCompilationErrors= Exception: startup failed:

  [compile] Compile error during compilation with javac.

  [compile] C:\Users\...\Local\T= emp\groovy-generated-4358726042782385987-java-source\...Foo.java:10: error: Foo is not abstract and does = not override abstract method subList(int,int) in List


I didn't realize the stubs were actually compiled.  I thought the= y were just referenced by javac to understand the types.


Is there any hope here for generating better stubs, telling javac n= ot to compile the stubs or to ignore errors, or something else?  I had= all this working in the IDE and was ready to commit when I ran into the br= ick wall of groovyc/javac handling of Groovy AST transformations again.

--_000_DM5PR03MB316105130FCAFB77FED63F798A590DM5PR03MB3161namp_--