« Return to Thread: Extending the _Event system in Grails (Re: was something else I can't remember now)
Ok, so since no-one responded to me about their ideal way to solve the problem I am going to propose a solution and if I don't get any "but nay!" comments, I'll go ahead and implement a patch and attach it to a JIRA.
My *suggestion* is this - extend the loadEventsHooks in GrailsBuildEventListener so that it looks for all scripts that *start* with _Events. It processes plain _Events as normal, and when an event is fired it checks to see if there are any _Event_That_Event_Name.groovy scripts anywhere, and if so, loads them in with loadEventScript.
I would have sworn there was an event ("CompileEnd") in the _GrailsCompile.groovy, but I can no-longer find it anywhere. It might be worthwhile to pepper more events around, but I think this is the biggie.
Thus if people need stuff to load after the compilation, they can create a script called _Events_Compile_End.groovy and that will load the extra event triggers into the namespace.On Fri, Jun 19, 2009 at 11:53 AM, Luke Daley <ld@...> wrote:
Richard,
The chicken and egg problem with _Events and _Install really is a bug. Rather than workaround it, it would be great if someone actually fixed this at the source.
I think the same can be said for what you are planning for enhancing the test running infrastructure. That probably should go into core.
All of that said, I know that it is easier to workaround Grails issues in the plugin space (guilty myself) but if at all possible we should be fixing at the root.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
--
---
Richard Vowles,
Talk to me about development in Grails, Groovy, Java and for the Blackberry
ph: +64275467747, linkedin, skype:rvowles
get 2Gb shared disk space in the cloud - Dropbox, its incredibly useful! - http://tinyurl.com/cmcceh
podcast: http://www.illegalargument.com
« Return to Thread: Extending the _Event system in Grails (Re: was something else I can't remember now)
| Free embeddable forum powered by Nabble | Forum Help |