Power asserts, Groovy, Eclipse and Gant

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Power asserts, Groovy, Eclipse and Gant

Russel Winder-2
Gant seems to compile and run its tests fine using IntelliJ IDEA.
Eclipse however is giving me a bit of grief.  I have (finally -- long
story) managed to upgrade my Eclipse installation.  Compilation of Gant
is fine, but the tests are showing some unexpected problems.
Exemplified by the stack trace below.  Now as far as I am aware
powerassert is a subpackage of org.codehaus.groovy.runtime, and there is
no package  org.codehaus.groovy.transform.powerassert.  So how can a
fully cleaned and recompiled project have any references to a package
that doesn't exist?  

        java.lang.NoClassDefFoundError: org/codehaus/groovy/transform/powerassert/ValueRecorder
        at gant.Gant.dispatch(Gant.groovy:418)
        at gant.Gant.this$2$dispatch(Gant.groovy)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:708)
        at gant.Gant.invokeMethod(Gant.groovy)
        at groovy.lang.GroovyObject$invokeMethod.callCurrent(Unknown Source)
        at gant.Gant.processTargets(Gant.groovy:579)
        at sun.reflect.GeneratedMethodAccessor67.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:266)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:51)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:155)
        at gant.Gant.processArgs(Gant.groovy:540)
        at org.codehaus.gant.tests.GantTestCase.processCmdLineTargets(GantTestCase.java:164)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:266)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:51)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:147)
        at org.codehaus.gant.tests.bugs.Assorted_Test.test_GANT_34_originalIvycachePathProblemFixed(Assorted_Test.groovy:88)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at junit.framework.TestCase.runTest(TestCase.java:168)
        at junit.framework.TestCase.runBare(TestCase.java:134)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:124)
        at junit.framework.TestSuite.runTest(TestSuite.java:232)
        at junit.framework.TestSuite.run(TestSuite.java:227)
        at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
        at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
        Caused by: java.lang.ClassNotFoundException: org.codehaus.groovy.transform.powerassert.ValueRecorder
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:334)
        ... 51 more
       


--
Russel.
=============================================================================
Dr Russel Winder      Partner
                                            xmpp: [hidden email]
Concertant LLP        t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,   f: +44 8700 516 084   voip: sip:[hidden email]
London SW11 1EN, UK   m: +44 7770 465 077   skype: russel_winder

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Power asserts, Groovy, Eclipse and Gant

Andy Clement
I see org.codehaus.groovy.transform.powerassert.ValueRecorder:

jar -tvf groovy-1.7.0.jar | grep ValueRecorder
  1249 Wed Dec 09 14:17:12 PST 2009
org/codehaus/groovy/transform/powerassert/ValueRecorder.class

let me extract Gant and see what happens.

Andy

On 19 March 2010 08:26, Russel Winder <[hidden email]> wrote:

> Gant seems to compile and run its tests fine using IntelliJ IDEA.
> Eclipse however is giving me a bit of grief.  I have (finally -- long
> story) managed to upgrade my Eclipse installation.  Compilation of Gant
> is fine, but the tests are showing some unexpected problems.
> Exemplified by the stack trace below.  Now as far as I am aware
> powerassert is a subpackage of org.codehaus.groovy.runtime, and there is
> no package  org.codehaus.groovy.transform.powerassert.  So how can a
> fully cleaned and recompiled project have any references to a package
> that doesn't exist?
>
>        java.lang.NoClassDefFoundError: org/codehaus/groovy/transform/powerassert/ValueRecorder
>                at gant.Gant.dispatch(Gant.groovy:418)
>                at gant.Gant.this$2$dispatch(Gant.groovy)
>                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>                at java.lang.reflect.Method.invoke(Method.java:616)
>                at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
>                at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
>                at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058)
>                at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
>                at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:708)
>                at gant.Gant.invokeMethod(Gant.groovy)
>                at groovy.lang.GroovyObject$invokeMethod.callCurrent(Unknown Source)
>                at gant.Gant.processTargets(Gant.groovy:579)
>                at sun.reflect.GeneratedMethodAccessor67.invoke(Unknown Source)
>                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>                at java.lang.reflect.Method.invoke(Method.java:616)
>                at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:266)
>                at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:51)
>                at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:155)
>                at gant.Gant.processArgs(Gant.groovy:540)
>                at org.codehaus.gant.tests.GantTestCase.processCmdLineTargets(GantTestCase.java:164)
>                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>                at java.lang.reflect.Method.invoke(Method.java:616)
>                at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:266)
>                at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:51)
>                at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
>                at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
>                at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:147)
>                at org.codehaus.gant.tests.bugs.Assorted_Test.test_GANT_34_originalIvycachePathProblemFixed(Assorted_Test.groovy:88)
>                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>                at java.lang.reflect.Method.invoke(Method.java:616)
>                at junit.framework.TestCase.runTest(TestCase.java:168)
>                at junit.framework.TestCase.runBare(TestCase.java:134)
>                at junit.framework.TestResult$1.protect(TestResult.java:110)
>                at junit.framework.TestResult.runProtected(TestResult.java:128)
>                at junit.framework.TestResult.run(TestResult.java:113)
>                at junit.framework.TestCase.run(TestCase.java:124)
>                at junit.framework.TestSuite.runTest(TestSuite.java:232)
>                at junit.framework.TestSuite.run(TestSuite.java:227)
>                at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
>                at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
>                at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
>                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
>                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
>                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
>        Caused by: java.lang.ClassNotFoundException: org.codehaus.groovy.transform.powerassert.ValueRecorder
>                at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
>                at java.security.AccessController.doPrivileged(Native Method)
>                at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>                at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
>                at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
>                at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
>                at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:334)
>                ... 51 more
>
>
>
> --
> Russel.
> =============================================================================
> Dr Russel Winder      Partner
>                                            xmpp: [hidden email]
> Concertant LLP        t: +44 20 7585 2200, +44 20 7193 9203
> 41 Buckmaster Road,   f: +44 8700 516 084   voip: sip:[hidden email]
> London SW11 1EN, UK   m: +44 7770 465 077   skype: russel_winder
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Power asserts, Groovy, Eclipse and Gant

