Guillaume Laforge | 1 Feb 2012 12:38
Picon
Gravatar

[groovy-dev] Groovy 1.8.6 targeted for Thursday 9th

Hi developers,


We're targeting the release of Groovy 1.8.6 for Thursday 9th.
We'll create a release branch on Tuesday, to freeze the code, and release a snapshot in our snapshot repository, for those who want to test this snapshot with their respective projects, tools and frameworks.
If you've got a few things in the pipeline, this is the time to see if you want to integrate that in 1.8.6 before the release.

Thanks for your attention and happy coding :-)

--
Guillaume Laforge
Groovy Project Manager
SpringSource, a division of VMware


Guillaume Laforge | 1 Feb 2012 14:49
Gravatar

Re: [groovy-dev] GROOVY-4975 / GroovyScriptingEngine

Frans, did you have a closer look at your previous patch to include Jochen's comments?

On Sat, Dec 10, 2011 at 15:48, Jochen Theodorou <blackdrag-BA+cFGlbTmA@public.gmane.org> wrote:
Am 10.12.2011 14:04, schrieb Frans van Buul:

Hi all,
I've been working on ScriptingEngine issue
http://jira.codehaus.org/browse/GROOVY-4975 over the last week, since
this issue is bothering me in a Groovy application we've built (a
process engine designed to replace Oracle BPEL, with processes defined
in Groovy and read by the scripting engine).
I think I finally got it, after a couple of iterations and feedback from
Jochen. A proposed patch (patch4975_v2.txt) is attachted to the jira
issue; it contains quite a few changes to the scripting engine. I
thought it might be useful to bring this to attention on this list; any
feedback on the proposed patch would be useful.

(1) you subclass DependencyTracker and you change DependencyTracker in that patch.. why not move the logic for subclassing into the DependencyTracker class? The class is only for GSE atm

(2) I am a bit worried by that loop

<at> <at> -557,6 +584,15 <at> <at> public class GroovyScriptEngine implements ResourceConnector {
            if (depEntry.lastModified < lastMod) {
                ScriptCacheEntry newEntry = new ScriptCacheEntry(depEntry.scriptClass, lastMod, depEntry.dependencies);
                scriptCache.put(scriptName, newEntry);
+                /* GROOVY-4975 Removing entries from scriptcache and classcache that depended on the entry we just
+                 * updated; these should be recompiled. */
+                for(Map.Entry<String, ScriptCacheEntry> currentEntry : scriptCache.entrySet()) {
+                       if(!currentEntry.getKey().equals(scriptName) &&
+                                       currentEntry.getValue().dependencies.contains(scriptName)) {
+                       scriptCache.remove(currentEntry.getKey());
+                       groovyLoader.removeClassCacheEntry(currentEntry.getValue().scriptClass.getName());
+                       }
+                }

I wonder if we should work with a reverse transitive hull or something like that instead, then we could avoid going through the potentially large number of entries.

The other thing is the new usage of scriptCache. isSourceNewer is not synchronized and called by loadScriptByName.

parseClass has for example this one:

           ScriptCacheEntry origEntry = scriptCache.get(codeSource.getName());
           Set<String> origDep = null;
           if (origEntry != null) origDep = origEntry.dependencies;

this was ok, because before it was ensured, that if there was an entry once, there always will be. But since in that patch you now remove things outside of the synchronization scope of this method, it can fail.

A similar thing is the removal of class entries in the groovy class loader... assuming you remove them in isSourceNewer, and right after that it is added again, because a parseClass call, that adds the entry just completed. What is the point of removing the entry then?

parseClass itself is not called in a synchronized context either. super.parseClass will call such a context. And before it was not enter that context in GSE itself, because we used ThreadLocals and such anyway. So I guess in this new logic we would have to start using super.sourceCache to synchronize, making the engine a lot slower if we do that in isSourceNewer... or we move the removal code somewhere else... for example into our newly synchronized parseClass...

The other way would be to rethink the solution with removals. Can't it work with just updates?

bye blackdrag

--
Jochen "blackdrag" Theodorou - Groovy Project Tech Lead
blog: http://blackdragsview.blogspot.com/
german groovy discussion newsgroup: de.comp.lang.misc
For Groovy programming sources visit http://groovy-lang.org


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email





--
Guillaume Laforge
Groovy Project Manager
Head of Groovy Development at SpringSource
http://www.springsource.com/g2one
Passell, Matthew | 1 Feb 2012 16:20
Favicon

Re: [groovy-dev] Groovy 1.8.6 targeted for Thursday 9th

Hi All,


Would anyone with commit rights be able to look at the patch I attached to http://jira.codehaus.org/browse/GROOVY-5241 ?  I know it's not a major enhancement, but it would be nice to get it into 1.8.6. :)

Thanks,
Matt


On Wed, Feb 1, 2012 at 6:38 AM, Guillaume Laforge <glaforge-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi developers,

We're targeting the release of Groovy 1.8.6 for Thursday 9th.
We'll create a release branch on Tuesday, to freeze the code, and release a snapshot in our snapshot repository, for those who want to test this snapshot with their respective projects, tools and frameworks.
If you've got a few things in the pipeline, this is the time to see if you want to integrate that in 1.8.6 before the release.

Thanks for your attention and happy coding :-)

--
Guillaume Laforge
Groovy Project Manager
SpringSource, a division of VMware

Tim Yates | 1 Feb 2012 17:53
Picon
Gravatar

[groovy-dev] Adding intersect on lists of things

I was looking in to adding an intersect method to lists of things, so that:

assert [ [ 1, 2 ], [ 2, 3 ], [ 2, 4 ] ].intersect() == [ 2 ]

And then you don't need to get your lists into 2 separate variables in order to perform an intersection on them.

Working with lists of lists was fine with the function definition in DGM as:

    public static <T> Collection<T> intersect( List<Collection<T>> self ) {
      ...
    }

However, then of course, there is lists of Maps to consider (as there is an intersect method already in for maps)

This would need to be defined as:

    public static <K,V> Map<K,V> intersect( List<Map<K,V>> self ) {
      ...
    }

However, this doesn't work as at runtime, java cannot choose between the two methods) once the generics have been erased...

So, what would people do in this situation?

As I see it, there are 3 options:

1)  Write the method so it takes a List, and returns an Object and uses introspection to see if it is dealing with a List of Maps or a List of Lists
2)  Write an listIntersection() method and a mapIntersection() method
3)  Don't bother doing it at all as it's problematic and will almost certainly make Cédric's job harder down the line

