[groovy-user] Multi-line support with groovysh

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[groovy-user] Multi-line support with groovysh

phkim
Hi everyone

Here is a test with groovysh of Groovy 1.0-jsr-01.
X--------------------------------------------------
Lets get Groovy!
================
Version: 1.0-jsr-01 JVM: 1.4.2_08-b03
Type 'exit' to terminate the shell
Type 'help' for command help
Type 'go' to execute the statements

groovy> def fn() {
groovy>     println 100
groovy> }
groovy> fn()
groovy> go
100
X-----------------------------------------------------

And here is a test with groovysh of Groovy 1.0-jsr-04-SNAPSHOT (CVS HEAD).
X---------------------------------------------------
Lets get Groovy!
================
Version: 1.0-jsr-04-SNAPSHOT JVM: 1.4.2_08-b03
Type 'exit' to terminate the shell
Type 'help' for command help
Type 'go' to execute the statements

groovy> def fn() {
Discarding invalid text:
groovysh script: 2: expecting '}', found 'null' @ line 2, column 1.
1 Error
X-----------------------------------------------------

As above, the CVS Head does not support muliti-line codes with groovysh.
Is this a feature or a bug?


Kim



Reply | Threaded
Open this post in threaded view
|

Re: [groovy-user] Multi-line support with groovysh

phkim
On Sat, Oct 29, 2005 at 01:22:34PM +0900, [hidden email] wrote:

> Hi everyone
>
> Here is a test with groovysh of Groovy 1.0-jsr-01.
> X--------------------------------------------------
> Lets get Groovy!
> ================
> Version: 1.0-jsr-01 JVM: 1.4.2_08-b03
> Type 'exit' to terminate the shell
> Type 'help' for command help
> Type 'go' to execute the statements
>
> groovy> def fn() {
> groovy>     println 100
> groovy> }
> groovy> fn()
> groovy> go
> 100
> X-----------------------------------------------------
>
> And here is a test with groovysh of Groovy 1.0-jsr-04-SNAPSHOT (CVS HEAD).
> X---------------------------------------------------
> Lets get Groovy!
> ================
> Version: 1.0-jsr-04-SNAPSHOT JVM: 1.4.2_08-b03
> Type 'exit' to terminate the shell
> Type 'help' for command help
> Type 'go' to execute the statements
>
> groovy> def fn() {
> Discarding invalid text:
> groovysh script: 2: expecting '}', found 'null' @ line 2, column 1.
> 1 Error
> X-----------------------------------------------------
>
> As above, the CVS Head does not support muliti-line codes with groovysh.
> Is this a feature or a bug?
>
>
> Kim
>

It is already issued at http://jira.codehaus.org/browse/GROOVY-1021

If it is a bug, may I fix the issue?

Here is a test after fixing at local.
X-----------------------------------------------
Lets get Groovy!
================
Version: 1.0-jsr-04-SNAPSHOT JVM: 1.4.2_08-b03
Type 'exit' to terminate the shell
Type 'help' for command help
Type 'go' to execute the statements

groovy> for (i in 1..10) {
groovy>     println i
groovy> }
groovy> go
1
2
3
4
5
6
7
8
9
10
X---------------------------------------------------

Kim

Reply | Threaded
Open this post in threaded view
|

Re: [groovy-user] Multi-line support with groovysh

Jochen Theodorou
In reply to this post by phkim
[hidden email] wrote:
[...]
> As above, the CVS Head does not support muliti-line codes with groovysh.
> Is this a feature or a bug?

bug

bye blackdrag
Reply | Threaded
Open this post in threaded view
|

Re: [groovy-user] Multi-line support with groovysh

phkim
On Sat, Oct 29, 2005 at 11:12:59AM +0200, Jochen Theodorou wrote:
> [hidden email] wrote:
> [...]
> >As above, the CVS Head does not support muliti-line codes with groovysh.
> >Is this a feature or a bug?
>
> bug
>
> bye blackdrag

Hi

Is InteractiveShell.java locked ?

Here is a failure message while committing:
cvs [server aborted]: could not open lock file `/home/projects/groovy/scm/groovy
/groovy-core/src/main/groovy/ui/,InteractiveShell.java,': Permission denied


Kim

Reply | Threaded
Open this post in threaded view
|

Re: [groovy-user] Multi-line support with groovysh

Jochen Theodorou
[hidden email] schrieb:
can you please for the moment attach a diff to the issue?

thx, blackdrag

Reply | Threaded
Open this post in threaded view
|

[groovy-dev] Re: [groovy-user] Multi-line support with groovysh

phkim
On Mon, Oct 31, 2005 at 02:24:50PM +0100, Jochen Theodorou wrote:
> [hidden email] schrieb:
> can you please for the moment attach a diff to the issue?
>
> thx, blackdrag
>

Hi blackdrag

My problem is why I cannot commit the updated files.

Here is another message while committing:
/home/projects/groovy/scm/groovy/groovy-core/src/main/org/codehaus/groovy/runtia
new revision: 1.189; previous revision: 1.188
cvs [server aborted]: could not open lock file `/home/projects/groovy/scm/groovd


Kim