[jira] [Comment Edited] (GROOVY-6453) groovysh in Windows 7/8/10 doesn't support arrow keys and Del
[ https://issues.apache.org/jira/browse/GROOVY-6453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1760#comment-1760 ] Guy Rouillier edited comment on GROOVY-6453 at 10/29/18 5:42 AM: - Found this via search. I'm on Windows 7 64-bit, and tried both groovy-2.6.0-alpha-3 and groovy-3.0.0-alpha-3. Cursor keys are not working in either one. I'm surprised to see this issue is now 5 years old. Is there some basic restriction preventing this from being corrected in groovysh? I tried creating a groovy.rc file containing the contents from the previous post by Dariusz Antoniuk, but don't know where to put it. I tried in \groovy-3.0.0-alpha-3\bin, \groovy-3.0.0-alpha-3\conf, and C:\Users\\.groovy, and it still didn't work. [UPDATE] Found this post that says the file to update is actually groovysh.rc. https://stackoverflow.com/questions/52898321/groovysh-rc-file-breaks-groovysh-evaluate-switch So I updated that in my home directory. Now I'm getting a NullPointerException: D:\>groovysh Picked up JAVA_TOOL_OPTIONS: -Duser.timezone=GMT FATAL: java.lang.NullPointerException java.lang.NullPointerException at java.util.concurrent.ConcurrentHashMap.replaceNode(ConcurrentHashMap.java:1106) at java.util.concurrent.ConcurrentHashMap.remove(ConcurrentHashMap.java:1097) at org.codehaus.groovy.runtime.memoize.UnlimitedConcurrentCache.remove(UnlimitedConcurrentCache.java:70) at groovy.lang.GroovyClassLoader.removeClassCacheEntry(GroovyClassLoader.java:640) 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:498) at org.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite.doInvoke(PlainObjectMetaMethodSite.jav at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(P ethodSite.java:213) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:55) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128) at org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:96) at org.codehaus.groovy.tools.shell.Evaluator$evaluate.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128) at org.codehaus.groovy.tools.shell.Groovysh.evaluateWithStoredBoundVars(Groovysh.groovy:263) 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:498) at org.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite.doInvoke(PlainObjectMetaMethodSite.jav at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(P ethodSite.java:190) at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:58) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:157) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:177) at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:204) at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:122) at org.codehaus.groovy.tools.shell.Shell$leftShift$0.call(Unknown Source) at org.codehaus.groovy.tools.shell.commands.LoadCommand$_load_closure1.doCall(LoadCommand.groovy:86) 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:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:104) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:326) at
[jira] [Commented] (GROOVY-6453) groovysh in Windows 7/8/10 doesn't support arrow keys and Del
[ https://issues.apache.org/jira/browse/GROOVY-6453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1760#comment-1760 ] Guy Rouillier commented on GROOVY-6453: --- Found this via search. I'm on Windows 7 64-bit, and tried both groovy-2.6.0-alpha-3 and groovy-3.0.0-alpha-3. Cursor keys are not working in either one. I'm surprised to see this issue is now 5 years old. Is there some basic restriction preventing this from being corrected in groovysh? I tried creating a groovy.rc file containing the contents from the previous post by Dariusz Antoniuk, but don't know where to put it. I tried in \groovy-3.0.0-alpha-3\bin, \groovy-3.0.0-alpha-3\conf, and C:\Users\\.groovy, and it still didn't work. > groovysh in Windows 7/8/10 doesn't support arrow keys and Del > - > > Key: GROOVY-6453 > URL: https://issues.apache.org/jira/browse/GROOVY-6453 > Project: Groovy > Issue Type: Bug > Components: Groovysh >Affects Versions: 2.2.0 > Environment: Windows 8, 64bit (v6.2, build 9200), java version > "1.7.0_45" SE Runtime Environment (build 1.7.0_45-b18) HotSpot 64-Bit Server > VM (build 24.45-b08, mixed mode), Russian locale (!) >Reporter: Andrew P Fink >Priority: Major > Labels: console, jline > > I have bare windows 8 with fresh JDK. I run Groovysh in cmd.exe. > Groovysh 2.1.9 works as expected. > Groovysh 2.2.0 doesn't react to arrow keys and Del, i.e. up key doesn't show > previous command, left key doesn't shift cursor etc. > After some investigation I found what is working: > ctrl-a go to beginning of line > ctrl-e go to End of line > ctrl-f go Forward one char > ctrl-b go Backward one char > ctrl-d delete the char > ctrl-h and backspace = delete left char > ctrl-p recall previous line > ctrl-n recall next line > ctrl-s search > ctrl-r reverse search > It's nice and feel myself like a Linux hacker, but I want arrow keys too ;-) > I tried different options: > - upgrade jline2.10 to 2.11 - no effect > - --terminal=unix - it helps, but duplicate prompt (groovy:000>) and no more > colors in console > Looks like problem lies in new jline v2 (groovysh 2.1.9 uses jline1.0) -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (GROOVY-8860) Use of @Grab to get spock-core library v1.2 for groovy v2.5 causes an exception
[ https://issues.apache.org/jira/browse/GROOVY-8860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1624#comment-1624 ] Venkatesh-Prasad Ranganath commented on GROOVY-8860: Adding "transitive=false" to @Grab works :) Thanks! I suppose Spock team should consider this in how they manage the dependencies. I'll mention it on the corresponding Spock issue. > Use of @Grab to get spock-core library v1.2 for groovy v2.5 causes an > exception > --- > > Key: GROOVY-8860 > URL: https://issues.apache.org/jira/browse/GROOVY-8860 > Project: Groovy > Issue Type: Bug > Components: groovy-runtime >Affects Versions: 2.5.3 > Environment: openjdk version "1.8.0_181" > OpenJDK Runtime Environment (Zulu 8.31.0.1-macosx) (build 1.8.0_181-b02) > OpenJDK 64-Bit Server VM (Zulu 8.31.0.1-macosx) (build 25.181-b02, mixed mode) > Groovy Version: 2.5.3 JVM: 1.8.0_181 Vendor: Azul Systems, Inc. OS: Mac OS X > Mac 10.13.6 (Darwin Kernel Version 17.7.0) >Reporter: Venkatesh-Prasad Ranganath >Priority: Major > > The use of @Grapes/@Grab to get spock-core libraries v1.2 for Groovy v2.5 > causes an exception due to version mismatch of groovy-nio module. > > Execute the following script with groovy: > {code} > @Grab('org.spockframework:spock-core:1.2-groovy-2.5') > class TestX extends spock.lang.Specification { > def 'test method'() { >} > } > {code} > 2. Observe the following output: > {{org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed:}} > \{{ General error during conversion: Conflicting module versions. Module > [groovy-nio is loaded in version 2.5.3 and you are trying to load version > 2.5.2}}{{groovy.lang.GroovyRuntimeException: Conflicting module versions. > Module [groovy-nio is loaded in version 2.5.3 and you are trying to load > version 2.5.2}} > \{{ at > org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl$DefaultModuleListener.onModule(MetaClassRegistryImpl.java:523)}} > \{{ at > org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromProperties(ExtensionModuleScanner.java:87)}} > \{{ at > org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.registerExtensionModuleFromProperties(MetaClassRegistryImpl.java:169)}} > \{{ at > groovy.grape.GrapeIvy.processCategoryMethods(GrapeIvy.groovy:342)}} > \{{ at groovy.grape.GrapeIvy.grab(GrapeIvy.groovy:285)}} > \{{ at groovy.grape.Grape.grab(Grape.java:165)}} > \{{ at > groovy.grape.GrabAnnotationTransformation.visit(GrabAnnotationTransformation.java:376)}} > \{{ at > org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:320)}} > \{{ at > org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:976)}} > \{{ at > org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:651)}} > \{{ at > org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:627)}} > \{{ at > org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:604)}} > \{{ at > groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:354)}} > \{{ at > groovy.lang.GroovyClassLoader.access$300(GroovyClassLoader.java:87)}} > \{{ at > groovy.lang.GroovyClassLoader$5.provide(GroovyClassLoader.java:323)}} > \{{ at > groovy.lang.GroovyClassLoader$5.provide(GroovyClassLoader.java:320)}} > \{{ at > org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache.getAndPut(ConcurrentCommonCache.java:147)}} > \{{ at > groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:318)}} > \{{ at groovy.lang.GroovyShell.parseClass(GroovyShell.java:543)}} > \{{ at groovy.lang.GroovyShell.run(GroovyShell.java:372)}} > \{{ at groovy.lang.GroovyShell.run(GroovyShell.java:362)}} > \{{ at groovy.ui.GroovyMain.processOnce(GroovyMain.java:588)}} > \{{ at groovy.ui.GroovyMain.run(GroovyMain.java:332)}} > \{{ at groovy.ui.GroovyMain.access$1400(GroovyMain.java:69)}} > \{{ at groovy.ui.GroovyMain$GroovyCommand.process(GroovyMain.java:291)}} > \{{ at groovy.ui.GroovyMain.processArgs(GroovyMain.java:134)}} > \{{ at groovy.ui.GroovyMain.main(GroovyMain.java:116)}} > \{{ 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:498)}} > \{{ at > org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:110)}} > \{{ at >
[jira] [Commented] (GROOVY-8860) Use of @Grab to get spock-core library v1.2 for groovy v2.5 causes an exception
[ https://issues.apache.org/jira/browse/GROOVY-8860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1603#comment-1603 ] Paul King commented on GROOVY-8860: --- You could get the same behavior with earlier versions of Spock but it was less common when using for instance groovyConsole since the console didn't use the all jar but Spock had the all jar as it's dependency. The all jar in Groovy 2.5+ has been phased out due to JDK9+ modules (JPMS). So Spock now depends on several jars and the error will be more common. As an alternative to @GrabExclude, you can try this: {code} @Grab('org.spockframework:spock-core:1.2-groovy-2.5;transitive=false') class TestX extends spock.lang.Specification { def 'test method'() { expect: 1 + 1 == 2 } } {code} > Use of @Grab to get spock-core library v1.2 for groovy v2.5 causes an > exception > --- > > Key: GROOVY-8860 > URL: https://issues.apache.org/jira/browse/GROOVY-8860 > Project: Groovy > Issue Type: Bug > Components: groovy-runtime >Affects Versions: 2.5.3 > Environment: openjdk version "1.8.0_181" > OpenJDK Runtime Environment (Zulu 8.31.0.1-macosx) (build 1.8.0_181-b02) > OpenJDK 64-Bit Server VM (Zulu 8.31.0.1-macosx) (build 25.181-b02, mixed mode) > Groovy Version: 2.5.3 JVM: 1.8.0_181 Vendor: Azul Systems, Inc. OS: Mac OS X > Mac 10.13.6 (Darwin Kernel Version 17.7.0) >Reporter: Venkatesh-Prasad Ranganath >Priority: Major > > The use of @Grapes/@Grab to get spock-core libraries v1.2 for Groovy v2.5 > causes an exception due to version mismatch of groovy-nio module. > > Execute the following script with groovy: > {code} > @Grab('org.spockframework:spock-core:1.2-groovy-2.5') > class TestX extends spock.lang.Specification { > def 'test method'() { >} > } > {code} > 2. Observe the following output: > {{org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed:}} > \{{ General error during conversion: Conflicting module versions. Module > [groovy-nio is loaded in version 2.5.3 and you are trying to load version > 2.5.2}}{{groovy.lang.GroovyRuntimeException: Conflicting module versions. > Module [groovy-nio is loaded in version 2.5.3 and you are trying to load > version 2.5.2}} > \{{ at > org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl$DefaultModuleListener.onModule(MetaClassRegistryImpl.java:523)}} > \{{ at > org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromProperties(ExtensionModuleScanner.java:87)}} > \{{ at > org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.registerExtensionModuleFromProperties(MetaClassRegistryImpl.java:169)}} > \{{ at > groovy.grape.GrapeIvy.processCategoryMethods(GrapeIvy.groovy:342)}} > \{{ at groovy.grape.GrapeIvy.grab(GrapeIvy.groovy:285)}} > \{{ at groovy.grape.Grape.grab(Grape.java:165)}} > \{{ at > groovy.grape.GrabAnnotationTransformation.visit(GrabAnnotationTransformation.java:376)}} > \{{ at > org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:320)}} > \{{ at > org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:976)}} > \{{ at > org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:651)}} > \{{ at > org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:627)}} > \{{ at > org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:604)}} > \{{ at > groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:354)}} > \{{ at > groovy.lang.GroovyClassLoader.access$300(GroovyClassLoader.java:87)}} > \{{ at > groovy.lang.GroovyClassLoader$5.provide(GroovyClassLoader.java:323)}} > \{{ at > groovy.lang.GroovyClassLoader$5.provide(GroovyClassLoader.java:320)}} > \{{ at > org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache.getAndPut(ConcurrentCommonCache.java:147)}} > \{{ at > groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:318)}} > \{{ at groovy.lang.GroovyShell.parseClass(GroovyShell.java:543)}} > \{{ at groovy.lang.GroovyShell.run(GroovyShell.java:372)}} > \{{ at groovy.lang.GroovyShell.run(GroovyShell.java:362)}} > \{{ at groovy.ui.GroovyMain.processOnce(GroovyMain.java:588)}} > \{{ at groovy.ui.GroovyMain.run(GroovyMain.java:332)}} > \{{ at groovy.ui.GroovyMain.access$1400(GroovyMain.java:69)}} > \{{ at groovy.ui.GroovyMain$GroovyCommand.process(GroovyMain.java:291)}} > \{{ at groovy.ui.GroovyMain.processArgs(GroovyMain.java:134)}} > \{{ at groovy.ui.GroovyMain.main(GroovyMain.java:116)}} > \{{ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)}}
[jira] [Updated] (GROOVY-8860) Use of @Grab to get spock-core library v1.2 for groovy v2.5 causes an exception
[ https://issues.apache.org/jira/browse/GROOVY-8860?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul King updated GROOVY-8860: -- Description: The use of @Grapes/@Grab to get spock-core libraries v1.2 for Groovy v2.5 causes an exception due to version mismatch of groovy-nio module. Execute the following script with groovy: {code} @Grab('org.spockframework:spock-core:1.2-groovy-2.5') class TestX extends spock.lang.Specification { def 'test method'() { } } {code} 2. Observe the following output: {{org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:}} \{{ General error during conversion: Conflicting module versions. Module [groovy-nio is loaded in version 2.5.3 and you are trying to load version 2.5.2}}{{groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-nio is loaded in version 2.5.3 and you are trying to load version 2.5.2}} \{{ at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl$DefaultModuleListener.onModule(MetaClassRegistryImpl.java:523)}} \{{ at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromProperties(ExtensionModuleScanner.java:87)}} \{{ at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.registerExtensionModuleFromProperties(MetaClassRegistryImpl.java:169)}} \{{ at groovy.grape.GrapeIvy.processCategoryMethods(GrapeIvy.groovy:342)}} \{{ at groovy.grape.GrapeIvy.grab(GrapeIvy.groovy:285)}} \{{ at groovy.grape.Grape.grab(Grape.java:165)}} \{{ at groovy.grape.GrabAnnotationTransformation.visit(GrabAnnotationTransformation.java:376)}} \{{ at org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:320)}} \{{ at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:976)}} \{{ at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:651)}} \{{ at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:627)}} \{{ at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:604)}} \{{ at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:354)}} \{{ at groovy.lang.GroovyClassLoader.access$300(GroovyClassLoader.java:87)}} \{{ at groovy.lang.GroovyClassLoader$5.provide(GroovyClassLoader.java:323)}} \{{ at groovy.lang.GroovyClassLoader$5.provide(GroovyClassLoader.java:320)}} \{{ at org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache.getAndPut(ConcurrentCommonCache.java:147)}} \{{ at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:318)}} \{{ at groovy.lang.GroovyShell.parseClass(GroovyShell.java:543)}} \{{ at groovy.lang.GroovyShell.run(GroovyShell.java:372)}} \{{ at groovy.lang.GroovyShell.run(GroovyShell.java:362)}} \{{ at groovy.ui.GroovyMain.processOnce(GroovyMain.java:588)}} \{{ at groovy.ui.GroovyMain.run(GroovyMain.java:332)}} \{{ at groovy.ui.GroovyMain.access$1400(GroovyMain.java:69)}} \{{ at groovy.ui.GroovyMain$GroovyCommand.process(GroovyMain.java:291)}} \{{ at groovy.ui.GroovyMain.processArgs(GroovyMain.java:134)}} \{{ at groovy.ui.GroovyMain.main(GroovyMain.java:116)}} \{{ 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:498)}} \{{ at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:110)}} \{{ at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:128)}} {{1 error}} Since I am not sure if this is a Groovy or Spock issue, I have reported the same issue to Spock ([https://github.com/spockframework/spock/issues/943]) was: The use of @Grapes/@Grab to get spock-core libraries v1.2 for Groovy v2.5 causes an exception due to version mismatch of groovy-nio module. 1. Execute the following script with groovy {{@Grab(group='org.spockframework', module='spock-core', version='1.2-groovy-2.5')}}{{class TestX extends spock.lang.Specification {}} {{ def 'test method'() { }} {{ }}} {{}}} 2. Observe the following output {{org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:}} {{ General error during conversion: Conflicting module versions. Module [groovy-nio is loaded in version 2.5.3 and you are trying to load version 2.5.2}}{{groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-nio is loaded in version 2.5.3 and you are trying to load version 2.5.2}} {{ at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl$DefaultModuleListener.onModule(MetaClassRegistryImpl.java:523)}} {{ at
[jira] [Commented] (GROOVY-8860) Use of @Grab to get spock-core library v1.2 for groovy v2.5 causes an exception
[ https://issues.apache.org/jira/browse/GROOVY-8860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1515#comment-1515 ] Venkatesh-Prasad Ranganath commented on GROOVY-8860: This was not the case with Spock v1.1 and Groovy v2.4.x. I could upgrade to different versions of Groovy 2.4 and existing Spock v1.1 based tests worked fine. So, I suspect there is a divergence in Spock v1.2 or Groovy v2.5. > Use of @Grab to get spock-core library v1.2 for groovy v2.5 causes an > exception > --- > > Key: GROOVY-8860 > URL: https://issues.apache.org/jira/browse/GROOVY-8860 > Project: Groovy > Issue Type: Bug > Components: groovy-runtime >Affects Versions: 2.5.3 > Environment: openjdk version "1.8.0_181" > OpenJDK Runtime Environment (Zulu 8.31.0.1-macosx) (build 1.8.0_181-b02) > OpenJDK 64-Bit Server VM (Zulu 8.31.0.1-macosx) (build 25.181-b02, mixed mode) > Groovy Version: 2.5.3 JVM: 1.8.0_181 Vendor: Azul Systems, Inc. OS: Mac OS X > Mac 10.13.6 (Darwin Kernel Version 17.7.0) >Reporter: Venkatesh-Prasad Ranganath >Priority: Major > > The use of @Grapes/@Grab to get spock-core libraries v1.2 for Groovy v2.5 > causes an exception due to version mismatch of groovy-nio module. > 1. Execute the following script with groovy > {{@Grab(group='org.spockframework', module='spock-core', > version='1.2-groovy-2.5')}}{{class TestX extends spock.lang.Specification {}} > {{ def 'test method'() { }} > {{ }}} > {{}}} > 2. Observe the following output > {{org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed:}} > {{ General error during conversion: Conflicting module versions. Module > [groovy-nio is loaded in version 2.5.3 and you are trying to load version > 2.5.2}}{{groovy.lang.GroovyRuntimeException: Conflicting module versions. > Module [groovy-nio is loaded in version 2.5.3 and you are trying to load > version 2.5.2}} > {{ at > org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl$DefaultModuleListener.onModule(MetaClassRegistryImpl.java:523)}} > {{ at > org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromProperties(ExtensionModuleScanner.java:87)}} > {{ at > org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.registerExtensionModuleFromProperties(MetaClassRegistryImpl.java:169)}} > {{ at groovy.grape.GrapeIvy.processCategoryMethods(GrapeIvy.groovy:342)}} > {{ at groovy.grape.GrapeIvy.grab(GrapeIvy.groovy:285)}} > {{ at groovy.grape.Grape.grab(Grape.java:165)}} > {{ at > groovy.grape.GrabAnnotationTransformation.visit(GrabAnnotationTransformation.java:376)}} > {{ at > org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:320)}} > {{ at > org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:976)}} > {{ at > org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:651)}} > {{ at > org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:627)}} > {{ at > org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:604)}} > {{ at > groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:354)}} > {{ at > groovy.lang.GroovyClassLoader.access$300(GroovyClassLoader.java:87)}} > {{ at > groovy.lang.GroovyClassLoader$5.provide(GroovyClassLoader.java:323)}} > {{ at > groovy.lang.GroovyClassLoader$5.provide(GroovyClassLoader.java:320)}} > {{ at > org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache.getAndPut(ConcurrentCommonCache.java:147)}} > {{ at > groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:318)}} > {{ at groovy.lang.GroovyShell.parseClass(GroovyShell.java:543)}} > {{ at groovy.lang.GroovyShell.run(GroovyShell.java:372)}} > {{ at groovy.lang.GroovyShell.run(GroovyShell.java:362)}} > {{ at groovy.ui.GroovyMain.processOnce(GroovyMain.java:588)}} > {{ at groovy.ui.GroovyMain.run(GroovyMain.java:332)}} > {{ at groovy.ui.GroovyMain.access$1400(GroovyMain.java:69)}} > {{ at groovy.ui.GroovyMain$GroovyCommand.process(GroovyMain.java:291)}} > {{ at groovy.ui.GroovyMain.processArgs(GroovyMain.java:134)}} > {{ at groovy.ui.GroovyMain.main(GroovyMain.java:116)}} > {{ 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:498)}} > {{ at > org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:110)}} > {{ at >
[GitHub] groovy pull request #:
Github user pditommaso commented on the pull request: https://github.com/apache/groovy/commit/3341dcd9a4f151b71b90ceb0be59fcdca403c300#commitcomment-31075820 ð ---
[GitHub] groovy pull request #:
Github user danielsun1106 commented on the pull request: https://github.com/apache/groovy/commit/3341dcd9a4f151b71b90ceb0be59fcdca403c300#commitcomment-31075653 No one can assure Groovy users will not create GroovyCodeSource instances with different names for the same source code. The current implementation can avoid the problems too. ---
[GitHub] groovy pull request #:
Github user pditommaso commented on the pull request: https://github.com/apache/groovy/commit/3341dcd9a4f151b71b90ceb0be59fcdca403c300#commitcomment-31075630 Oh, right! I was missing the the groovy shell gives to the same script different file names. But in this case would not make more sense to make to groovy shell to give script a consistent file name based on the md5 hash, instead of creating a new name each time? ---
[GitHub] groovy pull request #:
Github user danielsun1106 commented on the pull request: https://github.com/apache/groovy/commit/3341dcd9a4f151b71b90ceb0be59fcdca403c300#commitcomment-31075542 e.g. GroovyShell evaluates same script with different file names, which results in loading classes repeatedly and the classes and the relevant InnerLoader instances can't be GC. ---
[GitHub] groovy pull request #:
Github user pditommaso commented on the pull request: https://github.com/apache/groovy/commit/3341dcd9a4f151b71b90ceb0be59fcdca403c300#commitcomment-31075266 Out of curiosity, what's the benefit of caching classes using as key the source hash code instead of the class name? ---
[jira] [Commented] (GROOVY-8860) Use of @Grab to get spock-core library v1.2 for groovy v2.5 causes an exception
[ https://issues.apache.org/jira/browse/GROOVY-8860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1375#comment-1375 ] Paul King commented on GROOVY-8860: --- Spock includes groovy as a dependency, so you'll get 2.5.2 as well as whatever version you are using. I'd try using @GrabExclude and exclude the groovy jars. > Use of @Grab to get spock-core library v1.2 for groovy v2.5 causes an > exception > --- > > Key: GROOVY-8860 > URL: https://issues.apache.org/jira/browse/GROOVY-8860 > Project: Groovy > Issue Type: Bug > Components: groovy-runtime >Affects Versions: 2.5.3 > Environment: openjdk version "1.8.0_181" > OpenJDK Runtime Environment (Zulu 8.31.0.1-macosx) (build 1.8.0_181-b02) > OpenJDK 64-Bit Server VM (Zulu 8.31.0.1-macosx) (build 25.181-b02, mixed mode) > Groovy Version: 2.5.3 JVM: 1.8.0_181 Vendor: Azul Systems, Inc. OS: Mac OS X > Mac 10.13.6 (Darwin Kernel Version 17.7.0) >Reporter: Venkatesh-Prasad Ranganath >Priority: Major > > The use of @Grapes/@Grab to get spock-core libraries v1.2 for Groovy v2.5 > causes an exception due to version mismatch of groovy-nio module. > 1. Execute the following script with groovy > {{@Grab(group='org.spockframework', module='spock-core', > version='1.2-groovy-2.5')}}{{class TestX extends spock.lang.Specification {}} > {{ def 'test method'() { }} > {{ }}} > {{}}} > 2. Observe the following output > {{org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed:}} > {{ General error during conversion: Conflicting module versions. Module > [groovy-nio is loaded in version 2.5.3 and you are trying to load version > 2.5.2}}{{groovy.lang.GroovyRuntimeException: Conflicting module versions. > Module [groovy-nio is loaded in version 2.5.3 and you are trying to load > version 2.5.2}} > {{ at > org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl$DefaultModuleListener.onModule(MetaClassRegistryImpl.java:523)}} > {{ at > org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromProperties(ExtensionModuleScanner.java:87)}} > {{ at > org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.registerExtensionModuleFromProperties(MetaClassRegistryImpl.java:169)}} > {{ at groovy.grape.GrapeIvy.processCategoryMethods(GrapeIvy.groovy:342)}} > {{ at groovy.grape.GrapeIvy.grab(GrapeIvy.groovy:285)}} > {{ at groovy.grape.Grape.grab(Grape.java:165)}} > {{ at > groovy.grape.GrabAnnotationTransformation.visit(GrabAnnotationTransformation.java:376)}} > {{ at > org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:320)}} > {{ at > org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:976)}} > {{ at > org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:651)}} > {{ at > org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:627)}} > {{ at > org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:604)}} > {{ at > groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:354)}} > {{ at > groovy.lang.GroovyClassLoader.access$300(GroovyClassLoader.java:87)}} > {{ at > groovy.lang.GroovyClassLoader$5.provide(GroovyClassLoader.java:323)}} > {{ at > groovy.lang.GroovyClassLoader$5.provide(GroovyClassLoader.java:320)}} > {{ at > org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache.getAndPut(ConcurrentCommonCache.java:147)}} > {{ at > groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:318)}} > {{ at groovy.lang.GroovyShell.parseClass(GroovyShell.java:543)}} > {{ at groovy.lang.GroovyShell.run(GroovyShell.java:372)}} > {{ at groovy.lang.GroovyShell.run(GroovyShell.java:362)}} > {{ at groovy.ui.GroovyMain.processOnce(GroovyMain.java:588)}} > {{ at groovy.ui.GroovyMain.run(GroovyMain.java:332)}} > {{ at groovy.ui.GroovyMain.access$1400(GroovyMain.java:69)}} > {{ at groovy.ui.GroovyMain$GroovyCommand.process(GroovyMain.java:291)}} > {{ at groovy.ui.GroovyMain.processArgs(GroovyMain.java:134)}} > {{ at groovy.ui.GroovyMain.main(GroovyMain.java:116)}} > {{ 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:498)}} > {{ at > org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:110)}} > {{ at > org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:128)}} > {{1 error}} > > Since I am not sure if this
[jira] [Closed] (GROOVY-8862) Bump asm to 7.0
[ https://issues.apache.org/jira/browse/GROOVY-8862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun closed GROOVY-8862. -- Resolution: Fixed Fixed by https://github.com/apache/groovy/commit/d87966b1b25c3d201add87c6f965f582ce17b7d3 > Bump asm to 7.0 > --- > > Key: GROOVY-8862 > URL: https://issues.apache.org/jira/browse/GROOVY-8862 > Project: Groovy > Issue Type: Dependency upgrade >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 3.0.0-alpha-4, 2.5.4 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (GROOVY-8862) Bump asm to 7.0
Daniel Sun created GROOVY-8862: -- Summary: Bump asm to 7.0 Key: GROOVY-8862 URL: https://issues.apache.org/jira/browse/GROOVY-8862 Project: Groovy Issue Type: Dependency upgrade Reporter: Daniel Sun Assignee: Daniel Sun Fix For: 3.0.0-alpha-4, 2.5.4 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (GROOVY-8861) Simplify the switch for runtime groovydoc
[ https://issues.apache.org/jira/browse/GROOVY-8861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1350#comment-1350 ] ASF GitHub Bot commented on GROOVY-8861: GitHub user danielsun1106 opened a pull request: https://github.com/apache/groovy/pull/817 GROOVY-8861: Simplify the switch for runtime groovydoc You can merge this pull request into a Git repository by running: $ git pull https://github.com/danielsun1106/groovy refine-runtime-groovydoc Alternatively you can review and apply these changes as the patch at: https://github.com/apache/groovy/pull/817.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 #817 commit 6da5d75c7e8fc9231a166ed40507311f30523c97 Author: danielsun1106 Date: 2018-10-28T10:36:47Z GROOVY-8861: Simplify the switch for runtime groovydoc > Simplify the switch for runtime groovydoc > - > > Key: GROOVY-8861 > URL: https://issues.apache.org/jira/browse/GROOVY-8861 > Project: Groovy > Issue Type: Improvement > Components: parser-antlr4 >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > > The Original switch for runtime groovydoc: > {code:java} > /** > * @Groovydoc > {code} > The simplified version will be: > {code:java} > /**@ > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] groovy pull request #817: GROOVY-8861: Simplify the switch for runtime groov...
GitHub user danielsun1106 opened a pull request: https://github.com/apache/groovy/pull/817 GROOVY-8861: Simplify the switch for runtime groovydoc You can merge this pull request into a Git repository by running: $ git pull https://github.com/danielsun1106/groovy refine-runtime-groovydoc Alternatively you can review and apply these changes as the patch at: https://github.com/apache/groovy/pull/817.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 #817 commit 6da5d75c7e8fc9231a166ed40507311f30523c97 Author: danielsun1106 Date: 2018-10-28T10:36:47Z GROOVY-8861: Simplify the switch for runtime groovydoc ---
[jira] [Created] (GROOVY-8861) Simplify the switch for runtime groovydoc
Daniel Sun created GROOVY-8861: -- Summary: Simplify the switch for runtime groovydoc Key: GROOVY-8861 URL: https://issues.apache.org/jira/browse/GROOVY-8861 Project: Groovy Issue Type: Improvement Components: parser-antlr4 Reporter: Daniel Sun Assignee: Daniel Sun The Original switch for runtime groovydoc: {code:java} /** * @Groovydoc {code} The simplified version will be: {code:java} /**@ {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)