Return-Path: X-Original-To: apmail-aurora-reviews-archive@minotaur.apache.org Delivered-To: apmail-aurora-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 433F2188CB for ; Mon, 30 Nov 2015 16:35:44 +0000 (UTC) Received: (qmail 53543 invoked by uid 500); 30 Nov 2015 16:35:44 -0000 Delivered-To: apmail-aurora-reviews-archive@aurora.apache.org Received: (qmail 53486 invoked by uid 500); 30 Nov 2015 16:35:44 -0000 Mailing-List: contact reviews-help@aurora.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@aurora.apache.org Delivered-To: mailing list reviews@aurora.apache.org Received: (qmail 53466 invoked by uid 99); 30 Nov 2015 16:35:43 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Nov 2015 16:35:43 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 94E701DDC3F; Mon, 30 Nov 2015 16:35:41 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============0902259250689749960==" MIME-Version: 1.0 Subject: Re: Review Request 40786: Replace manual Forwarding* with `@Forward`. From: "Bill Farner" To: "Bill Farner" , "Zameer Manji" Cc: "John Sirois" , "Aurora" Date: Mon, 30 Nov 2015 16:35:41 -0000 Message-ID: <20151130163541.28067.76992@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Bill Farner" X-ReviewGroup: Aurora X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/40786/ X-Sender: "Bill Farner" References: <20151130150540.28067.37195@reviews.apache.org> In-Reply-To: <20151130150540.28067.37195@reviews.apache.org> Reply-To: "Bill Farner" X-ReviewRequest-Repository: aurora --===============0902259250689749960== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/40786/#review108322 ----------------------------------------------------------- Ship it! I have to admit i have a bit of a visceral negative reaction to what appears as additional build complexity. However, this type of annotation processing is well-charted territory. I'm happy to try this out, since we're not coupling ourselves and backing out is easy. - Bill Farner On Nov. 30, 2015, 7:05 a.m., John Sirois wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/40786/ > ----------------------------------------------------------- > > (Updated Nov. 30, 2015, 7:05 a.m.) > > > Review request for Aurora, Bill Farner and Zameer Manji. > > > Repository: aurora > > > Description > ------- > > This is a bit of a straw man. While working on > https://issues.apache.org/jira/browse/AURORA-987 I found the need for > `javapoet` and this project spun off the side. > > See the `@Forward` README here for more info: https://github.com/perkuno/forward > > Although I think the end result is desirable, this change does add a > dependency on a personal project. I fancied up the presentation with a > custom org, but its still a personal project. I'd be happy enough to > move the `@Forward` code over to aurora, but it would require a seperate > gradle module to ensure the annotation processor is compiled ahead of > the main module that would use it. > > So kick the tires and let me know what you think. > > build.gradle | 6 +- > src/main/java/org/apache/aurora/scheduler/storage/ForwardingStore.java | 185 ------------------------------ > src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java | 13 ++- > src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java | 309 -------------------------------------------------- > src/test/java/org/apache/aurora/scheduler/thrift/aop/MockDecoratedThrift.java | 5 +- > 5 files changed, 20 insertions(+), 498 deletions(-) > > > Diffs > ----- > > build.gradle a3ff2b747566a38e5ae07db204d0e75da5d3bfb6 > src/main/java/org/apache/aurora/scheduler/storage/ForwardingStore.java b8bd9185cacc6b113b64a13a1b670fac202c795e > src/main/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorage.java 89dd8aacafaa3a68afb8d4a0f4a7cba14cfef503 > src/test/java/org/apache/aurora/scheduler/thrift/aop/ForwardingThrift.java a6769e62d61b2851db055e98ee254f707a91d208 > src/test/java/org/apache/aurora/scheduler/thrift/aop/MockDecoratedThrift.java 1415f0cacc694aa7cf0d25e836e764a96fbb8ae2 > > Diff: https://reviews.apache.org/r/40786/diff/ > > > Testing > ------- > > Green locally `./build-support/jenkins/build.sh`. > > An example of the generated code: > ```java > @Generated("uno.perk.forward.apt.Processor") > class MockDecoratedThriftForwarder implements AnnotatedAuroraAdmin { > protected final AnnotatedAuroraAdmin annotatedAuroraAdmin; > > MockDecoratedThriftForwarder(AnnotatedAuroraAdmin annotatedAuroraAdmin) { > this.annotatedAuroraAdmin = Objects.requireNonNull(annotatedAuroraAdmin); > } > > @Override > public Response getRoleSummary() throws TException { > return this.annotatedAuroraAdmin.getRoleSummary(); > } > ... > ``` > > > Thanks, > > John Sirois > > --===============0902259250689749960==--