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 B7E9E200C30 for ; Tue, 7 Mar 2017 10:30:39 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id B6685160B74; Tue, 7 Mar 2017 09:30:39 +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 DC619160B68 for ; Tue, 7 Mar 2017 10:30:38 +0100 (CET) Received: (qmail 11985 invoked by uid 500); 7 Mar 2017 09:30:38 -0000 Mailing-List: contact dev-help@brooklyn.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.apache.org Delivered-To: mailing list dev@brooklyn.apache.org Received: (qmail 11964 invoked by uid 99); 7 Mar 2017 09:30:37 -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; Tue, 07 Mar 2017 09:30:37 +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 03E84C0C69 for ; Tue, 7 Mar 2017 09:30:37 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.38 X-Spam-Level: ** X-Spam-Status: No, score=2.38 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, 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=cloudsoftcorp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id rzPFlvBoEy_Q for ; Tue, 7 Mar 2017 09:30:34 +0000 (UTC) Received: from mail-oi0-f50.google.com (mail-oi0-f50.google.com [209.85.218.50]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id CF8905F1EE for ; Tue, 7 Mar 2017 09:30:33 +0000 (UTC) Received: by mail-oi0-f50.google.com with SMTP id m124so99076483oig.1 for ; Tue, 07 Mar 2017 01:30:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudsoftcorp.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=lE6qdqnhgKsXizC+eTbLdwCWLGxt5CZkoXMpwrmm78U=; b=PppjhzGwmbfutud9BCwwDzZcN05AhdFYjrlQ/oye0irj8PPVOW7kEhbc7ohViXKkcI PnSxhVp7hdWCav2l/Zm23Z2YC6364/FFfc/lX7JK5RF04X2Eh0vI4Wuez81vV4VvkZvx 43eFlUcW/p1gOI24WxB0uuaMSUGSQxhXPJ0v4= 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=lE6qdqnhgKsXizC+eTbLdwCWLGxt5CZkoXMpwrmm78U=; b=Mji4kPmmr3li26xlJqcuZjsbAv3w5chAYbU7hGsMOmL+5haJlW0l42/sJQDOraCxIV IINJEIQyt2bBCFN79WV6GBvMC6DeO1WwEc8FteQxx6O1NAKKo+/pnjttJ5cK+a65PUjq JbiN+huwS2AUyWcFjPv41mqZUiZ4vao67QNGFfiOYkFl6OIuAH3OzoW/Z9tsuxweMYZf 8UKxG2Ozfob80ayQaNSQ9nq90zGc816LHHbSBqOINmmW0PMRYqSdEV34eBF/lw80Zle/ 0aVylzL48ve309KPX+1tc6oFZTYtn5cCWAJh2b87vfL5c8UngblWtk/RXxnJOCTuJMzw qtTQ== X-Gm-Message-State: AMke39ltA2OGiOtwE1Y5dEEt89eQETmSfVUn8T3vB9vuSQGcTV6zCi38sb1WZIosvk/AG+/XJbIEAfEq2Quw+alzdHiPkmHprdBtyYB4JD8MJaaB9rJZWre/trahobrr3xVlXO9GBFKmPkk+xWzkJg== X-Received: by 10.202.107.207 with SMTP id g198mr9291308oic.126.1488878594732; Tue, 07 Mar 2017 01:23:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.74.63.71 with HTTP; Tue, 7 Mar 2017 01:23:14 -0800 (PST) In-Reply-To: References: <3b40e79d-1ece-2aed-043d-df88dece9853@gmail.com> <5515f25e-111d-6b20-4e2c-a9b0e024fdbb@CloudsoftCorp.com> From: Martin Harris Date: Tue, 7 Mar 2017 09:23:14 +0000 Message-ID: Subject: Re: [PROPOSAL] Remove groovy dependency/support To: dev@brooklyn.apache.org Content-Type: multipart/alternative; boundary=001a11408020c0da3c054a208f58 X-Legal-Virus-Advice: Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by Cloudsoft Corporation Limited in this regard and the recipient should carry out such virus and other checks as it considers appropriate. X-Legal-Confidentiality: This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. Cloudsoft Corporation Limited does not accept responsibility for changes made to this message after it was sent. X-Legal-Company-Info: Cloudsoft Corporation Limited. Registered in Scotland. Number: SC349230. Registered Office: 13 Dryden Place, Edinburgh, EH9 1RP. archived-at: Tue, 07 Mar 2017 09:30:39 -0000 --001a11408020c0da3c054a208f58 Content-Type: text/plain; charset=UTF-8 Would this include the removal of the Groovy console? I'd kinda miss that :-( Cheers M On 7 March 2017 at 09:10, Geoff Macartney wrote: > +1 certainly sounds like a good plan > > On Tue, 7 Mar 2017 at 01:17 Alex Heneveld > > wrote: > > > > > +1 > > > > Minor comments: > > > > > 2. For a "MethodEffector", the effector invocation goes through > > > `GroovyJavaMethods.invokeMethodOnMetaClass`. This calls into groovy > > > code to find the method that matches the given arguments. > > > > Reflections.findMethodMaybe and invokeMethodWithArgs might be drop-in > > replacements > > > > > one can often supply a Groovy closure instance (e.g. as a config key > > value) and > > > have it automatically converted to Predicate/Function/etc > > > > Java 8-isms should let us overhaul this. As a first step in 0.11 for > > good measure we should log.warn if a Closure is being supplied. > > > > --A > > > > > > > > On 06/03/2017 19:01, Aled Sage wrote: > > > Hi all, > > > > > > I propose we deprecate and then remove the remaining groovy code from > > > Brooklyn: deprecate for 0.11.0, and delete a couple of releases later. > > > > > > I think we should treat Groovy like any other JVM-based language that > > > users might want to use: it's the user's responsibility; we present a > > > pure Java API that those languages can call. > > > > > > I'd estimate the first stage (deprecation in 0.11.0) as being just a > > > few hours work. > > > > > > _*Advantages of Deleting this Code*_ > > > > > > * Simplify our code base > > > (with all the usual advantages of understandability, simpler > > > refactoring, etc). > > > * Make support easier > > > (luckily no-one has asked any Groovy questions in years! Do we > > > really want to fix any bugs that Groovy users hit?!) > > > * Make it easier for (Java) developers: > > > o More understandable e.g. the black magic of how "MethodEffector" > > > works. > > > o Easier IDE setup (e.g. don't need to worry about .groovy files, > > > or risk breaking them if you ignore them) > > > * Simplify our build process > > > * Reduce our binary distribution by over 7MB > > > > > > > > > _*Background*_ > > > The most early versions of Brooklyn (before it joined Apache) were > > > written in Groovy. We grew to regret that technology choice, and > > > switched to pure Java instead. We also now strongly recommend users to > > > focus on YAML-based blueprints whereever possible, which makes things > > > like Groovy support even more redundant. > > > > > > > > > _*Current Usage*_ > > > Groovy is (unfortunately) still used under-the-covers in a few places: > > > > > > 1. Groovy's `ObservableList` is used under-the-covers by > > > `LocalEntityManager.entities`. > > > 2. For a "MethodEffector", the effector invocation goes through > > > `GroovyJavaMethods.invokeMethodOnMetaClass`. This calls into groovy > > > code to find the method that matches the given arguments. > > > 3. `GroovyJavaMethods` is used for some groovy'isms (Groovy Truth > > > primarily). > > > > > > Groovy's closures have special support in various places - e.g. some > > > methods are overloaded to accept a Closure instead of a > > > Runnable/Callable/Function/Predicate. Also, the `TypeCoercions` means > > > that one can often supply a Groovy closure instance (e.g. as a config > > > key value) and have it automatically converted to > Predicate/Function/etc. > > > > > > I think our build does special groovy stuff (e.g. there are groovy > > > test classes, which explicitly test the Closure support). > > > > > > > > > _*Next Steps*_ > > > Assuming we agree... > > > > > > For 0.11.0: > > > > > > * Deprecate all methods that take a Groovy parameter type (e.g. > > > Closure, groovy.time.TimeDuration, etc). > > > * Deprecate `GroovyJavaMethods` and the other classes in the > > > `brooklyn-utils-groovy` module. > > > * Include in the release notes that this is deprecated, and Groovy > > > will be removed from Brooklyn in a future release. > > > > > > Subsequently: > > > > > > * Remove internal uses of Groovy, at our leisure. > > > > > > In some future release: > > > > > > * Delete all the deprecated methods and utilities, the groovy > > > dependency, the .groovy test classes, and any other mentions of it > > > from our poms/build. > > > > > > I'd estimate the first stage (for 0.11.0) as being just a few hours > work. > > > > > > Aled > > > > > > > > > > > -- Martin Harris Lead Software Engineer Cloudsoft Corporation Ltd www.cloudsoftcorp.com Mobile: +44 (0)7989 047-855 --001a11408020c0da3c054a208f58--