From dean at aspectprogramming.com Thu Oct 4 17:50:36 2007 From: dean at aspectprogramming.com (Dean Wampler) Date: Thu, 4 Oct 2007 16:50:36 -0500 Subject: [Aquarium-users] Release planning for 0.1.6 and 0.2.0 Message-ID: <14EF9DA5-27C6-488E-BD69-1E0236074D1F@aspectprogramming.com> Hi, Here are my plans right now for the next few releases. V0.1.6. I'll probably do this one over the weekend. It will fix several bugs (#14353, #14356, and #14384), plus several "feature requests". (All the closed bugs and enhancement requests are in TRUNK already.) V0.2.0. Some of the more significant feature requests, including the changes to the advice-block parameter list we discussed previously (#13984) and removing some methods from JoinPoint, which are deprecated (#14053). Both of these will not be backwards compatible, so they need to wait for V0.2. I'm not sure of a release time, but probably in a few weeks. V0.1.7? Any releases between 0.1.6 and 0.2.0 will be for urgent bug fixes or enhancements. Tracker bugs: http://rubyforge.org/tracker/index.php? group_id=4281&atid=16494 Tracker feature requests: http://rubyforge.org/tracker/index.php? group_id=4281&atid=16497 Feedback is welcome, including any issues you would like to see addressed soon. TIA Dean Wampler, Ph.D. dean at objectmentor.com http://www.objectmentor.com See also: http://www.aspectprogramming.com AOP advocacy site http://aquarium.rubyforge.org AOP for Ruby http://www.contract4j.org Design by Contract for Java5 I want my tombstone to say: Unknown Application Error in Dean Wampler.exe. Application Terminated. [Okay] [Cancel] -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/aquarium-users/attachments/20071004/eff4d021/attachment.html From dean at aspectprogramming.com Sun Oct 7 13:09:42 2007 From: dean at aspectprogramming.com (Dean Wampler) Date: Sun, 7 Oct 2007 12:09:42 -0500 Subject: [Aquarium-users] V0.1.6 Released Message-ID: I just posted V0.1.6 with several bug fixes and enhancements. Here's a brief list of what's new. More details can be found here: http:// aquarium.rubyforge.org/changes.html Bug fixes: 14353 Advising subclass method that calls super raises exception when method executed 14356 Regexps for types must cover the whole name, which is inconsistent with method/attribute regexps 14384 Design by Contract "extra" does not return correct value in "invar" handling 13410 Fix funky navigation bar on website Enhancements: 13407 Pick a better method name for JoinPoint#type, which hides the Module#type 14385 Pointcut.new should accept a :join_point => jp argument 14386 Aspect.new ..., :pointcut => should accept a join point object 14440 Add good warning message when "proceed" used for non-around advice The one potential API incompatibility issue in this release is #13407. The old #type and #object methods are still on JoinPoint, but they are deprecated and will be removed for V0.2.0 (http:// rubyforge.org/tracker/index.php? func=detail&aid=14053&group_id=4281&atid=16497). My plan now is to do some serious refactoring (part of which is covered by enhancement requests) and then to tackle some of the bigger enhancements for V0.2.0. dean Dean Wampler, Ph.D. dean at objectmentor.com http://www.objectmentor.com See also: http://www.aspectprogramming.com AOP advocacy site http://aquarium.rubyforge.org AOP for Ruby http://www.contract4j.org Design by Contract for Java5 I want my tombstone to say: Unknown Application Error in Dean Wampler.exe. Application Terminated. [Okay] [Cancel] -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/aquarium-users/attachments/20071007/70cc423a/attachment-0001.html From ruby at schmidtwisser.de Mon Oct 22 05:44:19 2007 From: ruby at schmidtwisser.de (Gregor Schmidt) Date: Mon, 22 Oct 2007 11:44:19 +0200 Subject: [Aquarium-users] Introduction and Bug Report (failing Spec included) In-Reply-To: <2a50c7540710220220w37ccbdd2m28edc843572ffab2@mail.gmail.com> References: <2a50c7540710220220w37ccbdd2m28edc843572ffab2@mail.gmail.com> Message-ID: <2a50c7540710220244s4c390020v5e23b7cabb051f36@mail.gmail.com> Hello everybody, I just subscribed to this list and would like to introduce myself shortly. My name is Gregor and I'm currently studying it systems engineering at the HPI in Potsdam, Germany. I'm writing my Master's thesis on context-oriented programming in ruby and web applications, but this is not what brought me to aquarium. I wanted to check coding conventions in a rails project, I'm working on and AOP seemed like a good approach. AspectR is dead for a while now, so I tried aquarium. Unfortunately I does not seem to work with more complex objects. The following spec fails on svn trunk The Bug and the Spec ================= describe "Aspect" do it "should advice unusual method names" do lambda do Aquarium::Aspects::Aspect.new(:before, :types => Array, :methods =>:all) do end end.should_not raise(SyntaxError) end end (I'm not sure, whether this is the proposed way of doing this. But I think it should at least not raise SyntaxErrors) The error comes from class_eval using Strings. You are not escaping Symbols correctly, so it ends up like generating a line like the following: alias_method :_aspect_saved_Array_=~, :=~ It should be something like: alias_method :"_aspect_saved_Array_=~", :"=~" The following diff fixes the error while keeping the semantics: --- lib/aquarium/aspects/aspect.rb (revision 40) +++ lib/aquarium/aspects/aspect.rb (working copy) @@ -274,15 +274,15 @@ self_name = join_point.target_type.nil? ? "self" : join_point.target_type.name target_self = join_point.instance_method? ? "self" : join_point.target_type.name <<-EOF - alias_method :#{alias_method_name}, :#{join_point.method_name} + alias_method :"#{alias_method_name}", :"#{join_point.method_name}" def #{join_point.method_name} *args, &block_for_method - advice_chain = Aspect.get_advice_chain #{self_name}, :#{join_point.method_name} + advice_chain = Aspect.get_advice_chain #{self_name}, :"#{join_point.method_name}" static_join_point = advice_chain.static_join_point advice_join_point = Aspect.make_advice_join_point static_join_point, #{target_self}, args, block_for_method advice_chain.call advice_join_point, *args end - #{join_point.visibility.to_s} :#{join_point.method_name} - private :#{alias_method_name} + #{join_point.visibility.to_s} :"#{join_point.method_name}" + private :"#{alias_method_name}" EOF end But then, we have got a new glitch. In lib/aquarium/aspects/aspect.rb:386 a class var is accessed, which is called `@@_aspect_class_advice_chain_Array_<<' . This is not allowed as well, so we get the next syntax error. The above spec still fails. Do you have any idea how to solve that? What I was trying to achieve ===================== Basically I just wanted to ensure a code convention within test. Certain models should only be called from other models and not a controller or a view. To ensure this I wanted to add a before aspect which inspects the caller and raises an error, if the convention is not met. ActiveRecord uses method names with special characters, so I am not able to use aquarium in its current version. Perhaps there is an easier way of doing what I want and I therefore do not depend on the bug fix. Any ideas? Cheers, Gregor From deanwampler at gmail.com Mon Oct 22 07:46:12 2007 From: deanwampler at gmail.com (Dean Wampler) Date: Mon, 22 Oct 2007 06:46:12 -0500 Subject: [Aquarium-users] Fwd: Introduction and Bug Report (failing Spec included) In-Reply-To: <6cf2a94f0710220439gfdad2fexab5552c9b068157a@mail.gmail.com> References: <2a50c7540710220220w37ccbdd2m28edc843572ffab2@mail.gmail.com> <2a50c7540710220244s4c390020v5e23b7cabb051f36@mail.gmail.com> <6cf2a94f0710220439gfdad2fexab5552c9b068157a@mail.gmail.com> Message-ID: <6cf2a94f0710220446r4039c6b5ie5b76be9c5ccb263@mail.gmail.com> I should have responded to "all".... ---------- Forwarded message ---------- From: Dean Wampler Date: Oct 22, 2007 6:39 AM Subject: Re: [Aquarium-users] Introduction and Bug Report (failing Spec included) To: Gregor Schmidt Could you raise a bug here? http://rubyforge.org/tracker/?atid=16494&group_id=4281&func=browse I handle some special characters, but obviously not all. It should be a straightforward fix. By the way, what you're trying to do is a pretty common use of AspectJ. Let us know how it goes (after I fix this bug, of course...) ! Thanks, dean On 10/22/07, Gregor Schmidt wrote: > > Hello everybody, > > I just subscribed to this list and would like to introduce myself > shortly. My name is Gregor and I'm currently studying it systems > engineering at the HPI in Potsdam, Germany. I'm writing my Master's > thesis on context-oriented programming in ruby and web applications, > but this is not what brought me to aquarium. > > I wanted to check coding conventions in a rails project, I'm working > on and AOP seemed like a good approach. AspectR is dead for a while > now, so I tried aquarium. > > Unfortunately I does not seem to work with more complex objects. The > following spec fails on svn trunk > > The Bug and the Spec > ================= > > describe "Aspect" do > it "should advice unusual method names" do > lambda do > Aquarium::Aspects::Aspect.new(:before, :types => Array, > :methods =>:all) do > end > end.should_not raise(SyntaxError) > end > end > > (I'm not sure, whether this is the proposed way of doing this. But I > think it should at least not raise SyntaxErrors) > > The error comes from class_eval using Strings. You are not escaping > Symbols correctly, so it ends up like generating a line like the > following: > > alias_method :_aspect_saved_Array_=~, :=~ > > It should be something like: > > alias_method :"_aspect_saved_Array_=~", :"=~" > > > The following diff fixes the error while keeping the semantics: > > --- lib/aquarium/aspects/aspect.rb (revision 40) > +++ lib/aquarium/aspects/aspect.rb (working copy) > @@ -274,15 +274,15 @@ > self_name = join_point.target_type.nil? ? "self" : > join_point.target_type.name > target_self = join_point.instance_method? ? "self" : > join_point.target_type.name > <<-EOF > - alias_method :#{alias_method_name}, :#{join_point.method_name} > + alias_method :"#{alias_method_name}", > :"#{join_point.method_name}" > def #{join_point.method_name} *args, &block_for_method > - advice_chain = Aspect.get_advice_chain #{self_name}, > :#{join_point.method_name} > + advice_chain = Aspect.get_advice_chain #{self_name}, > :"#{join_point.method_name}" > static_join_point = advice_chain.static_join_point > advice_join_point = Aspect.make_advice_join_point > static_join_point, #{target_self}, args, block_for_method > advice_chain.call advice_join_point, *args > end > - #{join_point.visibility.to_s} :#{join_point.method_name} > - private :#{alias_method_name} > + #{join_point.visibility.to_s} :"#{join_point.method_name}" > + private :"#{alias_method_name}" > EOF > end > > But then, we have got a new glitch. In > lib/aquarium/aspects/aspect.rb:386 a class var is accessed, which is > called `@@_aspect_class_advice_chain_Array_<<' . This is not allowed > as well, so we get the next syntax error. The above spec still fails. > > Do you have any idea how to solve that? > > What I was trying to achieve > ===================== > > Basically I just wanted to ensure a code convention within test. > Certain models should only be called from other models and not a > controller or a view. To ensure this I wanted to add a before aspect > which inspects the caller and raises an error, if the convention is > not met. > > ActiveRecord uses method names with special characters, so I am not > able to use aquarium in its current version. Perhaps there is an > easier way of doing what I want and I therefore do not depend on the > bug fix. Any ideas? > > > Cheers, > > Gregor > _______________________________________________ > Aquarium-users mailing list > Aquarium-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/aquarium-users > -- Dean Wampler http://www.objectmentor.com http://www.aspectprogramming.com http://aquarium.rubyforge.org http://www.contract4j.org -- Dean Wampler http://www.objectmentor.com http://www.aspectprogramming.com http://aquarium.rubyforge.org http://www.contract4j.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/aquarium-users/attachments/20071022/35134b36/attachment-0001.html From ruby at schmidtwisser.de Mon Oct 22 09:05:22 2007 From: ruby at schmidtwisser.de (Gregor Schmidt) Date: Mon, 22 Oct 2007 15:05:22 +0200 Subject: [Aquarium-users] Fwd: Introduction and Bug Report (failing Spec included) In-Reply-To: <6cf2a94f0710220446r4039c6b5ie5b76be9c5ccb263@mail.gmail.com> References: <2a50c7540710220220w37ccbdd2m28edc843572ffab2@mail.gmail.com> <2a50c7540710220244s4c390020v5e23b7cabb051f36@mail.gmail.com> <6cf2a94f0710220439gfdad2fexab5552c9b068157a@mail.gmail.com> <6cf2a94f0710220446r4039c6b5ie5b76be9c5ccb263@mail.gmail.com> Message-ID: <2a50c7540710220605hb29e9c2k72e79545da32b240@mail.gmail.com> Okay, it is a ticket now: http://rubyforge.org/tracker/index.php?func=detail&aid=14946&group_id=4281&atid=16494 Cheers, Gregor On 10/22/07, Dean Wampler wrote: > I should have responded to "all".... > > > ---------- Forwarded message ---------- > From: Dean Wampler > Date: Oct 22, 2007 6:39 AM > Subject: Re: [Aquarium-users] Introduction and Bug Report (failing Spec > included) > To: Gregor Schmidt > > Could you raise a bug here? > http://rubyforge.org/tracker/?atid=16494&group_id=4281&func=browse > > I handle some special characters, but obviously not all. It should be a > straightforward fix. > > By the way, what you're trying to do is a pretty common use of AspectJ. Let > us know how it goes (after I fix this bug, of course...) ! > > Thanks, > dean > > > On 10/22/07, Gregor Schmidt wrote: > > Hello everybody, > > > > I just subscribed to this list and would like to introduce myself > > shortly. My name is Gregor and I'm currently studying it systems > > engineering at the HPI in Potsdam, Germany. I'm writing my Master's > > thesis on context-oriented programming in ruby and web applications, > > but this is not what brought me to aquarium. > > > > I wanted to check coding conventions in a rails project, I'm working > > on and AOP seemed like a good approach. AspectR is dead for a while > > now, so I tried aquarium. > > > > Unfortunately I does not seem to work with more complex objects. The > > following spec fails on svn trunk > > > > The Bug and the Spec > > ================= > > > > describe "Aspect" do > > it "should advice unusual method names" do > > lambda do > > Aquarium::Aspects::Aspect.new(:before, :types => Array, > > :methods =>:all) do > > end > > end.should_not raise(SyntaxError) > > end > > end > > > > (I'm not sure, whether this is the proposed way of doing this. But I > > think it should at least not raise SyntaxErrors) > > > > The error comes from class_eval using Strings. You are not escaping > > Symbols correctly, so it ends up like generating a line like the > > following: > > > > alias_method :_aspect_saved_Array_=~, :=~ > > > > It should be something like: > > > > alias_method :"_aspect_saved_Array_=~", :"=~" > > > > > > The following diff fixes the error while keeping the semantics: > > > > --- lib/aquarium/aspects/aspect.rb (revision 40) > > +++ lib/aquarium/aspects/aspect.rb (working copy) > > @@ -274,15 +274,15 @@ > > self_name = join_point.target_type.nil? ? "self" : > > join_point.target_type.name > > target_self = join_point.instance_method? ? "self" : > > join_point.target_type.name > > <<-EOF > > - alias_method :#{alias_method_name}, :#{join_point.method_name} > > + alias_method :"#{alias_method_name}", > :"#{join_point.method_name}" > > def #{join_point.method_name} *args, &block_for_method > > - advice_chain = Aspect.get_advice_chain #{self_name}, > > :#{join_point.method_name} > > + advice_chain = Aspect.get_advice_chain #{self_name}, > > :"#{join_point.method_name}" > > static_join_point = advice_chain.static_join_point > > advice_join_point = Aspect.make_advice_join_point > > static_join_point, #{target_self}, args, block_for_method > > advice_chain.call advice_join_point, *args > > end > > - #{join_point.visibility.to_s} > :#{join_point.method_name} > > - private :#{alias_method_name} > > + #{join_point.visibility.to_s} > :"#{join_point.method_name}" > > + private :"#{alias_method_name}" > > EOF > > end > > > > But then, we have got a new glitch. In > > lib/aquarium/aspects/aspect.rb:386 a class var is > accessed, which is > > called `@@_aspect_class_advice_chain_Array_<<' . This is > not allowed > > as well, so we get the next syntax error. The above spec still fails. > > > > Do you have any idea how to solve that? > > > > What I was trying to achieve > > ===================== > > > > Basically I just wanted to ensure a code convention within test. > > Certain models should only be called from other models and not a > > controller or a view. To ensure this I wanted to add a before aspect > > which inspects the caller and raises an error, if the convention is > > not met. > > > > ActiveRecord uses method names with special characters, so I am not > > able to use aquarium in its current version. Perhaps there is an > > easier way of doing what I want and I therefore do not depend on the > > bug fix. Any ideas? > > > > > > Cheers, > > > > Gregor > > _______________________________________________ > > Aquarium-users mailing list > > Aquarium-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/aquarium-users > > > > > > -- > Dean Wampler > http://www.objectmentor.com > http://www.aspectprogramming.com > http://aquarium.rubyforge.org > http://www.contract4j.org > > -- > Dean Wampler > http://www.objectmentor.com > http://www.aspectprogramming.com > http://aquarium.rubyforge.org > http://www.contract4j.org > _______________________________________________ > Aquarium-users mailing list > Aquarium-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/aquarium-users > > From dean at aspectprogramming.com Sat Oct 27 16:42:53 2007 From: dean at aspectprogramming.com (Dean Wampler) Date: Sat, 27 Oct 2007 15:42:53 -0500 Subject: [Aquarium-users] V0.1.7 released Message-ID: <838E87A6-F4EF-4F70-80C5-A743A760A808@aspectprogramming.com> There were a few significant bugs that I fixed this past week, so I did a bug-fix release. There should be no upgrade or compatibility issues. I'm still planning a V0.2.0 release, probably later this week. Be warned that this release will introduce a non-backwards-compatible change; the argument list to advice will become | join_point, object, *args | instead of the current | join_point, *args | This is in response to #13984. I considered other options for the argument list, including a flexible syntax, perhaps using a hash. I may add the hash option in the future (if it's reasonable and feasible), but for now, adding the object parameter seems to be the most useful change. I will also implement some other feature requests with v0.2.0. The list is TBD. Please send me any comments on these changes soon! Thanks. dean Dean Wampler, Ph.D. dean at objectmentor.com http://www.objectmentor.com See also: http://www.aspectprogramming.com AOP advocacy site http://aquarium.rubyforge.org AOP for Ruby http://www.contract4j.org Design by Contract for Java5 I want my tombstone to say: Unknown Application Error in Dean Wampler.exe. Application Terminated. [Okay] [Cancel] -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/aquarium-users/attachments/20071027/154329a9/attachment.html From dean at aspectprogramming.com Sun Oct 28 10:54:14 2007 From: dean at aspectprogramming.com (Dean Wampler) Date: Sun, 28 Oct 2007 09:54:14 -0500 Subject: [Aquarium-users] Problem with V0.1.7 release on Rubyforge Message-ID: If you attempt to "gem update" or "gem install" to get V0.1.7, you'll still get V0.1.6. I entered a support bug 15138, which I believe is probably related to 15113. I'll wait until tomorrow (Monday) to see if they can resolve it. If not, I'll create a V0.1.8 release (a different way...) that will hopefully make the latest available. dean Dean Wampler, Ph.D. dean at objectmentor.com http://www.objectmentor.com See also: http://www.aspectprogramming.com AOP advocacy site http://aquarium.rubyforge.org AOP for Ruby http://www.contract4j.org Design by Contract for Java5 I want my tombstone to say: Unknown Application Error in Dean Wampler.exe. Application Terminated. [Okay] [Cancel] -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/aquarium-users/attachments/20071028/da264bbb/attachment.html