You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Otho <ta...@googlemail.com> on 2009/04/02 16:19:50 UTC

[T5] Gotcha when working with Groovy and T5

Just thought that might interest some people.

I stumbled over a bug in Groovy's handling of annotations while translating
some components from Java. It is known and already filed here:
http://jira.codehaus.org/browse/GROOVY-3278

You can't use static constant variables in annotations, so

@Parameter(defaultBinding = BindingConstants.LITERAL)

won't work for example, while

@Parameter(defaultBinding = "literal")

will.

This is quite a bit of a putoff, since if you start a bigger application now
you might run into problems when upgrading Tapestry at some time in the
future and also it might affect your own component parameters when you work
with enums or constants. It's not fixed yet in 1.6.1-SNAPSHOT but hopefully
it gets worked on soon.

Re: [T5] Gotcha when working with Groovy and T5

Posted by Howard Lewis Ship <hl...@gmail.com>.
Well, the intent of those constants is not to shield against a change
(we aren't going to rename "literal" to "fixed" or something), but to
help the compiler catch typos that would otherwise be discoverred at
runtime.

On Thu, Apr 2, 2009 at 7:19 AM, Otho <ta...@googlemail.com> wrote:
> Just thought that might interest some people.
>
> I stumbled over a bug in Groovy's handling of annotations while translating
> some components from Java. It is known and already filed here:
> http://jira.codehaus.org/browse/GROOVY-3278
>
> You can't use static constant variables in annotations, so
>
> @Parameter(defaultBinding = BindingConstants.LITERAL)
>
> won't work for example, while
>
> @Parameter(defaultBinding = "literal")
>
> will.
>
> This is quite a bit of a putoff, since if you start a bigger application now
> you might run into problems when upgrading Tapestry at some time in the
> future and also it might affect your own component parameters when you work
> with enums or constants. It's not fixed yet in 1.6.1-SNAPSHOT but hopefully
> it gets worked on soon.
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org