Andrew Eisenberg
The problem might be that the package is not exported from the MANIFEST.MF.

On Fri, Mar 19, 2010 at 10:00 AM, Andy Clement <[hidden email]> wrote:

> I see org.codehaus.groovy.transform.powerassert.ValueRecorder:
>
> jar -tvf groovy-1.7.0.jar | grep ValueRecorder
>  1249 Wed Dec 09 14:17:12 PST 2009
> org/codehaus/groovy/transform/powerassert/ValueRecorder.class
>
> let me extract Gant and see what happens.
>
> Andy
>
> On 19 March 2010 08:26, Russel Winder <[hidden email]> wrote:
>> Gant seems to compile and run its tests fine using IntelliJ IDEA.
>> Eclipse however is giving me a bit of grief.  I have (finally -- long
>> story) managed to upgrade my Eclipse installation.  Compilation of Gant
>> is fine, but the tests are showing some unexpected problems.
>> Exemplified by the stack trace below.  Now as far as I am aware
>> powerassert is a subpackage of org.codehaus.groovy.runtime, and there is
>> no package  org.codehaus.groovy.transform.powerassert.  So how can a
>> fully cleaned and recompiled project have any references to a package
>> that doesn't exist?
>>
>>        java.lang.NoClassDefFoundError: org/codehaus/groovy/transform/powerassert/ValueRecorder
>>                at gant.Gant.dispatch(Gant.groovy:418)
>>                at gant.Gant.this$2$dispatch(Gant.groovy)
>>                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>                at java.lang.reflect.Method.invoke(Method.java:616)
>>                at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
>>                at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
>>                at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058)
>>                at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
>>                at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:708)
>>                at gant.Gant.invokeMethod(Gant.groovy)
>>                at groovy.lang.GroovyObject$invokeMethod.callCurrent(Unknown Source)
>>                at gant.Gant.processTargets(Gant.groovy:579)
>>                at sun.reflect.GeneratedMethodAccessor67.invoke(Unknown Source)
>>                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>                at java.lang.reflect.Method.invoke(Method.java:616)
>>                at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:266)
>>                at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:51)
>>                at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:155)
>>                at gant.Gant.processArgs(Gant.groovy:540)
>>                at org.codehaus.gant.tests.GantTestCase.processCmdLineTargets(GantTestCase.java:164)
>>                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>                at java.lang.reflect.Method.invoke(Method.java:616)
>>                at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:266)
>>                at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:51)
>>                at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
>>                at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
>>                at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:147)
>>                at org.codehaus.gant.tests.bugs.Assorted_Test.test_GANT_34_originalIvycachePathProblemFixed(Assorted_Test.groovy:88)
>>                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>                at java.lang.reflect.Method.invoke(Method.java:616)
>>                at junit.framework.TestCase.runTest(TestCase.java:168)
>>                at junit.framework.TestCase.runBare(TestCase.java:134)
>>                at junit.framework.TestResult$1.protect(TestResult.java:110)
>>                at junit.framework.TestResult.runProtected(TestResult.java:128)
>>                at junit.framework.TestResult.run(TestResult.java:113)
>>                at junit.framework.TestCase.run(TestCase.java:124)
>>                at junit.framework.TestSuite.runTest(TestSuite.java:232)
>>                at junit.framework.TestSuite.run(TestSuite.java:227)
>>                at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
>>                at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
>>                at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>>                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
>>                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
>>                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
>>                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
>>        Caused by: java.lang.ClassNotFoundException: org.codehaus.groovy.transform.powerassert.ValueRecorder
>>                at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
>>                at java.security.AccessController.doPrivileged(Native Method)
>>                at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>>                at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
>>                at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
>>                at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
>>                at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:334)
>>                ... 51 more
>>
>>
>>
>> --
>> Russel.
>> =============================================================================
>> Dr Russel Winder      Partner
>>                                            xmpp: [hidden email]
>> Concertant LLP        t: +44 20 7585 2200, +44 20 7193 9203
>> 41 Buckmaster Road,   f: +44 8700 516 084   voip: sip:[hidden email]
>> London SW11 1EN, UK   m: +44 7770 465 077   skype: russel_winder
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Power asserts, Groovy, Eclipse and Gant

Andy Clement
I tried extracting gant to build it - wanted to run gradlew to extract
the necessary dependencies. unfortunately:

gradlew
Downloading http://dist.codehaus.org/gradle/gradle-0.9-20100226145830+1100-bin.zip

