Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C91F5DBCE for ; Wed, 5 Dec 2012 16:23:21 +0000 (UTC) Received: (qmail 8101 invoked by uid 500); 5 Dec 2012 15:49:43 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 7739 invoked by uid 500); 5 Dec 2012 15:49:30 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 7676 invoked by uid 99); 5 Dec 2012 15:49:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Dec 2012 15:49:28 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gudnabrsam@gmail.com designates 209.85.212.52 as permitted sender) Received: from [209.85.212.52] (HELO mail-vb0-f52.google.com) (209.85.212.52) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Dec 2012 15:49:16 +0000 Received: by mail-vb0-f52.google.com with SMTP id ez10so1892834vbb.39 for ; Wed, 05 Dec 2012 07:48:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=Y9Kh/wUlhgFVpEEeYjhTMoOh4wdQyEGFWjmL+5HE7H4=; b=jZ7V9mlvfRax1A9rhiEUXx5+5dSpeMtaF0WIFGsVKWzGANaRVzeuXFrfA9OjV0Re/L zjX3tmJVzVpISB3uD4KTTHr/ZOIIrCg+Rt6pMhbNUpK1Ik5BtE7hfWGfU418qc8drTCO 6638eUiHUhT3iHvrRME/NZYZvTYmlpM5ZcZQItDXhc/JGBrfD3MdL/uOb/qCTjB+/IPF qvp8EuzVo6W4Qb8P5Vpwa3XDFg6rH6kabpEvYPqYOdJ0/XVfJu+xb6LK9IhC0PQhpd0S d+VQaQc9rbJXR49j0gDPICiayyePslrtea08PANHUwlBiYzgMJyR1W01gF0wsOrzHYc8 VPDA== MIME-Version: 1.0 Received: by 10.52.89.235 with SMTP id br11mr13553770vdb.77.1354722535738; Wed, 05 Dec 2012 07:48:55 -0800 (PST) Received: by 10.58.28.135 with HTTP; Wed, 5 Dec 2012 07:48:55 -0800 (PST) Reply-To: gudnabrsam@gmail.com In-Reply-To: <50BF1F13.6090709@free.fr> References: <50BF1F13.6090709@free.fr> Date: Wed, 5 Dec 2012 09:48:55 -0600 Message-ID: Subject: Re: [weaver]/[bcel] WAS [privilizer] promotion plan From: Matt Benson To: Commons Developers List Content-Type: multipart/alternative; boundary=20cf307f37e2830b7d04d01ceb64 X-Virus-Checked: Checked by ClamAV on apache.org --20cf307f37e2830b7d04d01ceb64 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable A [weaver] component as I envisioning it would provide e.g. a BytecodeWeaver interface, a custom implementation of which could be specified via: - the Maven plugin - the Antlib - the Java API Thus IMO it would be quite natural for [nabla] to make use of [weaver]. >From Torsten's/Mark's/Stephen's comments it sounds like using ASM might be less painful after all, dog food be damned. :/ @Emmanuel: My approach with the Antlib was to create a shaded uberjar so that the user wouldn't have to worry about dependencies. This came out to 900K, but typically this would be added to Ant's classpath rather than shipped per-project. The API jar is 3K, and would be the only thing required for compilation. Scale that by N weaver implementations (some of which possibly won't use a custom, or any, annotation) and the size of compilation dependencies would seem easily manageable. Agreed? Matt On Wed, Dec 5, 2012 at 4:16 AM, Luc Maisonobe wrote= : > Hi all, > > Le 04/12/2012 23:54, Matt Benson a =E9crit : > > Well, it looks like the most comfortable avenue for everyone is Commons > > [weaver]. IMO [weaver] would look like a framework for implementing an= y > > kind of code weaving, so the most important decision is the look of the > > API, and it would seem that eating our own dog food would be appropriat= e > in > > Commons. Thus I would propose that [weaver] be built on top of [BCEL], > and > > I would think it likely that we might provide a nice (fluent?) API for > > common code modifications. > > > > Firstly, does anyone object to using [BCEL] as [weaver]'s foundation?; > > secondly, can anyone tell me what (Java 7?) features [BCEL] currently > > lacks?; thirdly, does any of us already have the expertise to add these= ? > > The [nabla] project also needs bytecode engineering. I don't know if it > would fit within [weaver] API as it is really specific. It creates > completely new classes using exisitng classes as templates, and the new > classes generated methods contain deep modifications of the original > methods (data flow analysis, types change, signatures changed, binding > between generated and original methods and fields ...). Long ago, when > [nabla] was only a personal project not yet contributed to commons, I > used [BCEL] as the underlying bytecode engineering library. I finally > switched to ASM as the [BCEL] API was not sufficient for some of my > needs, whereas ASM was a perfect fit. > > Once again, I'm not sure if [nabla] could benefit from [weaver], so this > comment may not be relevant in the discussion. > > best regards, > Luc > > > > > Thanks, > > Matt > > > > > > On Fri, Nov 30, 2012 at 6:35 AM, Emmanuel Bourg > wrote: > > > >> Le 29/11/2012 19:12, Matt Benson a =E9crit : > >>> This would go back to the idea of something like a BCEL library > >>> (notwithstanding the fact that the existing privilizer code does not > use > >>> BCEL). > >> > >> For such a component BCEL would be an implementation detail, so I don'= t > >> think it should be a sub part of BCEL. > >> > >> If an annotation equivalent to @SwingInvokeLater can be added to the > >> project I would be highly interested in using it. > >> > >> As for the name of the component, what about Commons Weaver ? > >> > >> Emmanuel Bourg > >> > >> > >> > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > > --20cf307f37e2830b7d04d01ceb64--