Return-Path: X-Original-To: apmail-aries-dev-archive@www.apache.org Delivered-To: apmail-aries-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 830FD970E for ; Thu, 29 Sep 2011 09:51:26 +0000 (UTC) Received: (qmail 6476 invoked by uid 500); 29 Sep 2011 09:51:26 -0000 Delivered-To: apmail-aries-dev-archive@aries.apache.org Received: (qmail 6444 invoked by uid 500); 29 Sep 2011 09:51:26 -0000 Mailing-List: contact dev-help@aries.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@aries.apache.org Delivered-To: mailing list dev@aries.apache.org Received: (qmail 6436 invoked by uid 99); 29 Sep 2011 09:51:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Sep 2011 09:51:26 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gcharters@gmail.com designates 209.85.216.178 as permitted sender) Received: from [209.85.216.178] (HELO mail-qy0-f178.google.com) (209.85.216.178) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Sep 2011 09:51:20 +0000 Received: by qyg14 with SMTP id 14so631700qyg.2 for ; Thu, 29 Sep 2011 02:50:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=mqeTlTBE+v2yJ7bThh7eJl8F8bShTrj8vb6zraI3yik=; b=jcNc02T1YeZrnFAYVJJ8s+XMpgsSktJu30cPgVVP5CWt7u9Uazu0kcRcX46Qf0vm25 sBJsfYTsDiNRWWJRrWok4bEt9sV3VoawRt+qZXpLwSIzh8S9cbQ8mwUgzWrZ64QzAIsg C3H2yUGv69CwHjeXyACKwX3LzewbK5qNsqQg0= MIME-Version: 1.0 Received: by 10.229.66.31 with SMTP id l31mr7383012qci.201.1317289858906; Thu, 29 Sep 2011 02:50:58 -0700 (PDT) Received: by 10.229.231.5 with HTTP; Thu, 29 Sep 2011 02:50:58 -0700 (PDT) In-Reply-To: References: <08C45E94-D9EA-4B6D-BFB3-55A24341C056@gmail.com> Date: Thu, 29 Sep 2011 10:50:58 +0100 Message-ID: Subject: Re: Semantic Versioning tool From: Graham Charters To: dev@aries.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org +1 Semantic versioning is a very difficult concept to get right - as the discussion on this thread are demonstrating ;) If we can identify when things are clearly wrong and make recommendations, then that would be a huge step forward. It would be nice if we could have a core capability that's agnostic of environment (i.e. whether it is used in Maven, Ant, Eclipse, etc.) and then use that to enable checking in those environments. I'd be happy to help with the Maven integration...time permitting :-S Graham. On 29 September 2011 10:29, Emily Jiang wrote: > Hi David, > > For an interface, the tool just finds out whether it has binary > compatibility changes or not. If yes, the major version will need to be > updated. If it has new methods etc (based on sementic versioning white > paper), its minor version needs to be increased. Its version should be > determined by the changes not by the different types of clients. As > mentioned by Valentin, its client or implementors can protect themselves by > using different version ranges. > > By the way, the tool is implemented based on the semantic version white > paper as per your email. > > Regards > Emily > > On Thu, Sep 29, 2011 at 9:05 AM, David Bosschaert < > david.bosschaert@gmail.com> wrote: > >> Hi Valentin, >> >> It's all in this doc: >> www.osgi.org/wiki/uploads/Links/SemanticVersioning.pdf >> >> Cheers, >> >> David >> >> On 29 September 2011 08:34, Valentin Mahrwald >> wrote: >> > Hm, I thought the distinction between usage of the interface was a >> distinction made on the import side. So as for an interface I am using but >> not implementing I have a range of [a, a+1) and for one I am using through >> implementation, [a, a+0.1). In either case I would have thought the semantic >> versioning tool should suggest a+0.1 as the next version for adding a new >> method, so as to enable the user to make that choice. >> > >> > What am I missing? >> > >> > Regards, >> > >> > Valentin >> > >> > On 29 Sep 2011, at 08:28, David Bosschaert wrote: >> > >> >> Hi Emily, >> >> >> >> Yes, sounds great. Especially if this plugin can ultimately be >> >> integrated with maven and work alongside the maven-bundle-plugin that >> >> would be great. >> >> >> >> Regarding the semantic versioning, this relates to the role that a >> >> certain interface plays. >> >> If an interface is extended (e.g. with a new method) then there are >> >> two situations: >> >> * if it's an interface that is supposed to be *implemented* by end >> >> users then this is a major version increase. I think this is what you >> >> have right now. >> >> * however, if it's an interface that is supposed to be *used* by end >> >> users but implemented by the infrastructure (e.g. part of the >> >> 'project' you are comparing, which might span multiple bundles) then >> >> only a minor version increase is needed. In this case the interface is >> >> still binary compatible with users of it. It's just not compatible >> >> with implementors of it. Note that this only applies to a limited set >> >> of changes to an interface. E.g. removing a method is binary >> >> incompatible for everyone. >> >> >> >> I'm not sure whether its possible to automatically guess what the role >> >> of an interface is, so the tool needs to be configurable wrt to this. >> >> I would even suggest that the tool fails unless this information is >> >> available for all its public interfaces since guessing it wrong can >> >> have pretty bad consequences. >> >> >> >> Cheers, >> >> >> >> David >> >> >> >> On 28 September 2011 19:36, Alasdair Nottingham wrote: >> >>> +1 >> >>> >> >>> I think this would be a really good tool to have here. I'm happy to >> assist >> >>> with getting it integrated if you need anything. >> >>> >> >>> Thanks >> >>> Alasdair >> >>> >> >>> On 28 September 2011 17:17, Emily Jiang >> wrote: >> >>> >> >>>> I use ASM and also have to load classes to access super classes:(. >> >>>> >> >>>> On Wed, Sep 28, 2011 at 5:10 PM, Timothy Ward < >> timothyjward@apache.org >> >>>>> wrote: >> >>>> >> >>>>> >> >>>>> Emily, >> >>>>> >> >>>>> Are you using ASM, or some other bytecode tool, to work out what has >> >>>>> changed, or do you have to load classes and use reflection to find >> out? >> >>>>> >> >>>>> Regards, >> >>>>> >> >>>>> Tim >> >>>>> >> >>>>>> Date: Wed, 28 Sep 2011 16:58:33 +0100 >> >>>>>> Subject: Re: Semantic Versioning tool >> >>>>>> From: emijiang6@googlemail.com >> >>>>>> To: dev@aries.apache.org >> >>>>>> >> >>>>>> Hi David, >> >>>>>> >> >>>>>> It works by comparing the current binary with the baseline binary: >> >>>>>> 1. For each export package, it scans each non private class to see >> >>>>> whether >> >>>>>> there are binary incompatibility changes (according to Java >> >>>>> specificiation >> >>>>>> chapter 13 Binary Compability). If yes, a major version change is >> >>>> needed >> >>>>> for >> >>>>>> this pkg. >> >>>>>> 2. If there are not binary incompability changes, it will see >> whether >> >>>>> there >> >>>>>> are abstract class, methods or new xsd file added. If yes, the >> >>>> package's >> >>>>>> minor version needs to be increased. >> >>>>>> 3. It then determine the bundle version based on package versions >> >>>> changed >> >>>>>> according to semantic versioning white paper. >> >>>>>> >> >>>>>> The tool ignore micro version changes. >> >>>>>> >> >>>>>> I can contribute the tool as a project and then we can create a mvn >> >>>>> plugin >> >>>>>> from it or something even smarter. >> >>>>>> >> >>>>>> Regards, >> >>>>>> Emily >> >>>>>> >> >>>>>> On Wed, Sep 28, 2011 at 4:16 PM, David Bosschaert < >> >>>>>> david.bosschaert@gmail.com> wrote: >> >>>>>> >> >>>>>>> Very interesting, Emily. Would you be able to provide some >> >>>> information >> >>>>>>> regarding how it works? >> >>>>>>> >> >>>>>>> In any case I would welcome such an addition to Aries. >> >>>>>>> >> >>>>>>> Best regards, >> >>>>>>> >> >>>>>>> David >> >>>>>>> >> >>>>>>> On 28 September 2011 16:02, Emily Jiang >> >>>>> wrote: >> >>>>>>>> I have developed a semantic checking tool to check whether a >> >>>> bundle's >> >>>>>>>> version or the export package versions are correclty versioned >> >>>>> according >> >>>>>>> to >> >>>>>>>> OSGi semantic versioning whitepaper. I would like to contribute to >> >>>>> Apache >> >>>>>>>> Aries as subproject under a code name of 'llama' ( or a better >> >>>> name. >> >>>>> I am >> >>>>>>>> open to suggestions). >> >>>>>>>> >> >>>>>>>> Any thoughts or suggestions? >> >>>>>>>> -- >> >>>>>>>> Thanks >> >>>>>>>> Emily >> >>>>>>>> ================= >> >>>>>>>> Emily Jiang >> >>>>>>>> ejiang@apache.org >> >>>>>>>> >> >>>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> -- >> >>>>>> Thanks >> >>>>>> Emily >> >>>>>> ================= >> >>>>>> Emily Jiang >> >>>>>> ejiang@apache.org >> >>>>> >> >>>>> >> >>>> >> >>>> >> >>>> >> >>>> -- >> >>>> Thanks >> >>>> Emily >> >>>> ================= >> >>>> Emily Jiang >> >>>> ejiang@apache.org >> >>>> >> >>> >> >>> >> >>> >> >>> -- >> >>> Alasdair Nottingham >> >>> not@apache.org >> >>> >> > >> > >> > > > > -- > Thanks > Emily > ================= > Emily Jiang > ejiang@apache.org >