Exception in thread "main" java.io.FileNotFoundException:
http://dist.codehaus.org/gradle/gradle-0.9-20100226145830+1100-bin.zip
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1168)
        at org.gradle.wrapper.Download.downloadInternal(Download.java:48)
        at org.gradle.wrapper.Download.download(Download.java:36)
        at org.gradle.wrapper.Install.createDist(Install.java:59)
        at org.gradle.wrapper.Wrapper.execute(Wrapper.java:45)
        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:39)

I changed build.gradle to 0.8 instead of that dev build, but it
doesn't seem to make any difference and still tried to go for that 0.9
build.

Andy

On 19 March 2010 10:16, Andrew Eisenberg <[hidden email]> wrote:

> The problem might be that the package is not exported from the MANIFEST.MF.
>
> On Fri, Mar 19, 2010 at 10:00 AM, Andy Clement <[hidden email]> wrote:
>> I see org.codehaus.groovy.transform.powerassert.ValueRecorder:
>>
>> jar -tvf groovy-1.7.0.jar | grep ValueRecorder
>>  1249 Wed Dec 09 14:17:12 PST 2009
>> org/codehaus/groovy/transform/powerassert/ValueRecorder.class
>>
>> let me extract Gant and see what happens.
>>
>> Andy
>>
>> On 19 March 2010 08:26, Russel Winder <[hidden email]> wrote:
>>> Gant seems to compile and run its tests fine using IntelliJ IDEA.
>>> Eclipse however is giving me a bit of grief.  I have (finally -- long
>>> story) managed to upgrade my Eclipse installation.  Compilation of Gant
>>> is fine, but the tests are showing some unexpected problems.
>>> Exemplified by the stack trace below.  Now as far as I am aware
>>> powerassert is a subpackage of org.codehaus.groovy.runtime, and there is
>>> no package  org.codehaus.groovy.transform.powerassert.  So how can a
>>> fully cleaned and recompiled project have any references to a package
>>> that doesn't exist?
>>>
>>>        java.lang.NoClassDefFoundError: org/codehaus/groovy/transform/powerassert/ValueRecorder
>>>                at gant.Gant.dispatch(Gant.groovy:418)
>>>                at gant.Gant.this$2$dispatch(Gant.groovy)
>>>                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>                at java.lang.reflect.Method.invoke(Method.java:616)
>>>                at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
>>>                at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
>>>                at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058)
>>>                at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
>>>                at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:708)
>>>                at gant.Gant.invokeMethod(Gant.groovy)
>>>                at groovy.lang.GroovyObject$invokeMethod.callCurrent(Unknown Source)
>>>                at gant.Gant.processTargets(Gant.groovy:579)
>>>                at sun.reflect.GeneratedMethodAccessor67.invoke(Unknown Source)
>>>                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>                at java.lang.reflect.Method.invoke(Method.java:616)
>>>                at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:266)
>>>                at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:51)
>>>                at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:155)
>>>                at gant.Gant.processArgs(Gant.groovy:540)
>>>                at org.codehaus.gant.tests.GantTestCase.processCmdLineTargets(GantTestCase.java:164)
>>>                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>                at java.lang.reflect.Method.invoke(Method.java:616)
>>>                at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:266)
>>>                at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:51)
>>>                at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
>>>                at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
>>>                at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:147)
>>>                at org.codehaus.gant.tests.bugs.Assorted_Test.test_GANT_34_originalIvycachePathProblemFixed(Assorted_Test.groovy:88)
>>>                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>                at java.lang.reflect.Method.invoke(Method.java:616)
>>>                at junit.framework.TestCase.runTest(TestCase.java:168)
>>>                at junit.framework.TestCase.runBare(TestCase.java:134)
>>>                at junit.framework.TestResult$1.protect(TestResult.java:110)
>>>                at junit.framework.TestResult.runProtected(TestResult.java:128)
>>>                at junit.framework.TestResult.run(TestResult.java:113)
>>>                at junit.framework.TestCase.run(TestCase.java:124)
>>>                at junit.framework.TestSuite.runTest(TestSuite.java:232)
>>>                at junit.framework.TestSuite.run(TestSuite.java:227)
>>>                at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
>>>                at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
>>>                at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>>>                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
>>>                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
>>>                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
>>>                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
>>>        Caused by: java.lang.ClassNotFoundException: org.codehaus.groovy.transform.powerassert.ValueRecorder
>>>                at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
>>>                at java.security.AccessController.doPrivileged(Native Method)
>>>                at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>>>                at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
>>>                at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
>>>                at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
>>>                at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:334)
>>>                ... 51 more
>>>
>>>
>>>
>>> --
>>> Russel.
>>> =============================================================================
>>> Dr Russel Winder      Partner
>>>                                            xmpp: [hidden email]
>>> Concertant LLP        t: +44 20 7585 2200, +44 20 7193 9203
>>> 41 Buckmaster Road,   f: +44 8700 516 084   voip: sip:[hidden email]
>>> London SW11 1EN, UK   m: +44 7770 465 077   skype: russel_winder
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Power asserts, Groovy, Eclipse and Gant

Matthew Passell
Andy, do you guys have contact info for Hans Dockter or anyone else working on Gradle.  If not, I can probably track it down and send it to you. (Oh, I bet Russel has it as well!)

--Matt

