[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [aspectj-dev] weaving incompatibility?
- From: Nicholas Lesiecki <ndlesiecki@xxxxxxxxx>
- Date: Sun, 19 Dec 2004 16:39:06 -0700
- Delivered-to: email@example.com
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
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
Martin Lippert <lippert@xxxxxxx>
Sent by: aspectj-dev-admin@xxxxxxxxxxx
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!!!
aspectj-dev mailing list
aspectj-dev mailing list