Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] 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?

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 
higher goal.

Regards, Adrian.

-- Adrian
Adrian_Colyer@xxxxxxxxxx



Nicholas Lesiecki <ndlesiecki@xxxxxxxxx> 
Sent by: aspectj-dev-admin@xxxxxxxxxxx
19/12/2004 23:39
Please respond to
aspectj-dev@xxxxxxxxxxx


To
aspectj-dev@xxxxxxxxxxx
cc
aspectj-users@xxxxxxxxxxx
Subject
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?


Nicholas Lesiecki
Software Craftsman, specializing in J2EE,
Agile Methods, and aspect-oriented programming
m: 520 591-1849

Books:
* 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 
> wider
> visibility).
>
> 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) 
> aspects
> 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 
> a
> release candidate).
>
> Our binary compatibility policy is as follows:
>
> * An aspect created by version n of the AspectJ compiler can be 
> consumed
> 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 
> versions,
> 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 
> AspectJ
> 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 
> loaded
> 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 
> to
> write out any changes to it.
>
> * An AspectJ program should always be run with the aspectjrt.jar 
> runtime
> library that accompanies the distribution containing the 
> compiler/weaver
> 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 
> aspect
> 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 
> read
> it in.
>
> Regards, Adrian.
>
> -- Adrian
> Adrian_Colyer@xxxxxxxxxx
>
>
>
> Martin Lippert <lippert@xxxxxxx>
> Sent by: aspectj-dev-admin@xxxxxxxxxxx
> 16/12/2004 19:30
> Please respond to
> aspectj-dev@xxxxxxxxxxx
>
>
> To
> AspectJ Dev List <aspectj-dev@xxxxxxxxxxx>
> cc
>
> Subject
> [aspectj-dev] weaving incompatibility?
>
>
>
>
>
>
> Hi,
>
> 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. 
> Any
> idea? Should it be possible to weave AspectJ 5 aspects with an older
> weaver?
>
> Thanks a lot for the help!!!
>
> Best regards,
> -Martin
>
> _______________________________________________
> aspectj-dev mailing list
> aspectj-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-dev
>
>
> _______________________________________________
> aspectj-dev mailing list
> aspectj-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-dev
>

_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-dev




Back to the top