On Fri, Mar 19, 2010 at 1:21 PM, Andy Clement <[hidden email]> wrote:
I tried extracting gant to build it - wanted to run gradlew to extract
the necessary dependencies. unfortunately:

gradlew
Downloading http://dist.codehaus.org/gradle/gradle-0.9-20100226145830+1100-bin.zip

Exception in thread "main" java.io.FileNotFoundException:
http://dist.codehaus.org/gradle/gradle-0.9-20100226145830+1100-bin.zip
       at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1168)
       at org.gradle.wrapper.Download.downloadInternal(Download.java:48)
       at org.gradle.wrapper.Download.download(Download.java:36)
       at org.gradle.wrapper.Install.createDist(Install.java:59)
       at org.gradle.wrapper.Wrapper.execute(Wrapper.java:45)
       at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:39)

I changed build.gradle to 0.8 instead of that dev build, but it
doesn't seem to make any difference and still tried to go for that 0.9
build.

Andy

On 19 March 2010 10:16, Andrew Eisenberg <[hidden email]> wrote:
> The problem might be that the package is not exported from the MANIFEST.MF.
>
> On Fri, Mar 19, 2010 at 10:00 AM, Andy Clement <[hidden email]> wrote:
>> I see org.codehaus.groovy.transform.powerassert.ValueRecorder:
>>
>> jar -tvf groovy-1.7.0.jar | grep ValueRecorder
>>  1249 Wed Dec 09 14:17:12 PST 2009
>> org/codehaus/groovy/transform/powerassert/ValueRecorder.class
>>
>> let me extract Gant and see what happens.
>>
>> Andy
>>
>> On 19 March 2010 08:26, Russel Winder <[hidden email]> wrote:
>>> Gant seems to compile and run its tests fine using IntelliJ IDEA.
>>> Eclipse however is giving me a bit of grief.  I have (finally -- long
>>> story) managed to upgrade my Eclipse installation.  Compilation of Gant
>>> is fine, but the tests are showing some unexpected problems.
>>> Exemplified by the stack trace below.  Now as far as I am aware
>>> powerassert is a subpackage of org.codehaus.groovy.runtime, and there is
>>> no package  org.codehaus.groovy.transform.powerassert.  So how can a
>>> fully cleaned and recompiled project have any references to a package
>>> that doesn't exist?
>>>
>>>        java.lang.NoClassDefFoundError: org/codehaus/groovy/transform/powerassert/ValueRecorder
>>>                at gant.Gant.dispatch(Gant.groovy:418)
>>>                at gant.Gant.this$2$dispatch(Gant.groovy)
>>>                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>                at java.lang.reflect.Method.invoke(Method.java:616)
>>>                at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
>>>                at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
>>>                at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058)
>>>                at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
>>>                at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:708)
>>>                at gant.Gant.invokeMethod(Gant.groovy)
>>>                at groovy.lang.GroovyObject$invokeMethod.callCurrent(Unknown Source)
>>>                at gant.Gant.processTargets(Gant.groovy:579)
>>>                at sun.reflect.GeneratedMethodAccessor67.invoke(Unknown Source)
>>>                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>                at java.lang.reflect.Method.invoke(Method.java:616)
>>>                at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:266)
>>>                at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:51)
>>>                at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:155)
>>>                at gant.Gant.processArgs(Gant.groovy:540)
>>>                at org.codehaus.gant.tests.GantTestCase.processCmdLineTargets(GantTestCase.java:164)
>>>                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>                at java.lang.reflect.Method.invoke(Method.java:616)
>>>                at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:266)
>>>                at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:51)
>>>                at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
>>>                at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
>>>                at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:147)
>>>                at org.codehaus.gant.tests.bugs.Assorted_Test.test_GANT_34_originalIvycachePathProblemFixed(Assorted_Test.groovy:88)
>>>                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>                at java.lang.reflect.Method.invoke(Method.java:616)
>>>                at junit.framework.TestCase.runTest(TestCase.java:168)
>>>                at junit.framework.TestCase.runBare(TestCase.java:134)
>>>                at junit.framework.TestResult$1.protect(TestResult.java:110)
>>>                at junit.framework.TestResult.runProtected(TestResult.java:128)
>>>                at junit.framework.TestResult.run(TestResult.java:113)
>>>                at junit.framework.TestCase.run(TestCase.java:124)
>>>                at junit.framework.TestSuite.runTest(TestSuite.java:232)
>>>                at junit.framework.TestSuite.run(TestSuite.java:227)
>>>                at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
>>>                at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
>>>                at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>>>                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
>>>                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
>>>                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
>>>                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
>>>        Caused by: java.lang.ClassNotFoundException: org.codehaus.groovy.transform.powerassert.ValueRecorder
>>>                at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
>>>                at java.security.AccessController.doPrivileged(Native Method)
>>>                at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>>>                at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
>>>                at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
>>>                at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
>>>                at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:334)
>>>                ... 51 more
>>>
>>>
>>>
>>> --
>>> Russel.
>>> =============================================================================
>>> Dr Russel Winder      Partner
>>>                                            xmpp: [hidden email]
>>> Concertant LLP        t: +44 20 7585 2200, +44 20 7193 9203
>>> 41 Buckmaster Road,   f: +44 8700 516 084   voip: [hidden email]
>>> London SW11 1EN, UK   m: +44 7770 465 077   skype: russel_winder
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email
Reply | Threaded
Open this post in threaded view
|