Any other ideas, or suggestions of a route that could be taken?

Tim

Cédric Champeau | 2 Feb 2012 08:18
Picon
Gravatar

Re: [groovy-dev] Groovy 1.8.6 targeted for Thursday 9th

Done :)

Le 01/02/2012 16:20, Passell, Matthew a écrit :
Hi All,

Would anyone with commit rights be able to look at the patch I attached to http://jira.codehaus.org/browse/GROOVY-5241 ?  I know it's not a major enhancement, but it would be nice to get it into 1.8.6. :)

Thanks,
Matt


On Wed, Feb 1, 2012 at 6:38 AM, Guillaume Laforge <glaforge-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi developers,

We're targeting the release of Groovy 1.8.6 for Thursday 9th.
We'll create a release branch on Tuesday, to freeze the code, and release a snapshot in our snapshot repository, for those who want to test this snapshot with their respective projects, tools and frameworks.
If you've got a few things in the pipeline, this is the time to see if you want to integrate that in 1.8.6 before the release.

Thanks for your attention and happy coding :-)

--
Guillaume Laforge
Groovy Project Manager
SpringSource, a division of VMware



-- Cédric Champeau SpringSource - A Division Of VMware http://www.springsource.com/ http://twitter.com/CedricChampeau
Passell, Matthew | 2 Feb 2012 16:17
Favicon

Re: [groovy-dev] Groovy 1.8.6 targeted for Thursday 9th

Merci beaucoup! :)


It's a pretty small contribution, but I'm glad it got in anyway.

--Matt

On Thu, Feb 2, 2012 at 2:18 AM, Cédric Champeau <cedric.champeau-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Done :)

Le 01/02/2012 16:20, Passell, Matthew a écrit :
Hi All,

Would anyone with commit rights be able to look at the patch I attached to http://jira.codehaus.org/browse/GROOVY-5241 ?  I know it's not a major enhancement, but it would be nice to get it into 1.8.6. :)

Thanks,
Matt


On Wed, Feb 1, 2012 at 6:38 AM, Guillaume Laforge <glaforge-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi developers,

We're targeting the release of Groovy 1.8.6 for Thursday 9th.
We'll create a release branch on Tuesday, to freeze the code, and release a snapshot in our snapshot repository, for those who want to test this snapshot with their respective projects, tools and frameworks.
If you've got a few things in the pipeline, this is the time to see if you want to integrate that in 1.8.6 before the release.

Thanks for your attention and happy coding :-)

--
Guillaume Laforge
Groovy Project Manager
SpringSource, a division of VMware



-- Cédric Champeau SpringSource - A Division Of VMware http://www.springsource.com/ http://twitter.com/CedricChampeau
Guillaume Laforge | 2 Feb 2012 16:34
Picon
Gravatar

Re: [groovy-dev] Groovy 1.8.6 targeted for Thursday 9th

Thanks for contributing it!
Now we want even more from you :-)

Guillaume 

