You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Per Mellqvist (JIRA)" <ji...@apache.org> on 2009/04/01 22:47:13 UTC

[jira] Created: (CASSANDRA-40) Build does not handle ANTLR generated code properly

Build does not handle ANTLR generated code properly
---------------------------------------------------

                 Key: CASSANDRA-40
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-40
             Project: Cassandra
          Issue Type: Bug
            Reporter: Per Mellqvist
            Priority: Minor


The default ant target does not trigger generation of code from Cli.g and Cql.g
The clean target does not remove generated files
The targets gen-cli-grammar and gen-cql-grammar do not reference current locations of Cli.g and Cql.g
Generated files are commited in svn repository (by mistake?)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-40) Build does not handle ANTLR generated code properly

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-40?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12694992#action_12694992 ] 

Jonathan Ellis commented on CASSANDRA-40:
-----------------------------------------

I get errors running `ant clean build` after applying this patch:

gen-cli-grammar:
     [echo] Building Grammar /home/jonathan/projects/cassandra-new-svn/src/org/apache/cassandra/cli/Cli.g  ....
     [java] Exception in thread "main" java.lang.NoClassDefFoundError: org/antlr/stringtemplate/StringTemplateErrorListener
     [java] 	at org.antlr.Tool.main(Tool.java:67)
     [java] Caused by: java.lang.ClassNotFoundException: org.antlr.stringtemplate.StringTemplateErrorListener
     [java] 	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
     [java] 	at java.security.AccessController.doPrivileged(Native Method)
     [java] 	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
     [java] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
     [java] 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
     [java] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
     [java] 	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
     [java] 	... 1 more
     [java] Java Result: 1


> Build does not handle ANTLR generated code properly
> ---------------------------------------------------
>
>                 Key: CASSANDRA-40
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-40
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Per Mellqvist
>            Priority: Minor
>         Attachments: diff.txt
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The default ant target does not trigger generation of code from Cli.g and Cql.g
> The clean target does not remove generated files
> The targets gen-cli-grammar and gen-cql-grammar do not reference current locations of Cli.g and Cql.g
> Generated files are commited in svn repository (by mistake?)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-40) Build does not handle ANTLR generated code properly

Posted by "Per Mellqvist (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-40?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Per Mellqvist updated CASSANDRA-40:
-----------------------------------

    Attachment: diff.txt

Patch (generated by 'svn diff build.xml' on revision 760988)
Fixes mentioned issues with build.xml
Removing ANTLR-generated files from svn remains

> Build does not handle ANTLR generated code properly
> ---------------------------------------------------
>
>                 Key: CASSANDRA-40
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-40
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Per Mellqvist
>            Priority: Minor
>         Attachments: diff.txt
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The default ant target does not trigger generation of code from Cli.g and Cql.g
> The clean target does not remove generated files
> The targets gen-cli-grammar and gen-cql-grammar do not reference current locations of Cli.g and Cql.g
> Generated files are commited in svn repository (by mistake?)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-40) Build does not handle ANTLR generated code properly

Posted by "Jun Rao (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-40?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695041#action_12695041 ] 

Jun Rao commented on CASSANDRA-40:
----------------------------------

I think it's convenient to include antlr-generated java files in the source tree. Not everybody will be modifying the CQL grammar. In a similar way, we already include thrift-generated java code in the source tree.

> Build does not handle ANTLR generated code properly
> ---------------------------------------------------
>
>                 Key: CASSANDRA-40
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-40
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Per Mellqvist
>            Priority: Minor
>         Attachments: diff.txt
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The default ant target does not trigger generation of code from Cli.g and Cql.g
> The clean target does not remove generated files
> The targets gen-cli-grammar and gen-cql-grammar do not reference current locations of Cli.g and Cql.g
> Generated files are commited in svn repository (by mistake?)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-40) Build does not handle ANTLR generated code properly

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-40?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12694733#action_12694733 ] 

Jonathan Ellis commented on CASSANDRA-40:
-----------------------------------------

What does this do to Eclipse users?  Can you tell eclipse "just build it with ant?"

(I don't use Eclipse but I think most others do.)

> Build does not handle ANTLR generated code properly
> ---------------------------------------------------
>
>                 Key: CASSANDRA-40
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-40
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Per Mellqvist
>            Priority: Minor
>         Attachments: diff.txt
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The default ant target does not trigger generation of code from Cli.g and Cql.g
> The clean target does not remove generated files
> The targets gen-cli-grammar and gen-cql-grammar do not reference current locations of Cli.g and Cql.g
> Generated files are commited in svn repository (by mistake?)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-40) Build does not handle ANTLR generated code properly

Posted by "Per Mellqvist (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-40?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12694909#action_12694909 ] 

Per Mellqvist commented on CASSANDRA-40:
----------------------------------------