Re: Power asserts, Groovy, Eclipse and Gant

Russel Winder-2
In reply to this post by Andy Clement
Andy,

On Fri, 2010-03-19 at 10:00 -0700, Andy Clement wrote:
> I see org.codehaus.groovy.transform.powerassert.ValueRecorder:
>
> jar -tvf groovy-1.7.0.jar | grep ValueRecorder
>   1249 Wed Dec 09 14:17:12 PST 2009
> org/codehaus/groovy/transform/powerassert/ValueRecorder.class
>
> let me extract Gant and see what happens.

Aha.  So the class was in one package for Groovy 1.7.0 and is in a
different package in Trunk.  Being the blood-spattered cutting-edger
that I am, I am running Trunk as 1.8.0-beta-1-SNAPSHOT which I install
into my local Maven cache so it is available.

It seems then that although I have specified the 1.8.0-beta-1-SNAPSHOT
from the Maven repository as the version of Groovy to use for the
project, there is some usage somehow of the Groovy 1.7.0 that comes with
the Groovy plugin.  This means I must be highlighting a bug in the
plugin :-(

If you pick up Gant from the Git repository, you should get my current
version of the Eclipse project data.

--
Russel.
=============================================================================
Dr Russel Winder      Partner
                                            xmpp: [hidden email]
Concertant LLP        t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,   f: +44 8700 516 084   voip: sip:[hidden email]
London SW11 1EN, UK   m: +44 7770 465 077   skype: russel_winder

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Power asserts, Groovy, Eclipse and Gant

Russel Winder-2
In reply to this post by Andy Clement
On Fri, 2010-03-19 at 10:21 -0700, Andy Clement wrote:
> I tried extracting gant to build it - wanted to run gradlew to extract
> the necessary dependencies. unfortunately:
>
> gradlew
> Downloading http://dist.codehaus.org/gradle/gradle-0.9-20100226145830+1100-bin.zip

It seems there is a bug in the Gradle wrapper task.  It fails to write
the correct repository URL in the control file:


diff --git a/wrapper/gradle-wrapper.properties
b/wrapper/gradle-wrapper.properties
index 15e5a48..49d2aab 100644
--- a/wrapper/gradle-wrapper.properties
+++ b/wrapper/gradle-wrapper.properties
@@ -4,6 +4,6 @@ distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 distributionVersion=0.9-20100226145830+1100
 zipStorePath=wrapper/dists
-urlRoot=http\://dist.codehaus.org/gradle
+urlRoot=http\://snapshots.dist.codehaus.org/gradle
 distributionName=gradle
 distributionClassifier=bin


I have committed this up to the repository.  Sorry about that.


> Exception in thread "main" java.io.FileNotFoundException:
> http://dist.codehaus.org/gradle/gradle-0.9-20100226145830+1100-bin.zip
>         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1168)
>         at org.gradle.wrapper.Download.downloadInternal(Download.java:48)
>         at org.gradle.wrapper.Download.download(Download.java:36)
>         at org.gradle.wrapper.Install.createDist(Install.java:59)
>         at org.gradle.wrapper.Wrapper.execute(Wrapper.java:45)
>         at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:39)
>
> I changed build.gradle to 0.8 instead of that dev build, but it
> doesn't seem to make any difference and still tried to go for that 0.9
> build.
build.gradle specifies what to do to generate the wrapper information it
isn't actually the wrapper version data.  So changing it doesn't change
the way the wrapper behaves.  If you pull from the Git repository it
should now work properly as I have committed the above patch.

The Gant build actually requires a recent 0.9 Gradle so trying with 0.8
will lead to errors and anger.

NB  The Gradle build currently fails on 8 tests as there is something
add happening with the Ant spawning that results in failed tests.

--
Russel.
=============================================================================
Dr Russel Winder      Partner
                                            xmpp: [hidden email]
Concertant LLP        t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,   f: +44 8700 516 084   voip: sip:[hidden email]
London SW11 1EN, UK   m: +44 7770 465 077   skype: russel_winder

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Power asserts, Groovy, Eclipse and Gant

