Guillaume Laforge | 5 Jul 23:34
Gravatar

[groovy-user] Groovy 1.1-beta-2 released!

Dear community,

The Groovy team is pleased to announce the release of Groovy
1.1-beta-2, yet another step on our aggressive roadmap towards the
release of Groovy 1.1 in October.

For this release, I would like especially to highlight two key
contributions to the project:

    * First of all, after we've added Java 5 annotation support in
Groovy 1.1-beta-1, this time, it was generics' turn. Thanks to the
help of some JBoss developers who've integrated Groovy in JBoss Seam,
we've been able to test our support for annotations and generics, and
to make sure we would release a quality milestone to our users. Groovy
is the first alternative dynamic language for the JVM that supports
annotations and generics, so that you can integrate Groovy with any
Enterprise application frameworks like EJB 3 / JPA, JBoss Seam, Google
Guice, Spring, etc.
    * Secondly, I'm very happy to report the contribution of JetBrains
to the development of Groovy. While working on the IntelliJ IDEA
plugin for Groovy and Grails, the talentuous JetBrains team provided
us with a joint Java/Groovy compiler! No more nightmare to cleanly
separate Java and Groovy code to avoid cyclic references and tedious
build configuration, you can now use the Groovyc compiler to compile
both Groovy and Java sources in a single step.

Apart from those two great contributions that we have integrated in
the project, we've worked on many other areas since the release of the
first beta:

(Continue reading)

Barzilai Spinak | 6 Jul 15:31

Re: [groovy-user] Groovy 1.1-beta-2 released!

Congratulations!

Guillaume Laforge wrote:
>    * Secondly, I'm very happy to report the contribution of JetBrains
> to the development of Groovy. While working on the IntelliJ IDEA
> plugin for Groovy and Grails, the talentuous JetBrains team provided
> us with a joint Java/Groovy compiler! No more nightmare to cleanly
> separate Java and Groovy code to avoid cyclic references and tedious
> build configuration, you can now use the Groovyc compiler to compile
> both Groovy and Java sources in a single step.

How does this work? Does the new groovyc compile .java by itself or does 
it rely on the javac installed under JAVA_HOME?
If it compiles by itself, does it compile with Java 1.4/5/6 
compatibility? Can you choose?

BarZ

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

    http://xircles.codehaus.org/manage_email

Guillaume Laforge | 6 Jul 15:41
Gravatar

Re: [groovy-user] Groovy 1.1-beta-2 released!

Hi,

On 7/6/07, Barzilai Spinak <barcho@...> wrote:
> Congratulations!

Thanks a lot!

> Guillaume Laforge wrote:
> >    * Secondly, I'm very happy to report the contribution of JetBrains
> > to the development of Groovy. While working on the IntelliJ IDEA
> > plugin for Groovy and Grails, the talentuous JetBrains team provided
> > us with a joint Java/Groovy compiler! No more nightmare to cleanly
> > separate Java and Groovy code to avoid cyclic references and tedious
> > build configuration, you can now use the Groovyc compiler to compile
> > both Groovy and Java sources in a single step.
>
> How does this work? Does the new groovyc compile .java by itself or does
> it rely on the javac installed under JAVA_HOME?
> If it compiles by itself, does it compile with Java 1.4/5/6
> compatibility? Can you choose?

Till Jochen or Alex move the documentation to the wiki, you can read
Jochen's blog about it:
http://blackdragsview.blogspot.com/2007/07/joint-compilation-in-groovy.html

It should answer your questions.

--

-- 
Guillaume Laforge
Groovy Project Manager
(Continue reading)

Jochen Theodorou | 6 Jul 16:15
Gravatar

Re: [groovy-user] Groovy 1.1-beta-2 released!

Barzilai Spinak schrieb:
> Congratulations!
> 
> Guillaume Laforge wrote:
>>    * Secondly, I'm very happy to report the contribution of JetBrains
>> to the development of Groovy. While working on the IntelliJ IDEA
>> plugin for Groovy and Grails, the talentuous JetBrains team provided
>> us with a joint Java/Groovy compiler! No more nightmare to cleanly
>> separate Java and Groovy code to avoid cyclic references and tedious
>> build configuration, you can now use the Groovyc compiler to compile
>> both Groovy and Java sources in a single step.
> 
> How does this work? Does the new groovyc compile .java by itself or does 
> it rely on the javac installed under JAVA_HOME?

