buildr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Assaf Arkin <as...@labnotes.org>
Subject Re: Native ant support in JRuby 1.5
Date Sat, 20 Feb 2010 16:16:55 GMT
On Fri, Feb 19, 2010 at 12:58 PM, Rhett Sutphin
<rhett@detailedbalance.net>wrote:

> Hi again,
>
>
> On Feb 19, 2010, at 2:39 PM, Rhett Sutphin wrote:
>
>  Hi,
>>
>> The JRuby team just announced that JRuby 1.5 is going to have built-in
>> support for ruby-language access to ant tasks:
>>
>>
>> http://www.engineyard.com/blog/2010/rake-and-ant-together-a-pick-it-n-stick-it-approach/
>>
>> I mention this because it will probably affect buildr in some way.  But I
>> also bring it up because the announcement might be a good place to mention
>> that buildr and antwrap allow you to do some of this today with either MRI
>> or JRuby.  Unfortunately, intensedebate is blocking me from signing up (it
>> rejects my OpenID as invalid and I am not receiving an account validation
>> message when I sign up the traditional way).
>>
>> I'll try again later, but if someone else wants to beat me to commenting,
>> feel free.
>>
>
> Okay, so ... it turns out that you can comment without an intensedebate
> account.  I went ahead and mentioned antwrap and buildr.
>
> It is interesting to see how their (presumably independent) design for
> rake/ant integration works.  It seems to be pretty similar to antwrap except
> that their treatment of nested elements uses an implicit target rather than
> an explicit one:
>
> # In JRuby 1.5+
> ant.path(:id => "project.class.path") do
>  pathelement :location => "classes"
> end
>

Older versions of Antwrap worked that way.  It turned out to not be such a
hot deal.  What happens when you want to call a pathelement method on your
object? First you have to figure out a Ruby method call is intercepted by
Ant, which is not what you'd expect.  Then work out a temporary variable to
point at self.

That happens a lot in Buildr, and we ended up with DSL code smell, so I
asked Caleb (developer of Antwrap) to change the behavior to what it is
today.

Assaf


>
> # In Antwrap
> ant.path(:id => "project.class.path") do |a|
>  a.pathelement :location => "classes"
> end
>
> Rhett
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message