Le 2 févr. 2012 à 16:17, "Passell, Matthew" <matthew.passell-B24Wn5KSNrjby3iVrkZq2A@public.gmane.org> a écrit :

Merci beaucoup! :)

It's a pretty small contribution, but I'm glad it got in anyway.

--Matt

On Thu, Feb 2, 2012 at 2:18 AM, Cédric Champeau <cedric.champeau <at> gmail.com> wrote:
Done :)

Le 01/02/2012 16:20, Passell, Matthew a écrit :
Hi All,

Would anyone with commit rights be able to look at the patch I attached to http://jira.codehaus.org/browse/GROOVY-5241 ?  I know it's not a major enhancement, but it would be nice to get it into 1.8.6. :)

Thanks,
Matt


On Wed, Feb 1, 2012 at 6:38 AM, Guillaume Laforge <glaforge-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi developers,

We're targeting the release of Groovy 1.8.6 for Thursday 9th.
We'll create a release branch on Tuesday, to freeze the code, and release a snapshot in our snapshot repository, for those who want to test this snapshot with their respective projects, tools and frameworks.
If you've got a few things in the pipeline, this is the time to see if you want to integrate that in 1.8.6 before the release.

Thanks for your attention and happy coding :-)

--
Guillaume Laforge
Groovy Project Manager
SpringSource, a division of VMware



-- Cédric Champeau SpringSource - A Division Of VMware http://www.springsource.com/ http://twitter.com/CedricChampeau
Passell, Matthew | 2 Feb 2012 20:18
Favicon

Re: [groovy-dev] Groovy 1.8.6 targeted for Thursday 9th

Ha ha. :)  I'll see what I can do.  I was pleased to discover that my new employer (TeamQuest Corp.) is happy to have its devs make open source contributions, so it's possible.

--Matt


On Thu, Feb 2, 2012 at 10:34 AM, Guillaume Laforge <glaforge-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Thanks for contributing it!
Now we want even more from you :-)

Guillaume 

Le 2 févr. 2012 à 16:17, "Passell, Matthew" <matthew.passell-B24Wn5KSNrjby3iVrkZq2A@public.gmane.org> a écrit :

Merci beaucoup! :)

It's a pretty small contribution, but I'm glad it got in anyway.

--Matt

On Thu, Feb 2, 2012 at 2:18 AM, Cédric Champeau <cedric.champeau <at> gmail.com> wrote:
Done :)

Le 01/02/2012 16:20, Passell, Matthew a écrit :
Hi All,

Would anyone with commit rights be able to look at the patch I attached to http://jira.codehaus.org/browse/GROOVY-5241 ?  I know it's not a major enhancement, but it would be nice to get it into 1.8.6. :)

Thanks,
Matt


On Wed, Feb 1, 2012 at 6:38 AM, Guillaume Laforge <glaforge-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi developers,

We're targeting the release of Groovy 1.8.6 for Thursday 9th.
We'll create a release branch on Tuesday, to freeze the code, and release a snapshot in our snapshot repository, for those who want to test this snapshot with their respective projects, tools and frameworks.
If you've got a few things in the pipeline, this is the time to see if you want to integrate that in 1.8.6 before the release.

Thanks for your attention and happy coding :-)

--
Guillaume Laforge
Groovy Project Manager
SpringSource, a division of VMware



-- Cédric Champeau SpringSource - A Division Of VMware http://www.springsource.com/ http://twitter.com/CedricChampeau
Arturo Herrero | 5 Feb 2012 21:49
Picon

[groovy-dev] Error with documentation font size


Hey,
what

happens

with

this

documentation

page?

*http://groovy.codehaus.org/api/org/codehaus/groovy/runtime/DefaultGroovyMethods.html*

--
View this message in context: http://groovy.329449.n5.nabble.com/Error-with-documentation-font-size-tp5458685p5458685.html
Sent from the groovy - dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Paul King | 5 Feb 2012 22:19
Picon
Favicon
Gravatar

Re: [groovy-dev] Error with documentation font size


There was a typo:
<code>n<code> instead of
<code>n</code>

And the latest css for javadocs seems particularly sensitive when that happens.
Should be fixed when next we do a release.

And as a general rule, most of the info in that particular file
is probably better presented in the groovy-jdk doco:
http://groovy.codehaus.org/groovy-jdk/

Cheers, Paul.

On 6/02/2012 6:49 AM, Arturo Herrero wrote:
>
> Hey,
> what
>
> happens
>
> with
>
> this
>
> documentation
>
> page?
>
>
> *http://groovy.codehaus.org/api/org/codehaus/groovy/runtime/DefaultGroovyMethods.html*
>
>
> --
> View this message in context: http://groovy.329449.n5.nabble.com/Error-with-documentation-font-size-tp5458685p5458685.html
> Sent from the groovy - dev mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>      http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Gmane