it uses the javac in classpath. The main method of javac is called 
without any commandline in between

> If it compiles by itself, does it compile with Java 1.4/5/6 
> compatibility? Can you choose?

see my blog ;) 
http://blackdragsview.blogspot.com/2007/07/joint-compilation-in-groovy.html

-j

to turn joint compilation on,

-Jsource=1.4 -Jtarget=1.4

(Continue reading)

Eric Kolotyluk | 6 Jul 19:16
Favicon

[groovy-user] Groovy chokes on simple statement

I have nice little Groovy application that runs fine. However, when I add the following piece of code

 

if (serviceRespository == null)

{

    LOG.error("serviceRepository = null")

    return

}

 

I get

 

Exception in thread "main" java.lang.NullPointerException

            at org.codehaus.groovy.classgen.AsmClassGenerator.visitReturnStatement(AsmClassGenerator.java:1016)

            at org.codehaus.groovy.ast.stmt.ReturnStatement.visit(ReturnStatement.java:74)

            at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:83)

            at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:102)

            at org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:586)

            at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:82)

            at org.codehaus.groovy.classgen.AsmClassGenerator.visitIfElse(AsmClassGenerator.java:675)

            at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:71)

            at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:83)

            at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:102)

            at org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:586)

INFO  2007.07.06 17:09:32,001 Z [Thread-11 Reader Proofer VS00050] ReadFromProofer - InterruptedException in EOFException - normal behaviour

            at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:82)

            at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:49)

            at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:54)

            at org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructorOrMethod(AsmClassGenerator.java:506)

            at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructor(ClassCodeVisitorSupport.java:58)

            at org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructor(AsmClassGenerator.java:537)

            at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:833)

            at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:36)

            at org.codehaus.groovy.classgen.AsmClassGenerator.visitClass(AsmClassGenerator.java:330)

            at org.codehaus.groovy.control.CompilationUnit$9.call(CompilationUnit.java:746)

            at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:947)

            at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:478)

            at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:306)

            at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:275)

            at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:221)

            at com.creo.proofer.Main.runGroovyStartup(Main.java:268)

            at com.creo.proofer.Main.main(Main.java:100)

 

When I remove the code everything works fine.

 

Is this a bug in Groovy?

 

Cheers, Eric

Eric Kolotyluk | Software Developer, Enterprise Solutions | Graphic Communications Group |
Kodak Graphics Communications Company,
Canada | 4225 Kincaid Street | Burnaby, BC V5G 4P5 | Canada |
+1-604-451-2700 x 6471 tel  |  +1-604-437-9891 fax  | +1.604-834-0129 mobile
www.graphics.kodak.com

 

Yegor Bryukhov | 6 Jul 19:53

Re: [groovy-user] Groovy chokes on simple statement

return should probably have an argument?

On 7/6/07, Eric Kolotyluk <eric.kolotyluk-qa2Vv93yo6IAvxtiuMwx3w@public.gmane.org> wrote:

I have nice little Groovy application that runs fine. However, when I add the following piece of code

 

if (serviceRespository == null)

{

    LOG.error("serviceRepository = null")

    return

}

 

I get

 

Exception in thread "main" java.lang.NullPointerException

            at org.codehaus.groovy.classgen.AsmClassGenerator.visitReturnStatement(AsmClassGenerator.java:1016)

            at org.codehaus.groovy.ast.stmt.ReturnStatement.visit(ReturnStatement.java:74)

            at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:83)

            at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:102)

            at org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:586)

            at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:82)

            at org.codehaus.groovy.classgen.AsmClassGenerator.visitIfElse(AsmClassGenerator.java:675)

            at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:71)

            at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:83)

            at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:102)

            at org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:586)

