Aadi Deshpande | 3 Dec 22:32 2004

[groovy-dev] groovy compile issue and fix

Hi,

I noticed that under my installation ( Fedora Core 3  / Blackdown/Sun 
JDK 1.4.2 / Eclipse 3.0.1 ) I noticed whenever I referenced classes from 
my classpath that included my own jars, I would not be able to compile 
the classes, nor would I see what was wrong. 

I took a look at the source code and noticed that the logic for the 
classpath builder in GroovyProject was misaligned, causing it to not 
work ( i.e. the resource was always not null , and would not be added to 
the classpath )

Additionally, it was appending window file separators that will not work 
on unix environments.

I have included a patch that resolves both these issues.  I'm not sure 
what jira issues they map to, so I apologize in advance for that.

Thanks,
-a
Attachment (groovy-compile-issue.patch): text/x-patch, 1702 bytes
jastrachan | 3 Dec 22:48 2004
Picon

[groovy-dev] [ANN] Gram!

Don't hold your breath or have any real expectations, this is only 2 
classes - but I've found Gram very useful on an engagement already...

http://docs.codehaus.org/display/GROOVY/Gram

Gram is a combination of Groovy + JAM and one or two extra classes. Or 
think of it as GRoovy Annotation Metadata.

Anyways if ever you wanna code generate or process doclet tags from 
Java 1.4 source code or Java 5 annotation source or annotation 
bytecode, try taking a look at Gram. Its super simple (there's very 
little there) but I've found it invaluable on a project.

e.g. in about an hour using Gram I auto-generated a whole slew of 
Tapestry widgets from the hibernate-doclet tag'd entity model on a 
project (after spending a day pulling my hair out with xdoclet and 
xdoclet2).

James
-------
http://radio.weblogs.com/0112098/