Andy Clement
In reply to this post by Russel Winder-2
> It seems then that although I have specified the 1.8.0-beta-1-SNAPSHOT
> from the Maven repository as the version of Groovy to use for the
> project, there is some usage somehow of the Groovy 1.7.0 that comes with
> the Groovy plugin.  This means I must be highlighting a bug in the
> plugin :-(

What does it say under Groovy Libraries in the eclipse Gant project
you have created? Does it reference the 1.8 version?

The Ast transform picked up for power asserts is generating references
to old code.

Andy

On 19 March 2010 11:40, Russel Winder <[hidden email]> wrote:

> Andy,
>
> On Fri, 2010-03-19 at 10:00 -0700, Andy Clement wrote:
>> I see org.codehaus.groovy.transform.powerassert.ValueRecorder:
>>
>> jar -tvf groovy-1.7.0.jar | grep ValueRecorder
>>   1249 Wed Dec 09 14:17:12 PST 2009
>> org/codehaus/groovy/transform/powerassert/ValueRecorder.class
>>
>> let me extract Gant and see what happens.
>
> Aha.  So the class was in one package for Groovy 1.7.0 and is in a
> different package in Trunk.  Being the blood-spattered cutting-edger
> that I am, I am running Trunk as 1.8.0-beta-1-SNAPSHOT which I install
> into my local Maven cache so it is available.
>

>
> If you pick up Gant from the Git repository, you should get my current
> version of the Eclipse project data.
>
> --
> Russel.
> =============================================================================
> Dr Russel Winder      Partner
>                                            xmpp: [hidden email]
> Concertant LLP        t: +44 20 7585 2200, +44 20 7193 9203
> 41 Buckmaster Road,   f: +44 8700 516 084   voip: sip:[hidden email]
> London SW11 1EN, UK   m: +44 7770 465 077   skype: russel_winder
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Power asserts, Groovy, Eclipse and Gant

Peter Niederwieser
Administrator
This post has NOT been accepted by the mailing list yet.
In reply to this post by Russel Winder-2
Russel Winder-2 wrote
Aha.  So the class was in one package for Groovy 1.7.0 and is in a different package in Trunk.
Correct. Because power asserts are no longer based on a transform, package org.codehaus.groovy.transform.powerassert was renamed to org.codehaus.groovy.runtime.powerassert in trunk.

Cheers,
Peter
Reply | Threaded
Open this post in threaded view
|

Re: Power asserts, Groovy, Eclipse and Gant

Russel Winder-2
In reply to this post by Andy Clement
Andy,

On Fri, 2010-03-19 at 11:54 -0700, Andy Clement wrote:
> > It seems then that although I have specified the 1.8.0-beta-1-SNAPSHOT
> > from the Maven repository as the version of Groovy to use for the
> > project, there is some usage somehow of the Groovy 1.7.0 that comes with
> > the Groovy plugin.  This means I must be highlighting a bug in the
> > plugin :-(
>
> What does it say under Groovy Libraries in the eclipse Gant project
> you have created? Does it reference the 1.8 version?

I don't have a "Groovy Libraries" entry anywhere as far as I know.  In
the "Java Build Path" dialogue I explicitly list each jar separately.
The "Referenced Libraries" in the "Package Explorer" lists everything
correctly.

So as far as I can see there is no reference to anything other than
groovy-all-1.8.0-beta-1-SNAPSHOT.jar.

> The Ast transform picked up for power asserts is generating references
> to old code.

So the question is which Groovy jar is it using and why isn't it using
the one I tell it?

I guess the point is that I have set up a dependency list that is at
odds with assumptions being made by the Groovy plugin?

--
Russel.
=============================================================================
Dr Russel Winder      Partner
                                            xmpp: [hidden email]
Concertant LLP        t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,   f: +44 8700 516 084   voip: sip:[hidden email]
London SW11 1EN, UK   m: +44 7770 465 077   skype: russel_winder

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Power asserts, Groovy, Eclipse and Gant

Russel Winder-2
Andy,

Hummm... there must have been some form of hysteresis effect.  I just
started Eclipse afresh, cleaned and rebuilt and the problem has gone
away, all the tests now pass (*).

This is weird.  where the problem was reproducible, now it isn't.

I'm sorry.  But then my panic is over :-)

(*) Not entirely true, I have one error with a "modified in the future"
warning, which is bizarre as the NFS server gives exactly the same time
as the workstation . . .  (not an Eclipse of Groovy problem).

--
Russel.
=============================================================================
Dr Russel Winder      Partner
                                            xmpp: [hidden email]
Concertant LLP        t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,   f: +44 8700 516 084   voip: sip:[hidden email]
London SW11 1EN, UK   m: +44 7770 465 077   skype: russel_winder

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Power asserts, Groovy, Eclipse and . . .

Russel Winder-2
Andy,

I suspect you are not going to believe this but it is true.

I just opened the GPars project built that and tried running its tests
and I am getting the problem of the mismatched package for the
ValueRecorder class.  So it is clearly not a project issue or Groovy
plugin problem per se but there is something about the way the plugin is
working on my Eclipse installation (on Ubuntu Lucid) that is weird.

I will try and do a few things in the hope that it is not
reproducible . . .

--
Russel.
=============================================================================
Dr Russel Winder      Partner
                                            xmpp: [hidden email]
Concertant LLP        t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,   f: +44 8700 516 084   voip: sip:[hidden email]
London SW11 1EN, UK   m: +44 7770 465 077   skype: russel_winder

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Power asserts, Groovy, Eclipse and . . .

Russel Winder-2
On Fri, 2010-03-19 at 20:06 +0000, Russel Winder wrote:

> Andy,
>
> I suspect you are not going to believe this but it is true.
>
> I just opened the GPars project built that and tried running its tests
> and I am getting the problem of the mismatched package for the
> ValueRecorder class.  So it is clearly not a project issue or Groovy
> plugin problem per se but there is something about the way the plugin is
> working on my Eclipse installation (on Ubuntu Lucid) that is weird.
>
> I will try and do a few things in the hope that it is not
> reproducible . . .
Also I have managed to get the problem reproducibly in Gant again.

I am fairly certain that the is assumption being made by the Groovy
plugin that I am not following.  The problem I am having experimenting
is that Eclipse seems to be somewhat unstable in terms of behaviour over
compiling and testing -- in particular classpath issues seem to require
cleaning, closing and reopening the project and even then weirdnesses
happen.

Perhaps I am just not good enough an Eclipse driver . . .
 

--
Russel.
=============================================================================
Dr Russel Winder      Partner
                                            xmpp: [hidden email]
Concertant LLP        t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,   f: +44 8700 516 084   voip: sip:[hidden email]
London SW11 1EN, UK   m: +44 7770 465 077   skype: russel_winder

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Power asserts, Groovy, Eclipse and . . .

Andy Clement
Hi Russel,

Right I've put some proper thought into this.  Groovy-Eclipse does not
allow you to plugin the version of the compiler you want to use - it
allows you to plugin the runtime libraries that you depend on.  This
is following the Java model - you cannot tell eclipse to use a
different java compiler, it is baked in.  That is why we offer a
groovy 1.6 plugin and a groovy 1.7 plugin - and if you need
compilation with groovy 1.8 there will need to be a groovy 1.8 plugin.
 You are particularly suffering here because you are using a built in
Ast transform that has changed what it does between 1.7 and 1.8
(changing the dependencies it generates).  This would all be addressed
if groovy supported the necessary source/target flags for the
different compiler levels.  Groovy-Eclipse would always support the
latest and you would use flags to specify compatibility with the
previous level.  I've mentioned before that this isn't trivial though
and here we have a case where the implementation of power assert would
have to conditionally (based on the source/target levels) create code
that used different dependencies - the older package structure for
1.7, then newer for 1.8.

Ast transforms are horrible (for me as a compiler embedder) because
they blur the line between compilation and runtime because they tend
to be entities in the project classpath that influence the compilation
process.  I can imagine there is a race in there and the version of
power assert will either be from the runtime (so a 1.8
implementation), or from the compiler (so a 1.7 implementation).

What do you need from 1.8?  The plugin for 1.8 is not something we are
looking to do anytime soon... unless users start requesting it in
greater numbers.  Even if you could drop it in (which you could try by
replacing the version in the org.codehaus.groovy plugin), you would be
missing all the patches we make to it for it to behave properly in
eclipse - more recoverable parsing, more pluggable type resolution,
etc).

You could raise a Jira for 1.8 support and we can see how many votes
it collects.

cheers,
Andy

On 20 March 2010 02:58, Russel Winder <[hidden email]> wrote:

> On Fri, 2010-03-19 at 20:06 +0000, Russel Winder wrote:
>> Andy,
>>
>> I suspect you are not going to believe this but it is true.
>>
>> I just opened the GPars project built that and tried running its tests
>> and I am getting the problem of the mismatched package for the
>> ValueRecorder class.  So it is clearly not a project issue or Groovy
>> plugin problem per se but there is something about the way the plugin is
>> working on my Eclipse installation (on Ubuntu Lucid) that is weird.
>>
>> I will try and do a few things in the hope that it is not
>> reproducible . . .
>
> Also I have managed to get the problem reproducibly in Gant again.
>
> I am fairly certain that the is assumption being made by the Groovy
> plugin that I am not following.  The problem I am having experimenting
> is that Eclipse seems to be somewhat unstable in terms of behaviour over
> compiling and testing -- in particular classpath issues seem to require
> cleaning, closing and reopening the project and even then weirdnesses
> happen.
>
> Perhaps I am just not good enough an Eclipse driver . . .
>
>
> --
> Russel.
> =============================================================================
> Dr Russel Winder      Partner
>                                            xmpp: [hidden email]
> Concertant LLP        t: +44 20 7585 2200, +44 20 7193 9203
> 41 Buckmaster Road,   f: +44 8700 516 084   voip: sip:[hidden email]
> London SW11 1EN, UK   m: +44 7770 465 077   skype: russel_winder
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Power asserts, Groovy, Eclipse and . . .

Russel Winder-2
Andy,

Thanks for thinking about this.  Stuff is now beginning to make much
more sense :-)  However, . . .