INFO  2007.07.06 17:09:32,001 Z [Thread-11 Reader Proofer VS00050] ReadFromProofer - InterruptedException in EOFException - normal behaviour

            at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:82)

            at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:49)

            at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:54)

            at org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructorOrMethod(AsmClassGenerator.java:506)

            at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructor(ClassCodeVisitorSupport.java:58)

            at org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructor(AsmClassGenerator.java:537)

            at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:833)

            at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:36)

            at org.codehaus.groovy.classgen.AsmClassGenerator.visitClass(AsmClassGenerator.java:330)

            at org.codehaus.groovy.control.CompilationUnit$9.call(CompilationUnit.java:746)

            at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:947)

            at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:478)

            at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:306)

            at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:275)

            at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:221)

            at com.creo.proofer.Main.runGroovyStartup(Main.java:268)

            at com.creo.proofer.Main.main(Main.java:100)

 

When I remove the code everything works fine.

 

Is this a bug in Groovy?

 

Cheers, Eric

Eric Kolotyluk | Software Developer, Enterprise Solutions | Graphic Communications Group |
Kodak Graphics Communications Company,
Canada | 4225 Kincaid Street | Burnaby, BC V5G 4P5 | Canada |
+1-604-451-2700 x 6471 tel  |  +1-604-437-9891 fax  | +1.604-834-0129 mobile
www.graphics.kodak.com

 




--
Best regards,
Yegor
__________________________________________________________
Yegor Bryukhov,
Research Associate
Center for Algorithms and Interactive Scientific Software
City College of New York
Jochen Theodorou | 9 Jul 12:47
Gravatar

Re: [groovy-user] Groovy chokes on simple statement

Eric Kolotyluk schrieb:
> 
> 
> I have nice little Groovy application that runs fine. However, when I 
> add the following piece of code
> 
>  
> 
> if (serviceRespository == null)
> 
> {
> 
>     LOG.error("serviceRepository = null")
> 
>     return
> 
> }

to get a useful report I need different things..
1) groovy version
2) a program I can test here.

If I test your program here I get no NPE, so I guess the important part 
is missing.

bye blackdrag

--

-- 
Jochen "blackdrag" Theodorou
Groovy Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/

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

    http://xircles.codehaus.org/manage_email

Re: [groovy-user] Groovy 1.1-beta-2 released!

Am Thu, Jul 05, 2007 11:36:10PM +0200, Guillaume Laforge schrieb:
> The Groovy team is pleased to announce the release of Groovy
> 1.1-beta-2
> [...]
>    * Named parameters are also now possible on top-level statements,
> without parentheses, so that expressive code can be written like in:
> move x: 10.centimers, y: 8;centimeters or fund.compareWith bench:
> NIKEI, over: 2.months

I don't get it. The following code doesn't work as I would have specected it:

    def m(a=1,b) {
        println a + " " + b
    }
    m(2)
    m(3,3)
    m(b:1,a:2)

Output:
    1 2
    3 3
    1 ["b":1, "a":2]

--

-- 
Iván F. Villanueva B.
A.I. Open Source project:      --     www.artificialidea.com
FFII.org Deutschland           --     de.ffii.org
FFII.org España                --     es.ffii.org

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

    http://xircles.codehaus.org/manage_email

Jochen Theodorou | 11 Jul 19:41
Gravatar

Re: [groovy-user] Groovy 1.1-beta-2 released!

Ivan F. Villanueva B. schrieb:
> Am Thu, Jul 05, 2007 11:36:10PM +0200, Guillaume Laforge schrieb:
>> The Groovy team is pleased to announce the release of Groovy
>> 1.1-beta-2
>> [...]
>>    * Named parameters are also now possible on top-level statements,
>> without parentheses, so that expressive code can be written like in:
>> move x: 10.centimers, y: 8;centimeters or fund.compareWith bench:
>> NIKEI, over: 2.months
> 
> I don't get it. The following code doesn't work as I would have specected it:
> 
>     def m(a=1,b) {
>         println a + " " + b
>     }
>     m(2)
>     m(3,3)
>     m(b:1,a:2)
> 
> Output:
>     1 2
>     3 3
>     1 ["b":1, "a":2]

named parameters and optional parameters with a default value are two 
different things. Groovy has no named parameters yet, instead you need 
to use a map for them, m(b:1,a:2) is interpreted as a method call taking 
a map, which correctly sets b to the map.

bye blackdrag

--

-- 
Jochen "blackdrag" Theodorou
Groovy Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/

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

    http://xircles.codehaus.org/manage_email


Gmane