You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/05/07 08:45:12 UTC

[jira] [Commented] (GROOVY-7833) exception in phase 'conversion'

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

ASF GitHub Bot commented on GROOVY-7833:
----------------------------------------

GitHub user blackdrag opened a pull request:

    https://github.com/apache/groovy/pull/329

    GROOVY-7833: let grape ignore runner lines with hash to enable comments.

    When getting a groovy jar via grab, there will be a TestNG runner configuration in the jar. This configuration contains the Apache License 2 text, as required by the foundation. The code expected the class only. With this change the comments will be ignored.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/blackdrag/groovy patch-1

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/groovy/pull/329.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #329
    
----
commit faf48c4d89fb0c7999a7d1134f1d09b8eb815d81
Author: Jochen Theodorou <bl...@gmx.org>
Date:   2016-05-07T08:44:22Z

    GROOVY-7833: let grape ignore runner lines with hash to enable comments.
    
    When getting a groovy jar via grab, there will be a TestNG runner configuration in the jar. This configuration contains the Apache License 2 text, as required by the foundation. The code expected the class only. With this change the comments will be ignored.

----


> exception in phase 'conversion'
> -------------------------------
>
>                 Key: GROOVY-7833
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7833
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.4.6
>         Environment: Mac OS X 10.11.4 (15E65)
>            Reporter: Magnus Reftel
>
> The following script makes Grovy 2.4.6 exit with the message "Caught: BUG! exception in phase 'conversion' in source unit /path-to-code/conversion.groovy' # Licensed to the Apache Software Foundation (ASF) under one or more":
>      @GrabResolver(name='jenkins', root='http://repo.jenkins-ci.org/releases')
>     @Grapes([
>     @Grab(group='com.google.inject', module='guice', version='4.0-beta'),
>     @Grab(group='org.springframework', module='spring-beans', version='3.0.5.RELEASE'),
>     @Grab(group='org.jenkins-ci.main', module='jenkins-core', version='2.1')
>     ])
>     
>     import java.lang.String
> The stack trace prints when run with --debug is:
> BUG! exception in phase 'conversion' in source unit '/path-to-code/conversion.groovy' # Licensed to the Apache Software Foundation (ASF) under one or more
> 	at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:935)
> 	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:593)
> 	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569)
> 	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546)
> 	at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
> 	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
> 	at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
> 	at groovy.lang.GroovyShell.run(GroovyShell.java:517)
> 	at groovy.lang.GroovyShell.run(GroovyShell.java:507)
> 	at groovy.ui.GroovyMain.processOnce(GroovyMain.java:652)
> 	at groovy.ui.GroovyMain.run(GroovyMain.java:384)
> 	at groovy.ui.GroovyMain.process(GroovyMain.java:370)
> 	at groovy.ui.GroovyMain.processArgs(GroovyMain.java:129)
> 	at groovy.ui.GroovyMain.main(GroovyMain.java:109)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:497)
> 	at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:109)
> 	at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:131)
> Caused by: java.lang.ClassNotFoundException: # Licensed to the Apache Software Foundation (ASF) under one or more
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> 	at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:677)
> 	at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:787)
> 	at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:775)
> 	at groovy.lang.GroovyClassLoader$loadClass$0.call(Unknown Source)
> 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
> 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
> 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
> 	at groovy.grape.GrapeIvy$_processRunners_closure4.doCall(GrapeIvy.groovy:341)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:497)
> 	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
> 	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
> 	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
> 	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021)
> 	at groovy.lang.Closure.call(Closure.java:426)
> 	at groovy.lang.Closure.call(Closure.java:442)
> 	at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030)
> 	at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015)
> 	at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2056)
> 	at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source)
> 	at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
> 	at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
> 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
> 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
> 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
> 	at groovy.grape.GrapeIvy.processRunners(GrapeIvy.groovy:340)
> 	at groovy.grape.GrapeIvy$processRunners$3.callCurrent(Unknown Source)
> 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
> 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
> 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:182)
> 	at groovy.grape.GrapeIvy.processOtherServices(GrapeIvy.groovy:325)
> 	at groovy.grape.GrapeIvy$processOtherServices$2.callCurrent(Unknown Source)
> 	at groovy.grape.GrapeIvy.grab(GrapeIvy.groovy:266)
> 	at groovy.grape.Grape.grab(Grape.java:167)
> 	at groovy.grape.GrabAnnotationTransformation.visit(GrabAnnotationTransformation.java:378)
> 	at org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:321)
> 	at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:931)
> 	... 19 more



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)