LARSON, BRIAN (SBCSI | 3 Dec 23:47 2004
Picon

[groovy-dev] Groovy 1.0 timeline, bugs

James:
Can you come up with a tentative schedule for when we plan to deliver
version 1.0.  Maybe with a few milestones (some basic language
decisions, parser rework, bytecode rewrite, formalizing spec, ...).  I
think that would help everyone get a sense of where we are and when
Groovy will finally make it to 1.0.

Guillaume:
You recently talked about the work that Jeremy Rayner and John Rose are
doing on the parser in the user list.  I have a little time and I'd like
to look at some bugs or help in other ways, but I'm afraid of doing
things which will be superseded by the parser work.  Can you suggest the
best ways to help or areas to avoid for bug fixing right now?

> Thanks,
> Brian Larson, (314) 235-3807
> ETM Infrastructure
> pager via <http://ebiz.sbc.com/webnotify/webSend.cfm?sbcuid=bl7385> or
> via email to mailto:3144601080@...
> 

jastrachan | 4 Dec 01:36 2004
Picon

Re: [groovy-dev] Groovy 1.0 timeline, bugs

On 3 Dec 2004, at 22:47, LARSON, BRIAN (SBCSI) wrote:
> James:
> Can you come up with a tentative schedule for when we plan to deliver
> version 1.0.  Maybe with a few milestones (some basic language
> decisions, parser rework, bytecode rewrite, formalizing spec, ...).  I
> think that would help everyone get a sense of where we are and when
> Groovy will finally make it to 1.0.

I'm hoping to tie down, as a suite of test cases, the core 1.0 language 
spec by the end of January - Christmas, vacation, a fair bit of 
travelling and a fairly busy day job will add pressure to that, but it 
should be do-able. Most of the thorny issues I think we've resolved, 
its most a case of dumping them all into a large test suite to check 
we've got the edge cases sorted.

How long it takes to implement is a harder thing to gauge though. There 
might be things we add later. Currently the most undefined thing seems 
to be markup / with clause - most of the rest we went through at the 
conference & I'm fairly happy all the smelly & ambiguous things can be 
resolved (or kinda have done but not explicitly in a test case yet).

> Guillaume:
> You recently talked about the work that Jeremy Rayner and John Rose are
> doing on the parser in the user list.  I have a little time and I'd 
> like
> to look at some bugs or help in other ways, but I'm afraid of doing
> things which will be superseded by the parser work.  Can you suggest 
> the
> best ways to help or areas to avoid for bug fixing right now?

(Continue reading)

Marius Gleeson | 6 Dec 02:35 2004
Picon

[groovy-dev] name only method calling

Hi there,

I am trying to use Groovy as the base for command line interface
application. The only thing that I was hoping to be able to do was to
call methods that have no parameters just by name, and without any
paranthesis. I can understand some of abiguities that this may cause,
but I really need this ability, so that the final syntax works like a
cli should. 

Does anyone have any suggestions or even point me at some code to start
looking at?

Thanks,
Marius Gleeson.

Laforge Guillaume | 6 Dec 10:37 2004

RE: [groovy-dev] Groovy 1.0 timeline, bugs

Hello Brian,
Hello Groovy developers and hackers,

>Guillaume:
>You recently talked about the work that Jeremy Rayner and John Rose are
>doing on the parser in the user list.  I have a little time and I'd like
>to look at some bugs or help in other ways, but I'm afraid of doing
>things which will be superseded by the parser work.  Can you suggest the
>best ways to help or areas to avoid for bug fixing right now?

I started looking at the bugs/features in JIRA, from the oldest ones to the most recent ones.
I've only browsed a third of the issues (GROOVY-1 to around GROOVY-280), but here are some outstanding ones
we could have a look at. (I don't look at feature requests, ony bugs).

Here are the ones I thought we could have a look at:
Some of these issues have even patches attached! We should try to see if we can reproduce those bugs, and see
what we can do with them:

GROOVY-193
GROOVY-197
GROOVY-217 (old for loop with patch)
GROOVY-226 (ant builder)
GROOVY-267 (patch for MarkupBuilder <a href="">content</a>)
GROOVY-272 (delegates issue)
GROOVY-275 (numerical stuff)
GROOVY-276 (issue of compilation/package)

Those ones should hopefully be sorted out thanks to the rewrite of the parser and the new class generator. So
I'm not sure we should really look at them in the meantime.

(Continue reading)

Laforge Guillaume | 6 Dec 10:40 2004

RE: [groovy-dev] name only method calling


Hello Marius,

In Groovy, foo.method returns what we call a "method closure".
It's similar to a function pointer.

foo = new Foo()
mc = foo.method
mc() // call the method

The only way for a method without parameters to be called without parenthesis, it to be named like a getter.
In Groovy, foo.bar is a shortcut for foo.getBar().
So if you really want to be able to call methods without arguements without parenthesis, perhaps you could
call them like getters? But it's a bit odd and tricky :-/
Otherwise, I don't really see any other option at the moment.

--
Guillaume Laforge
http://glaforge.free.fr/weblog

-----Message d'origine-----
De : Marius Gleeson [mailto:mg@...]
Envoyé : lundi 6 décembre 2004 02:36
À : dev@...
Objet : [groovy-dev] name only method calling

Hi there,

I am trying to use Groovy as the base for command line interface
application. The only thing that I was hoping to be able to do was to
(Continue reading)

Russel Winder | 6 Dec 11:22 2004
Picon

[groovy-dev] Patch needed to src/main/groovy/lang/GroovyCodeSource.java

I just pulled a new copy of the CVS archive and I get the error:

    [javac] Compiling 299 source files to
/home/users/russel/Progs/Other_CVS/groovy/groovy-core/target/classes
/home/users/russel/Progs/Other_CVS/groovy/groovy-core/src/main/groovy/lang/GroovyCodeSource.java:98:
reference to CodeSource is ambiguous, both method
CodeSource(java.net.URL,java.security.cert.Certificate[]) in java.security.CodeSource and
method CodeSource(java.net.URL,java.security.CodeSigner[]) in java.security.CodeSource match
                                        info[1] = new CodeSource(file.toURI().toURL(), null);
                                                  ^
I know the fix for this is known it is just a matter of putting the
appropriate cast in front of the null of:

info[1] = new CodeSource(file.toURI().toURL(), null);

It is either (Certificate[]) or (Signers[]) -- I guess either will
actually do but it might be best to use the right one for the intention.

Could someone commit this to the CVS?

Thanks.

--

-- 
Russel.
=============================================
Dr Russel Winder         +44 20 7585 2200
41 Buckmaster Road       +44 7770 465 077
London SW11 1EN, UK      russel@...

(Continue reading)

Russel Winder | 6 Dec 11:27 2004
Picon

[groovy-dev] Missing Maven dependency perhaps?

I am getting a problem in the test:compile goal of the Maven build of
groovy-core:

test:compile:
    [javac] Compiling 109 source files to
/home/users/russel/Progs/Other_CVS/groovy/groovy-core/target/test-classes
/home/users/russel/Progs/Other_CVS/groovy/groovy-core/src/test/groovy/xml/TestXmlSupport.java:51:
package org.apache.xalan.serialize does not exist
import org.apache.xalan.serialize.SerializerToXML;

^
/home/users/russel/Progs/Other_CVS/groovy/groovy-core/src/test/groovy/xml/TestXmlSupport.java:73:
cannot find symbol
symbol  : class SerializerToXML
location: class groovy.xml.TestXmlSupport
    protected SerializerToXML createSerializer() {

^
/home/users/russel/Progs/Other_CVS/groovy/groovy-core/src/test/groovy/xml/TestXmlSupport.java:63:
cannot find symbol
symbol  : class SerializerToXML
location: class groovy.xml.TestXmlSupport
        SerializerToXML printer = createSerializer();

^
/home/users/russel/Progs/Other_CVS/groovy/groovy-core/src/test/groovy/xml/TestXmlSupport.java:75:
cannot find symbol
symbol  : class SerializerToXML
location: class groovy.xml.TestXmlSupport
            SerializerToXML ser = new SerializerToXML();
(Continue reading)

Peter Reilly | 6 Dec 11:30 2004

Re: [groovy-dev] Missing Maven dependency perhaps?

Russel Winder wrote:

>scripts?  Does anyone know the solution?
>
>I know I am using JDK1.5 not JDK1.4.2 but this shouldn't make a
>difference to being able to make a build
>  
>
It does make a difference here.

org.apache.xalan has been moved in java 1.5.

Peter


Gmane