On Sun, 2010-03-21 at 09:55 -0700, Andy Clement wrote:

> Hi Russel,
>
> Right I've put some proper thought into this.  Groovy-Eclipse does not
> allow you to plugin the version of the compiler you want to use - it
> allows you to plugin the runtime libraries that you depend on.  This
> is following the Java model - you cannot tell eclipse to use a
> different java compiler, it is baked in.  That is why we offer a
> groovy 1.6 plugin and a groovy 1.7 plugin - and if you need
> compilation with groovy 1.8 there will need to be a groovy 1.8 plugin.
>  You are particularly suffering here because you are using a built in
> Ast transform that has changed what it does between 1.7 and 1.8
> (changing the dependencies it generates).  This would all be addressed
> if groovy supported the necessary source/target flags for the
> different compiler levels.  Groovy-Eclipse would always support the
> latest and you would use flags to specify compatibility with the
> previous level.  I've mentioned before that this isn't trivial though
> and here we have a case where the implementation of power assert would
> have to conditionally (based on the source/target levels) create code
> that used different dependencies - the older package structure for
> 1.7, then newer for 1.8.
I guess my problem is that I had to add a Groovy Jar to the class path
in order for the compilation to complete -- without this I just got a
message about incomplete classpath and no Groovy classes.  This implied
to me that the version of Groovy was a free variable.  I guess I must
have damaged or not properly created the right connection to the
allowable Groovy plugin compiler.

I removed the groovy-all-1.8.0-beta-1.jar from the classpath, now
nothing compiles.  I added the GROOVY_RUNTIME library but it says it is
unbound.  If the groovy-all to use is required to be 1.6.8 or 1.7.1 (or
whatever) then surely this should be forcibly bound to one or the other
rather than appearing to be a free variable?

