[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [aspectj-users] weaving incompatibility?
- From: Adrian Colyer <adrian_colyer@xxxxxxxxxx>
- Date: Wed, 5 Jan 2005 10:45:56 +0000
- Delivered-to: firstname.lastname@example.org
> Can you clarify whether n and v refer to major or minor releases?
> E.g. is 1.2 "officially" incompatible with 1.2.1?
1.2 is (regrettably) incompatible with 1.2.1 - this is why we added the
versioning (that I then didn't take advantage of in AJ5M1) to try and stop
this from happening again in the future.
n and v include minor as well as major releases as a general principle
(witness 1.2.1), but we will aim to do better (ie. to give binary
compatibility across major releases, regardless of minor version). I guess
this means that when we put out a release, we should include a binary
compatibility statement that indicates whether or not we achieved this
Nicholas Lesiecki <ndlesiecki@xxxxxxxxx>
Sent by: aspectj-dev-admin@xxxxxxxxxxx
Please respond to
Re: [aspectj-dev] weaving incompatibility?
Can you clarify whether n and v refer to major or minor releases? E.g.
is 1.2 "officially" incompatible with 1.2.1?
Software Craftsman, specializing in J2EE,
Agile Methods, and aspect-oriented programming
m: 520 591-1849
* Mastering AspectJ: http://tinyurl.com/66vf
* Java Tools for Extreme Programming: http://tinyurl.com/66vt
Articles on AspectJ:
* http://tinyurl.com/66vu and http://tinyurl.com/66vv
On Dec 17, 2004, at 2:18 AM, Adrian Colyer wrote:
> You've touched on an important issue (I'm cc'ing aspectj-users for
> In AspectJ 1.2.1 we changed the binary format of (some attributes in)
> aspects, and also introduced a version attribute in the class files we
> generate so that we would know which version of AspectJ created it. In
> AspectJ 5 M1 we changed the binary format of (some attributes in)
> again (for example, to record annotation patterns in pointcut
> expressions). What we didn't do in that milestone release is rev the
> class file version number (probably should have, certainly will before
> release candidate).
> Our binary compatibility policy is as follows:
> * An aspect created by version n of the AspectJ compiler can be
> by an AspectJ compiler (weaver) of version v, where v >= n. (At some
> point in the future, we may have to change this policy to
> n <= v >= (n+2), ie. backwards compatibility with two previous
> but we haven't needed to make this restriction yet and will be sure to
> communicate clearly if we ever think we need to do so).
> * We do not guarantee that an aspect created by version n of the
> compiler can be consumed by an AspectJ compiler (weaver) of version v,
> where v < n. (This is like the Java rules - a 1.5 class cannot be
> into a 1.4 vm).
> * An AspectJ weaver of version v, that reads in an aspect of version n,
> where n < v, will write out that same aspect at version v if it needs
> write out any changes to it.
> * An AspectJ program should always be run with the aspectjrt.jar
> library that accompanies the distribution containing the
> used to build it.
> A long answer to the question
>> Should it be possible to weave AspectJ 5 aspects with an older weaver?
> To which the short answer is "no".
> However, instead of some IOException, what you should see is a nice
> message saying that the aspect was produced by a more recent version of
> AspectJ and cannot be read. Likewise, if you load a pre-aspectj 5
> into the AspectJ 5 weaver right now, you'll also see an IOException
> (odds-on). In M2 we'll detect that and use the back-level loaders to
> it in.
> Regards, Adrian.
> -- Adrian
> Martin Lippert <lippert@xxxxxxx>
> Sent by: aspectj-dev-admin@xxxxxxxxxxx
> 16/12/2004 19:30
> Please respond to
> AspectJ Dev List <aspectj-dev@xxxxxxxxxxx>
> [aspectj-dev] weaving incompatibility?
> I just observed a possible incompatibility between different AspectJ
> versions and would like to ask you whether this is a bug or not. I got
> problems in my load-time weaving environment (which is based on the
> AspectJ 1.2 code) when trying to load AJDT 1.2.0M2 compiled aspects.
> idea? Should it be possible to weave AspectJ 5 aspects with an older
> Thanks a lot for the help!!!
> Best regards,
> aspectj-dev mailing list
> aspectj-dev mailing list
aspectj-dev mailing list