You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bigtop.apache.org by "Roman Shaposhnik (Commented) (JIRA)" <ji...@apache.org> on 2011/11/16 21:51:52 UTC

[jira] [Commented] (BIGTOP-262) Compilation Error in project hadoop-smoke when using Eclipse

    [ https://issues.apache.org/jira/browse/BIGTOP-262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13151502#comment-13151502 ] 

Roman Shaposhnik commented on BIGTOP-262:
-----------------------------------------

Not to detract from patching it, but this is correct as far as Groovy 1.6.0 is concerned:

$ /tmp/groovy-1.6.0/bin/groovyc q.groovy 
$

Later Groovy compilers reject the code. I'm really quite happy to accept the patch, but the real issue here might be that we need
to make sure that we all use the same version of Groovy when developing for Bigtop. So far we've been relying on Maven
dependency to pull in the "right" version of Groovy core. Perhaps it is time to bump that dependency from 1.6.0 to something
more modern.

Will, can you look into harmonizing the version of Groovy that you're using with the one Bigtop pulls in?
                
> Compilation Error in  project hadoop-smoke when using Eclipse
> -------------------------------------------------------------
>
>                 Key: BIGTOP-262
>                 URL: https://issues.apache.org/jira/browse/BIGTOP-262
>             Project: Bigtop
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 0.2.0
>         Environment: RHEL 6.1, 64-bit
> Eclipse 3.7 SR1
>            Reporter: Will McQueen
>            Assignee: Will McQueen
>
> static field declaration in TestTestCLI.groovy needs to be moved outside of the static initialization block because it's causing compiler errors.
> Sample groovy code in Test.groovy:
> [will@will-laptop test]$ cat Test.groovy 
> class Test {
>   static {
>     private static int x = 5;
>   }
> }
> [will@will-laptop test]$ groovyc Test.groovy
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
> Test.groovy: 3: Modifier 'private' not allowed here.
>  @ line 3, column 5.
>        private static int x = 5;
>        ^
> Test.groovy: 3: Modifier 'static' not allowed here.
>  @ line 3, column 5.
>        private static int x = 5;
>        ^

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira