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 DE0BB172DB for ; Wed, 27 May 2015 16:01:27 +0000 (UTC) Received: (qmail 42657 invoked by uid 500); 27 May 2015 16:01:27 -0000 Delivered-To: apmail-groovy-users-archive@groovy.apache.org Received: (qmail 42625 invoked by uid 500); 27 May 2015 16:01:27 -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 42614 invoked by uid 99); 27 May 2015 16:01:27 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 May 2015 16:01:27 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 48DFDC91EF for ; Wed, 27 May 2015 16:01:27 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.312 X-Spam-Level: **** X-Spam-Status: No, score=4.312 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URI_HEX=1.313] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id rP_3pO99_kR3 for ; Wed, 27 May 2015 16:01:15 +0000 (UTC) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0068.outbound.protection.outlook.com [157.56.111.68]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 2FCF34545A for ; Wed, 27 May 2015 16:01:15 +0000 (UTC) Received: from CY1PR05MB1962.namprd05.prod.outlook.com (25.162.216.20) by CY1PR05MB1947.namprd05.prod.outlook.com (25.162.216.17) with Microsoft SMTP Server (TLS) id 15.1.172.22; Wed, 27 May 2015 16:01:03 +0000 Received: from BY2PR05CA058.namprd05.prod.outlook.com (10.141.250.48) by CY1PR05MB1962.namprd05.prod.outlook.com (25.162.216.20) with Microsoft SMTP Server (TLS) id 15.1.172.22; Wed, 27 May 2015 16:01:01 +0000 Received: from BY2FFO11FD032.protection.gbl (2a01:111:f400:7c0c::155) by BY2PR05CA058.outlook.office365.com (2a01:111:e400:2c5f::48) with Microsoft SMTP Server (TLS) id 15.1.172.22 via Frontend Transport; Wed, 27 May 2015 16:01:01 +0000 Authentication-Results: spf=pass (sender IP is 149.173.1.111) smtp.mailfrom=sas.com; groovy.incubator.apache.org; dkim=none (message not signed) header.d=none; Received-SPF: Pass (protection.outlook.com: domain of sas.com designates 149.173.1.111 as permitted sender) receiver=protection.outlook.com; client-ip=149.173.1.111; helo=mercedge05r.na.SAS.com; Received: from mercedge05r.na.SAS.com (149.173.1.111) by BY2FFO11FD032.mail.protection.outlook.com (10.1.14.210) with Microsoft SMTP Server (TLS) id 15.1.172.14 via Frontend Transport; Wed, 27 May 2015 16:01:01 +0000 Received: from mercav03r.na.sas.com (10.19.10.56) by mercedge05r.na.sas.com (10.13.5.8) with Microsoft SMTP Server (TLS) id 15.0.1076.9; Wed, 27 May 2015 12:01:00 -0400 X-TM-IMSS-Message-ID: Received: from [10.48.17.145] ([10.48.17.145]) by mercav03R.na.sas.com ([10.19.10.56]) with ESMTP (TREND IMSS SMTP Service 7.1) id b490882900006be4 ; Wed, 27 May 2015 12:00:59 -0400 Message-ID: <5565EA3B.2040206@sas.com> Date: Wed, 27 May 2015 12:00:59 -0400 From: Steve Amerige User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: "users@groovy.incubator.apache.org" Subject: Changing the default to TypeChecked Content-Type: multipart/alternative; boundary="------------000804000805040505030507" X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD032;1:BkCPIBcwAIikm2pgjZGLazs3sKsAm61as+UQ5N+u6a9ya33jKL2F6R9qA+n8rBnSvLJQKozoim+Q5OXUf2GwNgEiLZZOaDJY5hjxo7Iu8PlI2Iee5m/3fEv8VJu2ZdgsDlLAcKBoZkMwvmNgvZ1NRDvbfBqGmg6VHIYvt1eVcM6cih+TmLAfpttopi4A44Pu5XqN+ttOfvGvO8nopIy34eRl5UJ70kjPZUnuLF4Y8zz6dvrHtTF/UYsSmw5oYPHZI3OHsyeBWimJrwZOuSZD01pm3u2O7Z/UhRD1bnCB4mV+Dcfvw9DYlibOskrJeqNX X-Forefront-Antispam-Report: CIP:149.173.1.111;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(438002)(164054003)(53754006)(199003)(189002)(52034003)(59896002)(50986999)(46102003)(6806004)(92566002)(65816999)(86362001)(54356999)(33656002)(87936001)(64706001)(65806001)(83506001)(87266999)(84326002)(64126003)(65956001)(19580405001)(19580395003)(80316001)(512874002)(4001540100001)(15975445007)(77096005)(4001350100001)(62966003)(16796002)(77156002)(450100001)(229853001)(2351001)(16236675004)(17760045003)(5002050100002)(189998001)(36756003)(110136002)(106466001)(18206015028)(5001860100001)(5001830100001)(19617315012)(2501003)(107886002)(33186001)(19627595001)(72026002);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR05MB1962;H:mercedge05r.na.SAS.com;FPR:;SPF:Pass;PTR:mercedge05r.na.sas.com;A:1;MX:1;LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR05MB1962;UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR05MB1947; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(520003)(5005006)(3002001);SRVR:CY1PR05MB1962;BCL:0;PCL:0;RULEID:;SRVR:CY1PR05MB1962; X-Forefront-PRVS: 05891FB07F X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 May 2015 16:01:01.1423 (UTC) X-MS-Exchange-CrossTenant-Id: b1c14d5c-3625-45b3-a430-9552373a0c2f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=b1c14d5c-3625-45b3-a430-9552373a0c2f;Ip=[149.173.1.111];Helo=[mercedge05r.na.SAS.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR05MB1962 X-OriginatorOrg: sas.com --------------000804000805040505030507 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Hi all, Jochen showed us how to default to CompileStatic in a post a few months ago. A question was raised about about changing the default to TypeChecked for the case where a user doesn't want CompileStatic as a default, but does want TypeChecked as a default. Would it be the same solution as above? That is: *config.groovy* withConfig(configuration) { ast(groovy.transform.TypeChecked) } and then do: groovyc -configscriptsrc/conf/config.groovy src/main/groovy/MyClass.groovy Also, if one were to specify: *config.groovy* withConfig(configuration) { ast(groovy.transform.CompileStatic) } would that also mean that TypeChecked is enabled by default? How is it disabled for a given class or method? Or, would one need to do the following? *config.groovy* withConfig(configuration) { ast(groovy.transform.CompileStatic) ast(groovy.transform.TypeChecked) } In summary, I'm asking: 1. Is adding ast(groovy.transform.TypeChecked) in the config file how to turn on TypeChecked by default? 2. What is the idiom to disable TypeChecked for a given class or method? 3. Does CompileStatic imply TypeChecked (so that if CompileStatic is specified, it is not necessary to specify TypeChecked in a config file)? Thanks, Steve Amerige Principal Software Developer, Fraud and Compliance Solutions Development SAS Institute, 100 SAS Campus Dr, Room U3050, Cary, NC 27513-8617 P.S. By the way, having the ability to set the default for strong type checking and static compilation while at the same time allowing for specific exceptions (via @CompileDynamic, for example) has been very useful in reducing push-back regarding Groovy adoption. Similarly, disallowing @Grab as Cédric suggests is also part of helps enterprises embrace Groovy. I encourage people to promote this and other similar features when encountering resistance! I think there should be an entire section in the documentation that focuses on issues like these that are of interest to large enterprises. --------------000804000805040505030507 Content-Type: multipart/related; boundary="------------040203050904010704030009" --------------040203050904010704030009 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 8bit Hi all,

Jochen showed us how to default to CompileStatic in a post a few months ago.  A question was raised about about changing the default to TypeChecked for the case where a user doesn't want CompileStatic as a default, but does want TypeChecked as a default.  Would it be the same solution as above?  That is:

config.groovy
withConfig(configuration) {
    ast(groovy.transform.TypeChecked)
}
and then do:  groovyc -configscript src/conf/config.groovy src/main/groovy/MyClass.groovy

Also, if one were to specify:

config.groovy
withConfig(configuration) {
    ast(groovy.transform.CompileStatic)
}
would that also mean that TypeChecked is enabled by default?  How is it disabled for a given class or method?  Or, would one need to do the following?

config.groovy
withConfig(configuration) {
    ast(groovy.transform.CompileStatic)
    ast(groovy.transform.TypeChecked)
}
In summary, I'm asking:
  1. Is adding ast(groovy.transform.TypeChecked) in the config file how to turn on TypeChecked by default?
  2. What is the idiom to disable TypeChecked for a given class or method?
  3. Does CompileStatic imply TypeChecked (so that if CompileStatic is specified, it is not necessary to specify TypeChecked in a config file)?
Thanks,
Steve Amerige
Principal Software Developer, Fraud and Compliance Solutions Development
SAS Institute, 100 SAS Campus Dr, Room U3050, Cary, NC 27513-8617




P.S.  By the way, having the ability to set the default for strong type checking and static compilation while at the same time allowing for specific exceptions (via @CompileDynamic, for example) has been very useful in reducing push-back regarding Groovy adoption.  Similarly, disallowing @Grab as Cédric suggests is also part of helps enterprises embrace Groovy. I encourage people to promote this and other similar features when encountering resistance!  I think there should be an entire section in the documentation that focuses on issues like these that are of interest to large enterprises.
--------------040203050904010704030009 Content-Type: image/gif; name="SAS_TPTK_logo.gif" Content-Transfer-Encoding: base64 Content-ID: Content-Disposition: inline; filename="SAS_TPTK_logo.gif" Content-Description: SAS_TPT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E9z69AAHSHAEDBjAungiPQlsRAHAABdfIGbLLIxAAZqiym2kGLeyfOCRpfJQB5/FgVJJ rmsR0ad0gCk2SlXAJ4KkkimqM4I6TmkErbTlAuhmuiYi7UYTHdyNnIEAftj/qCod7ShWIqSe w5XDfVpwyD7HYUCv5S6glRKB7yzDtZd5SiFzVIEBDHCahrWDdBbSn0uIthFDDdUu84jKulBC tW28sgS0M6Zl7nkNmChgZTKqzBsZd6wAPDIiDjEC5W6GjQH8zgIMFAoQHOqEDFTgAAvYAGgG YDpXNXEEdGVqPQ6JiyjOZWi6EeZEDzDAqGpoArk7KOOkWgGycIMBNTMMZh6pt99hAhs9aVZj XiYCtqVNTx0oADA2YBcSBEBqIHWAghhQunkgQLUjEGoueKSBWnhlA/1owAZIOyTDFhNf5NhI Jc0SPG1E5AOUi6LZygpASknqGgnMjAEBMMIUGIBnxE4YQ60eMpwBNOBRgGGBAiTwXd2hzRPf 3eJMprkyCxBAAmBhlgMYSYKojveS4BwAAfolFQkMoFT+vdnNRCDMINGMAOEl8IBJNgA0XYAA oLnDFFYAANA6TKZ12ILOopphF8hFVVIwQHNaAQDstpU0He4wh1McA6PsoAA3wEEe7sRiFq+4 xi/Y1ozbWl0cx+HGPm7BdXcMBQF4Nsg/hheSXzCBCu9YDCBcMheALOUVMMAGMm4rDwAQ5Spv wZ1eDrOYx1yHEAAAOw== --------------040203050904010704030009-- --------------000804000805040505030507--