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 5BBD7200C30 for ; Tue, 7 Mar 2017 10:16:07 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 5A3A8160B74; Tue, 7 Mar 2017 09:16:07 +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 804D0160B68 for ; Tue, 7 Mar 2017 10:16:06 +0100 (CET) Received: (qmail 88506 invoked by uid 500); 7 Mar 2017 09:16:05 -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 88489 invoked by uid 99); 7 Mar 2017 09:16:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Mar 2017 09:16:05 +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 C76C0C0E14 for ; Tue, 7 Mar 2017 09:16:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.304 X-Spam-Level: ** X-Spam-Status: No, score=2.304 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_H2=-0.096, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-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 (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 2H2d3UFeMXTf for ; Tue, 7 Mar 2017 09:16:03 +0000 (UTC) Received: from mail-io0-f178.google.com (mail-io0-f178.google.com [209.85.223.178]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 8B7915F479 for ; Tue, 7 Mar 2017 09:16:02 +0000 (UTC) Received: by mail-io0-f178.google.com with SMTP id z13so87367653iof.2 for ; Tue, 07 Mar 2017 01:16:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudsoftcorp.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=DzMUC5IukpexVt70/LhHI5xmx++f9ZjUMwuo15mvllo=; b=cYNgO0Qi/VKASjJXAhWW2NSXX3iktxVblJV/4eirtLgcRF6leEmMHM9LrpKqwDPCwU pI9qAQuIy16zmiZroMKr0hjlZF4ulfiMGAW/tR6aqwNs1xPd0fOOHAG+EiZr3+7XIpOe kKHGwHgpbT52h1i0Uvu7pQWHqYVKrX0hlbr2Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=DzMUC5IukpexVt70/LhHI5xmx++f9ZjUMwuo15mvllo=; b=h3u9mMDVHxBRZ6lRnki8fmxwiIDmH7UvRZ3+ESO00BLbdNByB6bFTmqM1BIz4sCCRr kdesou9VrRfbu6aQAYfIMm+O3yX7ERZYV/TWSaKjiymHo+3OjfgyTeT67IoIFnGiLkRQ LwFyeHZqFm92JM4KcQ+nimWJoyauO5skRYTmtatz56Bs/aOlUYDLizhLIKTdtNkRURWw VAUXTzdJtVZyciF6JILIZ8pvCTa2kDS9TmQiiVbLdU+l8A/xLwX2vMBxYrNdIqOoxcmP 174R9hM7gGcwps8U0EJknRhThXKgq0lwA0JNCWY8CtN8c9yOnelpM1bbK3LSidCrC5FU KOSA== X-Gm-Message-State: AMke39kXuhsLPcKUcE8i4wKlSWa+190diIeXUwGYvKz0Bgol24V2sVNzRjX4HlOinqPI+fc5BztsqU6JWkbAuNxoWXrjpUIaSXUeBkU5vyBV8H2CQ1Pv1JQUiIV3SDpKov88G33EUY7LsmkCx72JfA== X-Received: by 10.107.205.197 with SMTP id d188mr17315744iog.206.1488877854174; Tue, 07 Mar 2017 01:10:54 -0800 (PST) MIME-Version: 1.0 References: <3b40e79d-1ece-2aed-043d-df88dece9853@gmail.com> <5515f25e-111d-6b20-4e2c-a9b0e024fdbb@CloudsoftCorp.com> In-Reply-To: <5515f25e-111d-6b20-4e2c-a9b0e024fdbb@CloudsoftCorp.com> From: Geoff Macartney Date: Tue, 07 Mar 2017 09:10:43 +0000 Message-ID: Subject: Re: [PROPOSAL] Remove groovy dependency/support To: dev@brooklyn.apache.org Content-Type: multipart/alternative; boundary=94eb2c188c0a9cd717054a206367 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:16:07 -0000 --94eb2c188c0a9cd717054a206367 Content-Type: text/plain; charset=UTF-8 +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 > > > > > > --94eb2c188c0a9cd717054a206367--