> Ast transforms are horrible (for me as a compiler embedder) because
> they blur the line between compilation and runtime because they tend
> to be entities in the project classpath that influence the compilation
> process.  I can imagine there is a race in there and the version of
> power assert will either be from the runtime (so a 1.8
> implementation), or from the compiler (so a 1.7 implementation).

Fortunately this change in the AST implementation has brought to light
my complete misunderstanding of the way the plugin is using groovy-all.
This is good.  Even if it is bad :-)

> What do you need from 1.8?  The plugin for 1.8 is not something we are
> looking to do anytime soon... unless users start requesting it in
> greater numbers.  Even if you could drop it in (which you could try by
> replacing the version in the org.codehaus.groovy plugin), you would be
> missing all the patches we make to it for it to behave properly in
> eclipse - more recoverable parsing, more pluggable type resolution,
> etc).

I keep Gant working compiled against 1.6.8, 1.7.1 and trunk.  All
development work happens against trunk with CI tests always running
against both 1.6.8 and 1.7.1 -- well it would if I could get Gradle to
run the tests properly.

Something similar is happening for GPars as well.

This means being able to use any and/or all of 1.6.8, 1.7.1 and trunk
from within Eclipse is a real need for me.

> You could raise a Jira for 1.8 support and we can see how many votes
> it collects.

I'm afraid I will be doing that.  Sorry.

--
Russel.
=============================================================================
Dr Russel Winder      Partner
                                            xmpp: [hidden email]
Concertant LLP        t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,   f: +44 8700 516 084   voip: sip:[hidden email]
London SW11 1EN, UK   m: +44 7770 465 077   skype: russel_winder

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Power asserts, Groovy, Eclipse and . . .

Andy Clement
> I guess my problem is that I had to add a Groovy Jar to the class path
> in order for the compilation to complete -- without this I just got a
> message about incomplete classpath and no Groovy classes.  This implied
> to me that the version of Groovy was a free variable.  I guess I must
> have damaged or not properly created the right connection to the
> allowable Groovy plugin compiler.
>
> I removed the groovy-all-1.8.0-beta-1.jar from the classpath, now
> nothing compiles.  I added the GROOVY_RUNTIME library but it says it is
> unbound.  If the groovy-all to use is required to be 1.6.8 or 1.7.1 (or
> whatever) then surely this should be forcibly bound to one or the other
> rather than appearing to be a free variable?

Depending on what you need, you may be free to use a different runtime
library.  Groovy-Eclipse is a 1.7.0 groovy compiler, it does not even
use 1.7.1 as I was waiting for 1.7.2 which initially looked like it
would be out quickly after 1.7.0.  However, that doesn't necessarily
force use of a 1.7.0 runtime library.  Suppose you knew of some fixes
in 1.7.1 (in the runtime library classes) or you wanted to try out a
fix in the 1.7.2 runtime libraries.  You could switch to depending on
that version and try it out.  Similar to the flexibility you have for
java projects when you can choose the JRE runtime classes you wish to
depend upon.  What I would not recommend is switching to a new level
of groovy - like changing to the 1.8 runtime library - but I'm only
suggesting that now because it looks like groovy has breaking changes
across levels.  We could police this more if breakages are going to be
a regular thing.  Similarly when you will be using the 1.8 compiler
(that we don't support yet) you can't switch from a 1.8 set of runtime
libraries back to 1.7 - because of this power assert issue (and
perhaps others).

Contrast that with Java, in my Java projects I'm free to change the
JRE runtime dependency from 1.4/1.5/1.6 or whatever.  If you use the
1.6 compiler it doesn't stop you from using the 1.5 libraries.  But
they aren't moving as fast as groovy and introducing breaking changes
like what has happened to power assert.  If you were using new-to-Java
1.6 classes in your project and you depended on the 1.5 runtime, you
would get appropriate errors.  Ast transforms are perhaps a sneaky way
to cause this problem that we don't check enough.

> Fortunately this change in the AST implementation has brought to light
> my complete misunderstanding of the way the plugin is using groovy-all.
> This is good.  Even if it is bad :-)

I wish the libraries were packaged differently - the inclusion of the
compiler and runtime libraries in one big lump does confuse the issue
as it can make you think switching to a new big jar will change the
compiler used.  Hopefully with the repackaging effort underway for
future groovy's this can be brought out more in groovy itself (eg.
groovytools for compiler, groovyrt.jar for runtime), then it will be
much more obvious that you are only changing the runtime dependencies
when you switch between groovyrt's.

>> You could raise a Jira for 1.8 support and we can see how many votes
>> it collects.
>
> I'm afraid I will be doing that.  Sorry.

that's fine - we just need to know people need the support and it will
come onto the radar, you are the first person to ask for 1.8 - I will
say it will probably need a few more than 1 to get it out soon...as we
have Eclipse 3.6 support becoming more pressing.

At some point we will have to look at how serious the groovy team are
about source/target options in groovy itself.  If that doesn't look
like it is going to come to life we will have to define some huge
interface incorporating every interaction eclipse has with groovyc so
that we can plugin different implementations (1.6>1.8 or whatever).
This would be a massive job so I didn't really want to go down that
route unless we have to.

cheers
Andy

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email