Eclipse has ant integration (so does IntelliJ and as far as I know NetBeans).
To trigger ant from eclipse http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.user/gettingStarted/qs-92_project_builders.htm

For Eclipse users that do not want to configure ant integration, running the gen- tasks once after checkout should be enough. After that the normal eclipse build cycle should work

> Build does not handle ANTLR generated code properly
> ---------------------------------------------------
>
>                 Key: CASSANDRA-40
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-40
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Per Mellqvist
>            Priority: Minor
>         Attachments: diff.txt
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The default ant target does not trigger generation of code from Cli.g and Cql.g
> The clean target does not remove generated files
> The targets gen-cli-grammar and gen-cql-grammar do not reference current locations of Cli.g and Cql.g
> Generated files are commited in svn repository (by mistake?)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CASSANDRA-40) Build does not handle ANTLR generated code properly

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-40?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis resolved CASSANDRA-40.
-------------------------------------

    Resolution: Fixed

applied

> Build does not handle ANTLR generated code properly
> ---------------------------------------------------
>
>                 Key: CASSANDRA-40
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-40
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Per Mellqvist
>            Priority: Minor
>         Attachments: diff.txt
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The default ant target does not trigger generation of code from Cli.g and Cql.g
> The clean target does not remove generated files
> The targets gen-cli-grammar and gen-cql-grammar do not reference current locations of Cli.g and Cql.g
> Generated files are commited in svn repository (by mistake?)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-40) Build does not handle ANTLR generated code properly

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-40?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12694978#action_12694978 ] 

Jonathan Ellis commented on CASSANDRA-40:
-----------------------------------------

IMO we should move generated code out of the main src/ tree too but as I have said before I am not a java build guru.  What's the best practice in these situations?

> Build does not handle ANTLR generated code properly
> ---------------------------------------------------
>
>                 Key: CASSANDRA-40
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-40
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Per Mellqvist
>            Priority: Minor
>         Attachments: diff.txt
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The default ant target does not trigger generation of code from Cli.g and Cql.g
> The clean target does not remove generated files
> The targets gen-cli-grammar and gen-cql-grammar do not reference current locations of Cli.g and Cql.g
> Generated files are commited in svn repository (by mistake?)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (CASSANDRA-40) Build does not handle ANTLR generated code properly

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-40?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis reassigned CASSANDRA-40:
---------------------------------------

    Assignee: Per Mellqvist

> Build does not handle ANTLR generated code properly
> ---------------------------------------------------
>
>                 Key: CASSANDRA-40
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-40
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Per Mellqvist
>            Assignee: Per Mellqvist
>            Priority: Minor
>         Attachments: diff.txt
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The default ant target does not trigger generation of code from Cli.g and Cql.g
> The clean target does not remove generated files
> The targets gen-cli-grammar and gen-cql-grammar do not reference current locations of Cli.g and Cql.g
> Generated files are commited in svn repository (by mistake?)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-40) Build does not handle ANTLR generated code properly

Posted by "Per Mellqvist (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-40?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695074#action_12695074 ] 

Per Mellqvist commented on CASSANDRA-40:
----------------------------------------

Jonathan - the NoClassDefFoundError is a separate issue (you would get the same problem even without the patch if you delete the generated sources).
I had to put some jars from an older revision back in the lib directory to run the gen-tasks

stringtemplate-3.0.jar
antlr-2.7.7.jar

They are both referenced in build.xml but were removed from the lib directory at some point.

> Build does not handle ANTLR generated code properly
> ---------------------------------------------------
>
>                 Key: CASSANDRA-40
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-40
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Per Mellqvist
>            Priority: Minor
>         Attachments: diff.txt
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The default ant target does not trigger generation of code from Cli.g and Cql.g
> The clean target does not remove generated files
> The targets gen-cli-grammar and gen-cql-grammar do not reference current locations of Cli.g and Cql.g
> Generated files are commited in svn repository (by mistake?)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-40) Build does not handle ANTLR generated code properly

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-40?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695042#action_12695042 ] 

Jonathan Ellis commented on CASSANDRA-40:
-----------------------------------------

That's because Thrift is, frankly, a bitch to build.

Building the antlr files should be easy since we just ship the relevant jars.  Or it should be. :)  I'm sure Per can fix the problem I'm seeing.

> Build does not handle ANTLR generated code properly
> ---------------------------------------------------
>
>                 Key: CASSANDRA-40
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-40
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Per Mellqvist
>            Priority: Minor
>         Attachments: diff.txt
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The default ant target does not trigger generation of code from Cli.g and Cql.g
> The clean target does not remove generated files
> The targets gen-cli-grammar and gen-cql-grammar do not reference current locations of Cli.g and Cql.g
> Generated files are commited in svn repository (by mistake?)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.