What happened to GroovyChainAction?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

What happened to GroovyChainAction?

uris77
I noticed in 0.9.9 that there is no more GroovyChainAction. What is the alternative?
Reply | Threaded
Open this post in threaded view
|

Re: What happened to GroovyChainAction?

uris77
I think I found it. We need to implement Action<Chain> now. Sounds like a blog post in the making.
rus
Reply | Threaded
Open this post in threaded view
|

Re: What happened to GroovyChainAction?

rus
Correct.  Not as good as a blog post maybe but I did tweet :) https://twitter.com/rus_hart/status/517273884845170688
Reply | Threaded
Open this post in threaded view
|

Re: What happened to GroovyChainAction?

uris77
Ah, I missed that. Was still sleeping at that time :). Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: What happened to GroovyChainAction?

Luke Daley
Administrator
I’m actually now wondering whether removing it was a good idea. I definitely don’t want to bring back the rest of the Action _classes_, but GroovyChainAction was probably useful enough to justify the potential confusion in the point of this class.
Reply | Threaded
Open this post in threaded view
|

Re: What happened to GroovyChainAction?

Kyle
I'm in favor of bringing it back - we were using it pretty heavily and the new syntax seems worse to me.
Reply | Threaded
Open this post in threaded view
|

Re: What happened to GroovyChainAction?

Luke Daley
Administrator
The problem I have with it is that things can go wrong when you nest them inside other classes, and get method signatures wrong. You end up calling some other method when you thought you were calling the chain method. You don’t have this problem with a fluent API. That said though, Groovy programmers already deal with this on a day to day basis with nested closures and dynamic delegation. Even more-so, the Groovy.chain() method still supports this style.

I’m ok with bring GroovyChainAction back (perhaps under a different name), but don’t want to bring back ChainAction, BindingsSpecAction etc. That is, this will be a Groovy convenience.

Anyone want to submit a PR?