[jira] [Commented] (GROOVY-11194) groovyc missing features from the library compiler
[ https://issues.apache.org/jira/browse/GROOVY-11194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17779559#comment-17779559 ] Keegan Witt commented on GROOVY-11194: -- {quote}Isn't parallel parsing enabled by default? So disabling would be an advanced case, wouldn't it?{quote} In Groovy 4 and onwards it is, yes. But in 2.5 and 3.0 it's off by default I believe. > groovyc missing features from the library compiler > -- > > Key: GROOVY-11194 > URL: https://issues.apache.org/jira/browse/GROOVY-11194 > Project: Groovy > Issue Type: New Feature > Components: command line processing, Compiler >Affects Versions: 3.0.19, 5.0.0-alpha-2, 4.0.15 >Reporter: Benjamin Marwell >Assignee: Keegan Witt >Priority: Critical > > Hello groovy team, > no version of the groovy distribution supports any of those features on the > {{groovyc}} command line, which are available when invoking the groovy > compiler via library means: > * setDebug( boolean ) > * setVerbose( boolean ) > * setWarningLevel( int ) > * setTolerance( int ) > * invokeDynamic via optimizationOptions.put("indy", true); > optimizationOptions.put("int", false); > * parallel Parsing via optimizationOptions.put("parallelParse", true); > This is important when gplus-maven-plugin shall run in fork mode. Draft PR: > https://github.com/groovy/GMavenPlus/pull/283 -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Assigned] (GROOVY-11194) groovyc missing features from the library compiler
[ https://issues.apache.org/jira/browse/GROOVY-11194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt reassigned GROOVY-11194: Assignee: Keegan Witt > groovyc missing features from the library compiler > -- > > Key: GROOVY-11194 > URL: https://issues.apache.org/jira/browse/GROOVY-11194 > Project: Groovy > Issue Type: New Feature > Components: command line processing, Compiler >Affects Versions: 3.0.19, 5.0.0-alpha-2, 4.0.15 >Reporter: Benjamin Marwell >Assignee: Keegan Witt >Priority: Critical > > Hello groovy team, > no version of the groovy distribution supports any of those features on the > {{groovyc}} command line, which are available when invoking the groovy > compiler via library means: > * setDebug( boolean ) > * setVerbose( boolean ) > * setWarningLevel( int ) > * setTolerance( int ) > * invokeDynamic via optimizationOptions.put("indy", true); > optimizationOptions.put("int", false); > * parallel Parsing via optimizationOptions.put("parallelParse", true); > This is important when gplus-maven-plugin shall run in fork mode. Draft PR: > https://github.com/groovy/GMavenPlus/pull/283 -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (GROOVY-11194) groovyc missing features from the library compiler
[ https://issues.apache.org/jira/browse/GROOVY-11194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17775514#comment-17775514 ] Keegan Witt commented on GROOVY-11194: -- Groovy 4.0.0 and later default to indy turned on and it can't be turned off. So that one wouldn't apply except to Groovy 2.5 and 3.0. > groovyc missing features from the library compiler > -- > > Key: GROOVY-11194 > URL: https://issues.apache.org/jira/browse/GROOVY-11194 > Project: Groovy > Issue Type: New Feature > Components: command line processing, Compiler >Affects Versions: 3.0.19, 5.0.0-alpha-2, 4.0.15 >Reporter: Benjamin Marwell >Priority: Critical > > Hello groovy team, > no version of the groovy distribution supports any of those features on the > {{groovyc}} command line, which are available when invoking the groovy > compiler via library means: > * setDebug( boolean ) > * setVerbose( boolean ) > * setWarningLevel( int ) > * setTolerance( int ) > * invokeDynamic via optimizationOptions.put("indy", true); > optimizationOptions.put("int", false); > * parallel Parsing via optimizationOptions.put("parallelParse", true); > This is important when gplus-maven-plugin shall run in fork mode. Draft PR: > https://github.com/groovy/GMavenPlus/pull/283 -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Comment Edited] (GROOVY-10155) Add JDK18 constant
[ https://issues.apache.org/jira/browse/GROOVY-10155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17416949#comment-17416949 ] Keegan Witt edited comment on GROOVY-10155 at 9/18/21, 2:48 AM: bq. 3_0_X does not support Java 16, so I am not sure whether we need backport the changes. It doesn't? Is it a mistake then that CompilerConfiguration has 16 and 17 in the 3_0_X branch then? was (Author: keegan): bq. 3_0_X does not support Java 16, so I am not sure whether we need backport the changes. It doesn't? Is it a mistake then that CompilerConfiguration has 16 and 17 then? > Add JDK18 constant > -- > > Key: GROOVY-10155 > URL: https://issues.apache.org/jira/browse/GROOVY-10155 > Project: Groovy > Issue Type: Improvement >Reporter: Paul King >Assignee: Paul King >Priority: Minor > Fix For: 4.0.0-beta-1 > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GROOVY-10155) Add JDK18 constant
[ https://issues.apache.org/jira/browse/GROOVY-10155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17416949#comment-17416949 ] Keegan Witt commented on GROOVY-10155: -- bq. 3_0_X does not support Java 16, so I am not sure whether we need backport the changes. It doesn't? Is it a mistake then that CompilerConfiguration has 16 and 17 then? > Add JDK18 constant > -- > > Key: GROOVY-10155 > URL: https://issues.apache.org/jira/browse/GROOVY-10155 > Project: Groovy > Issue Type: Improvement >Reporter: Paul King >Assignee: Paul King >Priority: Minor > Fix For: 4.0.0-beta-1 > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (GROOVY-9962) Stub generation malforms annotation values
[ https://issues.apache.org/jira/browse/GROOVY-9962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt resolved GROOVY-9962. - Fix Version/s: 2.5.15 Resolution: Fixed > Stub generation malforms annotation values > -- > > Key: GROOVY-9962 > URL: https://issues.apache.org/jira/browse/GROOVY-9962 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Affects Versions: 3.0.7, 2.5.15 >Reporter: James Kleeh >Assignee: Keegan Witt >Priority: Major > Fix For: 2.5.15, 3.0.8 > > > This issue was introduced by > https://issues.apache.org/jira/browse/GROOVY-6085 and the fix > [https://github.com/apache/groovy/commit/561fad780794a5ac6be81818d2f123496e6c9bad#diff-fb5c7aed8d75294b5fbca45b00da5e20968d33704cb81720503ee3601df30fecR732] > > That commit replaces `$` with `.` in annotation values, however it seems that > should only happen if the value is a class expression. For things like string > literals it is changing the string value which is causing other problems. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9962) Stub generation malforms annotation values
[ https://issues.apache.org/jira/browse/GROOVY-9962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt updated GROOVY-9962: Fix Version/s: 3.0.8 Affects Version/s: 2.5.15 > Stub generation malforms annotation values > -- > > Key: GROOVY-9962 > URL: https://issues.apache.org/jira/browse/GROOVY-9962 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Affects Versions: 3.0.7, 2.5.15 >Reporter: James Kleeh >Assignee: Keegan Witt >Priority: Major > Fix For: 3.0.8 > > > This issue was introduced by > https://issues.apache.org/jira/browse/GROOVY-6085 and the fix > [https://github.com/apache/groovy/commit/561fad780794a5ac6be81818d2f123496e6c9bad#diff-fb5c7aed8d75294b5fbca45b00da5e20968d33704cb81720503ee3601df30fecR732] > > That commit replaces `$` with `.` in annotation values, however it seems that > should only happen if the value is a class expression. For things like string > literals it is changing the string value which is causing other problems. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9962) Stub generation malforms annotation values
[ https://issues.apache.org/jira/browse/GROOVY-9962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt updated GROOVY-9962: Affects Version/s: (was: 2.5.15) > Stub generation malforms annotation values > -- > > Key: GROOVY-9962 > URL: https://issues.apache.org/jira/browse/GROOVY-9962 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Affects Versions: 3.0.7 >Reporter: James Kleeh >Assignee: Keegan Witt >Priority: Major > Fix For: 2.5.15, 3.0.8 > > > This issue was introduced by > https://issues.apache.org/jira/browse/GROOVY-6085 and the fix > [https://github.com/apache/groovy/commit/561fad780794a5ac6be81818d2f123496e6c9bad#diff-fb5c7aed8d75294b5fbca45b00da5e20968d33704cb81720503ee3601df30fecR732] > > That commit replaces `$` with `.` in annotation values, however it seems that > should only happen if the value is a class expression. For things like string > literals it is changing the string value which is causing other problems. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (GROOVY-9962) Stub generation malforms annotation values
[ https://issues.apache.org/jira/browse/GROOVY-9962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt reassigned GROOVY-9962: --- Assignee: Keegan Witt > Stub generation malforms annotation values > -- > > Key: GROOVY-9962 > URL: https://issues.apache.org/jira/browse/GROOVY-9962 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Affects Versions: 3.0.7 >Reporter: James Kleeh >Assignee: Keegan Witt >Priority: Major > > This issue was introduced by > https://issues.apache.org/jira/browse/GROOVY-6085 and the fix > [https://github.com/apache/groovy/commit/561fad780794a5ac6be81818d2f123496e6c9bad#diff-fb5c7aed8d75294b5fbca45b00da5e20968d33704cb81720503ee3601df30fecR732] > > That commit replaces `$` with `.` in annotation values, however it seems that > should only happen if the value is a class expression. For things like string > literals it is changing the string value which is causing other problems. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9927) Stub not using fully qualified class for inner java class when importing outer class
[ https://issues.apache.org/jira/browse/GROOVY-9927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt updated GROOVY-9927: Summary: Stub not using fully qualified class for inner java class when importing outer class (was: Stub qualified class for inner java class when importing outer class) > Stub not using fully qualified class for inner java class when importing > outer class > > > Key: GROOVY-9927 > URL: https://issues.apache.org/jira/browse/GROOVY-9927 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Affects Versions: 3.0.7 >Reporter: Keegan Witt >Priority: Major > > Here's a failing test, demonstrating the problem > {code:groovy} > /* > * Licensed to the Apache Software Foundation (ASF) under one > * or more contributor license agreements. See the NOTICE file > * distributed with this work for additional information > * regarding copyright ownership. The ASF licenses this file > * to you under the Apache License, Version 2.0 (the > * "License"); you may not use this file except in compliance > * with the License. You may obtain a copy of the License at > * > *http://www.apache.org/licenses/LICENSE-2.0 > * > * Unless required by applicable law or agreed to in writing, > * software distributed under the License is distributed on an > * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY > * KIND, either express or implied. See the License for the > * specific language governing permissions and limitations > * under the License. > */ > package org.codehaus.groovy.tools.stubgenerator > class InnerJavaClassOuterImportInGroovy extends StringSourcesStubTestCase { > Map provideSources() { > [ > 'model/Logger.java': ''' > package model; > public class Logger { > public enum Level { > DEBUG, INFO, WARN, ERROR > } > } > ''', > 'service/LoggerLevelDescriber.groovy': ''' > package service > import model.Logger > class LoggerLevelDescriber { > String describeLevel(Logger.Level loggerLevel) { > return loggerLevel.name } > } > ''' > ] > } > void verifyStubs() { > def stubSource = stubJavaSourceFor('service.LoggerLevelDescriber') > assert stubSource.contains(' describeLevel(model.Logger.Level ') > // TODO: should this be tested too? > //def classLoader = new URLClassLoader([targetDir.toURI().toURL()] as > URL[], loader) > //classLoader.loadClass('model.Logger') > //classLoader.loadClass('model.Logger.Level') > //classLoader.loadClass('service.LoggerLevelDescriber') > } > } > {code} > The stub has > {code:java} > public java.lang.String describeLevel(Logger.Level loggerLevel) { return > (java.lang.String)null;} > {code} > With no import for {{Logger}}. > If you instead do > {code:groovy}import model.Logger.LogLevel{code} > instead of > {code:groovy}import model.Logger{code} > it prints the qualified name in the stub. > It also works if you put the qualified name in Groovy, that also works, like > {code:groovy}String describeLevel(model.Logger.Level loggerLevel){code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9927) Stub qualified class for inner java class when importing outer class
[ https://issues.apache.org/jira/browse/GROOVY-9927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt updated GROOVY-9927: Description: Here's a failing test, demonstrating the problem {code:groovy} /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * *http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.codehaus.groovy.tools.stubgenerator class InnerJavaClassOuterImportInGroovy extends StringSourcesStubTestCase { Map provideSources() { [ 'model/Logger.java': ''' package model; public class Logger { public enum Level { DEBUG, INFO, WARN, ERROR } } ''', 'service/LoggerLevelDescriber.groovy': ''' package service import model.Logger class LoggerLevelDescriber { String describeLevel(Logger.Level loggerLevel) { return loggerLevel.name } } ''' ] } void verifyStubs() { def stubSource = stubJavaSourceFor('service.LoggerLevelDescriber') assert stubSource.contains(' describeLevel(model.Logger.Level ') // TODO: should this be tested too? //def classLoader = new URLClassLoader([targetDir.toURI().toURL()] as URL[], loader) //classLoader.loadClass('model.Logger') //classLoader.loadClass('model.Logger.Level') //classLoader.loadClass('service.LoggerLevelDescriber') } } {code} The stub has {code:java} public java.lang.String describeLevel(Logger.Level loggerLevel) { return (java.lang.String)null;} {code} With no import for {{Logger}}. If you instead do {code:groovy}import model.Logger.LogLevel{code} instead of {code:groovy}import model.Logger{code} it prints the qualified name in the stub. It also works if you put the qualified name in Groovy, that also works, like {code:groovy}String describeLevel(model.Logger.Level loggerLevel){code} was: Here's a failing test, demonstrating the problem {code:groovy} /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * *http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.codehaus.groovy.tools.stubgenerator class InnerJavaClassOuterImportInGroovy extends StringSourcesStubTestCase { Map provideSources() { [ 'model/Logger.java': ''' package model; public class Logger { public enum Level { DEBUG, INFO, WARN, ERROR } } ''', 'service/LoggerLevelDescriber.groovy': ''' package service import model.Logger class LoggerLevelDescriber { String describeLevel(Logger.Level loggerLevel) { return loggerLevel.name } } ''' ] } void verifyStubs() { def stubSource = stubJavaSourceFor('service.LoggerLevelDescriber') assert stubSource.contains(' describeLevel(model.Logger.Level ') // TODO: should this be tested too? //def classLoader = new URLClassLoader([targetDir.toURI().toURL()] as URL[], loader) //classLoader.loadClass('model.Logger') //classLoader.loadClass('model.Logger.Level') //
[jira] [Updated] (GROOVY-9927) Stub qualified class for inner java class when importing outer class
[ https://issues.apache.org/jira/browse/GROOVY-9927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt updated GROOVY-9927: Description: Here's a failing test, demonstrating the problem {code:groovy} /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * *http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.codehaus.groovy.tools.stubgenerator class InnerJavaClassOuterImportInGroovy extends StringSourcesStubTestCase { Map provideSources() { [ 'model/Logger.java': ''' package model; public class Logger { public enum Level { DEBUG, INFO, WARN, ERROR } } ''', 'service/LoggerLevelDescriber.groovy': ''' package service import model.Logger class LoggerLevelDescriber { String describeLevel(Logger.Level loggerLevel) { return loggerLevel.name } } ''' ] } void verifyStubs() { def stubSource = stubJavaSourceFor('service.LoggerLevelDescriber') assert stubSource.contains(' describeLevel(model.Logger.Level ') // TODO: should this be tested too? //def classLoader = new URLClassLoader([targetDir.toURI().toURL()] as URL[], loader) //classLoader.loadClass('model.Logger') //classLoader.loadClass('model.Logger.Level') //classLoader.loadClass('service.LoggerLevelDescriber') } } {code} The stub has {code:java} public java.lang.String describeLevel(Logger.Level loggerLevel) { return (java.lang.String)null;} {code} With no import for {{Logger}}. If you instead do {{import model.Logger.LogLevel}} instead of {{import model.Logger}}, it prints the qualified name in the stub. Also if you put the qualified name in Groovy ({{String describeLevel(model.Logger.Level loggerLevel)}}), that also works. was: Here's a failing test, demonstrating the problem {code:groovy} /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * *http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.codehaus.groovy.tools.stubgenerator class InnerJavaClassOuterImportInGroovy extends StringSourcesStubTestCase { Map provideSources() { [ 'model/Logger.java': ''' package model; public class Logger { public enum Level { DEBUG, INFO, WARN, ERROR } } ''', 'service/LoggerLevelDescriber.groovy': ''' package service import model.Logger class LoggerLevelDescriber { String describeLevel(Logger.Level loggerLevel) { return loggerLevel.name } } ''' ] } void verifyStubs() { def stubSource = stubJavaSourceFor('service.LoggerLevelDescriber') assert stubSource.contains(' describeLevel(model.Logger.Level ') // TODO: should this be tested too? //def classLoader = new URLClassLoader([targetDir.toURI().toURL()] as URL[], loader) //classLoader.loadClass('model.Logger') //classLoader.loadClass('model.Logger.Level') //classLoader.loadClass('service.LoggerLevelDescriber') } } {code} If you instead
[jira] [Updated] (GROOVY-9927) Stub qualified class for inner java class when importing outer class
[ https://issues.apache.org/jira/browse/GROOVY-9927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt updated GROOVY-9927: Description: Here's a failing test, demonstrating the problem {code:groovy} /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * *http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.codehaus.groovy.tools.stubgenerator class InnerJavaClassOuterImportInGroovy extends StringSourcesStubTestCase { Map provideSources() { [ 'model/Logger.java': ''' package model; public class Logger { public enum Level { DEBUG, INFO, WARN, ERROR } } ''', 'service/LoggerLevelDescriber.groovy': ''' package service import model.Logger class LoggerLevelDescriber { String describeLevel(Logger.Level loggerLevel) { return loggerLevel.name } } ''' ] } void verifyStubs() { def stubSource = stubJavaSourceFor('service.LoggerLevelDescriber') assert stubSource.contains(' describeLevel(model.Logger.Level ') // TODO: should this be tested too? //def classLoader = new URLClassLoader([targetDir.toURI().toURL()] as URL[], loader) //classLoader.loadClass('model.Logger') //classLoader.loadClass('model.Logger.Level') //classLoader.loadClass('service.LoggerLevelDescriber') } } {code} If you instead do {{import model.Logger.LogLevel}} instead of {{import model.Logger}}, it prints the qualified name in the stub. Also if you put the qualified name in Groovy ({{String describeLevel(model.Logger.Level loggerLevel)}}), that also works. was: Here's a failing test, demonstrating the problem {code:java} /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * *http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.codehaus.groovy.tools.stubgenerator class InnerJavaClassOuterImportInGroovy extends StringSourcesStubTestCase { Map provideSources() { [ 'model/Logger.java': ''' package model; public class Logger { public enum Level { DEBUG, INFO, WARN, ERROR } } ''', 'service/LoggerLevelDescriber.groovy': ''' package service import model.Logger class LoggerLevelDescriber { String describeLevel(Logger.Level loggerLevel) { return loggerLevel.name } } ''' ] } void verifyStubs() { def stubSource = stubJavaSourceFor('service.LoggerLevelDescriber') assert stubSource.contains(' describeLevel(model.Logger.Level ') // TODO: should this be tested too? //def classLoader = new URLClassLoader([targetDir.toURI().toURL()] as URL[], loader) //classLoader.loadClass('model.Logger') //classLoader.loadClass('model.Logger.Level') //classLoader.loadClass('service.LoggerLevelDescriber') } } {code} > Stub qualified class for inner java class when importing outer class > > > Key: GROOVY-9927
[jira] [Created] (GROOVY-9927) Stub qualified class for inner java class when importing outer class
Keegan Witt created GROOVY-9927: --- Summary: Stub qualified class for inner java class when importing outer class Key: GROOVY-9927 URL: https://issues.apache.org/jira/browse/GROOVY-9927 Project: Groovy Issue Type: Bug Components: Stub generator / Joint compiler Affects Versions: 3.0.7 Reporter: Keegan Witt Here's a failing test, demonstrating the problem {code:java} /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * *http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.codehaus.groovy.tools.stubgenerator class InnerJavaClassOuterImportInGroovy extends StringSourcesStubTestCase { Map provideSources() { [ 'model/Logger.java': ''' package model; public class Logger { public enum Level { DEBUG, INFO, WARN, ERROR } } ''', 'service/LoggerLevelDescriber.groovy': ''' package service import model.Logger class LoggerLevelDescriber { String describeLevel(Logger.Level loggerLevel) { return loggerLevel.name } } ''' ] } void verifyStubs() { def stubSource = stubJavaSourceFor('service.LoggerLevelDescriber') assert stubSource.contains(' describeLevel(model.Logger.Level ') // TODO: should this be tested too? //def classLoader = new URLClassLoader([targetDir.toURI().toURL()] as URL[], loader) //classLoader.loadClass('model.Logger') //classLoader.loadClass('model.Logger.Level') //classLoader.loadClass('service.LoggerLevelDescriber') } } {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (GROOVY-9801) Stub generator omits default interface methods
[ https://issues.apache.org/jira/browse/GROOVY-9801?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt reassigned GROOVY-9801: --- Assignee: Keegan Witt > Stub generator omits default interface methods > -- > > Key: GROOVY-9801 > URL: https://issues.apache.org/jira/browse/GROOVY-9801 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Affects Versions: 3.0.6 >Reporter: Christopher Smith >Assignee: Keegan Witt >Priority: Major > Time Spent: 1h > Remaining Estimate: 0h > > When presented with a Groovy interface that has a default method (shiny and > new!) the stub generator omits the "default" part, leading to compilation > failures in Java classes due to unimplemented abstract methods. > {code:groovy} > interface HasDefaultMethod { > default void method() { } > } > {code} > {code:java} > import java.lang.*; > import java.util.*; > import java.io.*; > import java.net.*; > import groovy.lang.*; > import groovy.util.*; > @groovy.transform.Trait() public interface HasDefaultMethod > { > ; > void method(); > } > {code} > (The stray semicolon is also odd but doesn't appear to be pathological.) -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (GROOVY-9801) Stub generator omits default interface methods
[ https://issues.apache.org/jira/browse/GROOVY-9801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17276029#comment-17276029 ] Keegan Witt edited comment on GROOVY-9801 at 2/1/21, 2:31 AM: -- Interface default methods are currently implemented with traits. I think there's probably not any benefit to adding {{default}} to the stubs until we change how it's implemented in the bytecode, since the Java class won't be able to invoke the default method. was (Author: keegan): Interfaces are currently implemented with traits. I think there's probably not any benefit to adding {{default}} to the stubs until we change how it's implemented in the bytecode, since the Java class won't be able to invoke the default method. > Stub generator omits default interface methods > -- > > Key: GROOVY-9801 > URL: https://issues.apache.org/jira/browse/GROOVY-9801 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Affects Versions: 3.0.6 >Reporter: Christopher Smith >Priority: Major > Time Spent: 50m > Remaining Estimate: 0h > > When presented with a Groovy interface that has a default method (shiny and > new!) the stub generator omits the "default" part, leading to compilation > failures in Java classes due to unimplemented abstract methods. > {code:groovy} > interface HasDefaultMethod { > default void method() { } > } > {code} > {code:java} > import java.lang.*; > import java.util.*; > import java.io.*; > import java.net.*; > import groovy.lang.*; > import groovy.util.*; > @groovy.transform.Trait() public interface HasDefaultMethod > { > ; > void method(); > } > {code} > (The stray semicolon is also odd but doesn't appear to be pathological.) -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GROOVY-9801) Stub generator omits default interface methods
[ https://issues.apache.org/jira/browse/GROOVY-9801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17276029#comment-17276029 ] Keegan Witt commented on GROOVY-9801: - Interfaces are currently implemented with traits. I think there's probably not any benefit to adding {{default}} to the stubs until we change how it's implemented in the bytecode, since the Java class won't be able to invoke the default method. > Stub generator omits default interface methods > -- > > Key: GROOVY-9801 > URL: https://issues.apache.org/jira/browse/GROOVY-9801 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Affects Versions: 3.0.6 >Reporter: Christopher Smith >Priority: Major > Time Spent: 40m > Remaining Estimate: 0h > > When presented with a Groovy interface that has a default method (shiny and > new!) the stub generator omits the "default" part, leading to compilation > failures in Java classes due to unimplemented abstract methods. > {code:groovy} > interface HasDefaultMethod { > default void method() { } > } > {code} > {code:java} > import java.lang.*; > import java.util.*; > import java.io.*; > import java.net.*; > import groovy.lang.*; > import groovy.util.*; > @groovy.transform.Trait() public interface HasDefaultMethod > { > ; > void method(); > } > {code} > (The stray semicolon is also odd but doesn't appear to be pathological.) -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (GROOVY-9869) Upgrade Jansi to 2
[ https://issues.apache.org/jira/browse/GROOVY-9869?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt reassigned GROOVY-9869: --- Fix Version/s: 4.0.0-alpha-3 3.0.8 2.5.15 Assignee: Keegan Witt > Upgrade Jansi to 2 > -- > > Key: GROOVY-9869 > URL: https://issues.apache.org/jira/browse/GROOVY-9869 > Project: Groovy > Issue Type: Task >Reporter: Keegan Witt >Assignee: Keegan Witt >Priority: Major > Fix For: 2.5.15, 3.0.8, 4.0.0-alpha-3 > > Time Spent: 20m > Remaining Estimate: 0h > > Groovysh doesn't work on Arm because the jansi-native artifact is missing. > I'm not sure if Fusesource plans on doing another release in the 1.X line, I > haven't received any response on that > ([https://github.com/fusesource/jansi-native/issues/16).] > Jansi 2 seems to have the binaries for Arm in the jar, so I guess we should > upgrade to that. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (GROOVY-9869) Upgrade Jansi to 2
[ https://issues.apache.org/jira/browse/GROOVY-9869?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt resolved GROOVY-9869. - Resolution: Fixed > Upgrade Jansi to 2 > -- > > Key: GROOVY-9869 > URL: https://issues.apache.org/jira/browse/GROOVY-9869 > Project: Groovy > Issue Type: Task >Reporter: Keegan Witt >Assignee: Keegan Witt >Priority: Major > Fix For: 2.5.15, 3.0.8, 4.0.0-alpha-3 > > Time Spent: 20m > Remaining Estimate: 0h > > Groovysh doesn't work on Arm because the jansi-native artifact is missing. > I'm not sure if Fusesource plans on doing another release in the 1.X line, I > haven't received any response on that > ([https://github.com/fusesource/jansi-native/issues/16).] > Jansi 2 seems to have the binaries for Arm in the jar, so I guess we should > upgrade to that. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (GROOVY-9869) Upgrade Jansi to 2
Keegan Witt created GROOVY-9869: --- Summary: Upgrade Jansi to 2 Key: GROOVY-9869 URL: https://issues.apache.org/jira/browse/GROOVY-9869 Project: Groovy Issue Type: Task Reporter: Keegan Witt Groovysh doesn't work on Arm because the jansi-native artifact is missing. I'm not sure if Fusesource plans on doing another release in the 1.X line, I haven't received any response on that ([https://github.com/fusesource/jansi-native/issues/16).] Jansi 2 seems to have the binaries for Arm in the jar, so I guess we should upgrade to that. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GROOVY-9848) Allow membership operator to work on maps
[ https://issues.apache.org/jira/browse/GROOVY-9848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17249472#comment-17249472 ] Keegan Witt commented on GROOVY-9848: - I'd agree with that. I wouldn't expect a membership operator to mutate the map. > Allow membership operator to work on maps > - > > Key: GROOVY-9848 > URL: https://issues.apache.org/jira/browse/GROOVY-9848 > Project: Groovy > Issue Type: Improvement >Reporter: Keegan Witt >Priority: Major > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (GROOVY-9848) Allow membership operator to work on maps
[ https://issues.apache.org/jira/browse/GROOVY-9848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17244570#comment-17244570 ] Keegan Witt edited comment on GROOVY-9848 at 12/5/20, 8:37 PM: --- [~paulk] A better example of the oddity of {{isCase()}} would be Boolean values. This makes it clear it's not exactly the same as operating on a keyset. For me (on Groovy 3.0.6), that first assert of yours doesn't pass, but these do. {code:java} def map = [a:false, b:true] assert 'a' !in map assert 'b' !in map {code} [~emilles] Yea, I was thinking making it shorthand for {{containsKey()}} would be more natural behavior. was (Author: keegan): [~paulk] A better example of the oddity of {{isCase()}} would be Boolean values. This makes it clear it's not exactly the same as operating on a keyset. For me (on Groovy 3.0.6), that first assert of yours doesn't pass, but these do. {code:java} def map = [a:false, b:true] assert 'a' !in map assert 'b' !in map {code} [~emilles] Yea, I was thinking making it shorthand for {{containsKey()}} would be more natural behavior. > Allow membership operator to work on maps > - > > Key: GROOVY-9848 > URL: https://issues.apache.org/jira/browse/GROOVY-9848 > Project: Groovy > Issue Type: Improvement >Reporter: Keegan Witt >Priority: Major > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GROOVY-9848) Allow membership operator to work on maps
[ https://issues.apache.org/jira/browse/GROOVY-9848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17244570#comment-17244570 ] Keegan Witt commented on GROOVY-9848: - [~paulk] A better example of the oddity of {{isCase()}} would be Boolean values. This makes it clear it's not exactly the same as operating on a keyset. For me (on Groovy 3.0.6), that first assert of yours doesn't pass, but these do. {code:java} def map = [a:false, b:true] assert 'a' !in map assert 'b' !in map {code} [~emilles] Yea, I was thinking making it shorthand for {{containsKey()}} would be more natural behavior. > Allow membership operator to work on maps > - > > Key: GROOVY-9848 > URL: https://issues.apache.org/jira/browse/GROOVY-9848 > Project: Groovy > Issue Type: Improvement >Reporter: Keegan Witt >Priority: Major > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GROOVY-9848) Allow membership operator to work on maps
[ https://issues.apache.org/jira/browse/GROOVY-9848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17244409#comment-17244409 ] Keegan Witt commented on GROOVY-9848: - Yea, I haven't thought through this completely, just wanted to start a conversation based on M3's question in Slack. He kinda expected it to be checking for whether the key is in the map. Since the behavior is kinda odd, maybe it should just be disallowed so it's not confusing what it's doing. > Allow membership operator to work on maps > - > > Key: GROOVY-9848 > URL: https://issues.apache.org/jira/browse/GROOVY-9848 > Project: Groovy > Issue Type: Improvement >Reporter: Keegan Witt >Priority: Major > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (GROOVY-9848) Allow membership operator to work on maps
Keegan Witt created GROOVY-9848: --- Summary: Allow membership operator to work on maps Key: GROOVY-9848 URL: https://issues.apache.org/jira/browse/GROOVY-9848 Project: Groovy Issue Type: Improvement Reporter: Keegan Witt -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (GROOVY-9752) Bump ASM version to 9.0 and JDK 16 support
[ https://issues.apache.org/jira/browse/GROOVY-9752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17239778#comment-17239778 ] Keegan Witt edited comment on GROOVY-9752 at 11/27/20, 4:50 PM: [~marcphilipp] I believe Gradle doesn't support Java 16 yet (see [https://github.com/gradle/gradle/issues/13481).] I made a sample project with both Gradle and Maven. Maven worked fine, but Gradle didn't. was (Author: keegan): [~marcphilipp] I believe Gradle doesn't support Java 16 yet (see [https://github.com/gradle/gradle/issues/13481).] I made a sample project with both Gradle and Maven and Maven worked fine, but Gradle didn't. > Bump ASM version to 9.0 and JDK 16 support > -- > > Key: GROOVY-9752 > URL: https://issues.apache.org/jira/browse/GROOVY-9752 > Project: Groovy > Issue Type: Dependency upgrade >Reporter: Paul King >Assignee: Keegan Witt >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.6 > > > Also add JDK16 to CompilerConfiguration. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GROOVY-9752) Bump ASM version to 9.0 and JDK 16 support
[ https://issues.apache.org/jira/browse/GROOVY-9752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17239778#comment-17239778 ] Keegan Witt commented on GROOVY-9752: - [~marcphilipp] I believe Gradle doesn't support Java 16 yet (see [https://github.com/gradle/gradle/issues/13481).] I made a sample project with both Gradle and Maven and Maven worked fine, but Gradle didn't. > Bump ASM version to 9.0 and JDK 16 support > -- > > Key: GROOVY-9752 > URL: https://issues.apache.org/jira/browse/GROOVY-9752 > Project: Groovy > Issue Type: Dependency upgrade >Reporter: Paul King >Assignee: Keegan Witt >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.6 > > > Also add JDK16 to CompilerConfiguration. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (GROOVY-9777) Stub missing cast, depending on constructor order
[ https://issues.apache.org/jira/browse/GROOVY-9777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17212037#comment-17212037 ] Keegan Witt edited comment on GROOVY-9777 at 10/11/20, 9:04 PM: I think this is because {{selectAccessibleConstructorFromSuper}} chooses the first constructor, but {{printDefaultValue}} (invoked by {{printSpecialConstructorArgs}}) doesn't print the cast for Objects. You can see this by the fact if you change the first constructor to take a {{GroovyObject}} instead of an {{Object}}, it includes the cast. That exclusion appears to have been added for GROOVY-2418 (according to commit message). was (Author: keegan): I think this is because {{selectAccessibleConstructorFromSuper}} chooses the first constructor, but {{printDefaultValue}} (invoked by {{printSpecialConstructorArgs}}) doesn't print the cast for Objects. You can see this by the fact if you change the first constructor to take a {{GroovyObject}} instead of an {{Object}}, it includes the cast. That exclusion was introduced for GROOVY-2418. > Stub missing cast, depending on constructor order > - > > Key: GROOVY-9777 > URL: https://issues.apache.org/jira/browse/GROOVY-9777 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Affects Versions: 3.0.6 >Reporter: Keegan Witt >Priority: Major > > > {code:java} > package org.apache.groovy.tests > class Parent { > Parent(Object context) { > this(context.class.name) > } > Parent(Class context) { > this(context.name) > } > Parent(String context) {} > } > class Child extends Parent { > Child() { > super(Child.class.name) > } > } > {code} > Generates this stub for Child, missing the cast in the constructor > {code:java} > package org.apache.groovy.tests; > import java.lang.*; > import java.util.*; > import java.io.*; > import java.net.*; > import groovy.lang.*; > import groovy.util.*; > public class Child > extends org.apache.groovy.tests.Parent { > ; > public Child > () { > super (null); > } > @groovy.transform.Generated() @groovy.transform.Internal() > @java.beans.Transient() public groovy.lang.MetaClass getMetaClass() { return > (groovy.lang.MetaClass)null;} > @groovy.transform.Generated() @groovy.transform.Internal() public void > setMetaClass(groovy.lang.MetaClass mc) { } > } > {code} > Which causes the Java compilation to fail > {noformat} > Child.java:[14,1] reference to Parent is ambiguous >both constructor Parent(java.lang.Class) in > org.apache.groovy.tests.Parent and constructor Parent(java.lang.String) in > org.apache.groovy.tests.Parent match > {noformat} > > But > {code:java} > package org.apache.groovy.tests > class Parent { > Parent(Class context) { > this(context.name) > } > Parent(String context) {} > Parent(Object context) { > this(context.class.name) > } > } > class Child extends Parent { > Child() { > super(Child.class.name) > } > } > {code} > Generates this stub for Child, with the cast in it > {code:java} > package org.apache.groovy.tests; > import java.lang.*; > import java.util.*; > import java.io.*; > import java.net.*; > import groovy.lang.*; > import groovy.util.*; > public class Child > extends org.apache.groovy.tests.Parent { > ; > public Child > () { > super ((java.lang.Class)null); > } > @groovy.transform.Generated() @groovy.transform.Internal() > @java.beans.Transient() public groovy.lang.MetaClass getMetaClass() { return > (groovy.lang.MetaClass)null;} > @groovy.transform.Generated() @groovy.transform.Internal() public void > setMetaClass(groovy.lang.MetaClass mc) { } > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GROOVY-9777) Stub missing cast, depending on constructor order
[ https://issues.apache.org/jira/browse/GROOVY-9777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17212037#comment-17212037 ] Keegan Witt commented on GROOVY-9777: - I think this is because {{selectAccessibleConstructorFromSuper}} chooses the first constructor, but {{printDefaultValue}} (invoked by {{printSpecialConstructorArgs}}) doesn't print the cast for Objects. You can see this by the fact if you change the first constructor to take a {{GroovyObject}} instead of an {{Object}}, it includes the cast. That exclusion was introduced for GROOVY-2418. > Stub missing cast, depending on constructor order > - > > Key: GROOVY-9777 > URL: https://issues.apache.org/jira/browse/GROOVY-9777 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Affects Versions: 3.0.6 >Reporter: Keegan Witt >Priority: Major > > > {code:java} > package org.apache.groovy.tests > class Parent { > Parent(Object context) { > this(context.class.name) > } > Parent(Class context) { > this(context.name) > } > Parent(String context) {} > } > class Child extends Parent { > Child() { > super(Child.class.name) > } > } > {code} > Generates this stub for Child, missing the cast in the constructor > {code:java} > package org.apache.groovy.tests; > import java.lang.*; > import java.util.*; > import java.io.*; > import java.net.*; > import groovy.lang.*; > import groovy.util.*; > public class Child > extends org.apache.groovy.tests.Parent { > ; > public Child > () { > super (null); > } > @groovy.transform.Generated() @groovy.transform.Internal() > @java.beans.Transient() public groovy.lang.MetaClass getMetaClass() { return > (groovy.lang.MetaClass)null;} > @groovy.transform.Generated() @groovy.transform.Internal() public void > setMetaClass(groovy.lang.MetaClass mc) { } > } > {code} > Which causes the Java compilation to fail > {noformat} > Child.java:[14,1] reference to Parent is ambiguous >both constructor Parent(java.lang.Class) in > org.apache.groovy.tests.Parent and constructor Parent(java.lang.String) in > org.apache.groovy.tests.Parent match > {noformat} > > But > {code:java} > package org.apache.groovy.tests > class Parent { > Parent(Class context) { > this(context.name) > } > Parent(String context) {} > Parent(Object context) { > this(context.class.name) > } > } > class Child extends Parent { > Child() { > super(Child.class.name) > } > } > {code} > Generates this stub for Child, with the cast in it > {code:java} > package org.apache.groovy.tests; > import java.lang.*; > import java.util.*; > import java.io.*; > import java.net.*; > import groovy.lang.*; > import groovy.util.*; > public class Child > extends org.apache.groovy.tests.Parent { > ; > public Child > () { > super ((java.lang.Class)null); > } > @groovy.transform.Generated() @groovy.transform.Internal() > @java.beans.Transient() public groovy.lang.MetaClass getMetaClass() { return > (groovy.lang.MetaClass)null;} > @groovy.transform.Generated() @groovy.transform.Internal() public void > setMetaClass(groovy.lang.MetaClass mc) { } > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9777) Stub missing cast, depending on constructor order
[ https://issues.apache.org/jira/browse/GROOVY-9777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt updated GROOVY-9777: Description: {code:java} package org.apache.groovy.tests class Parent { Parent(Object context) { this(context.class.name) } Parent(Class context) { this(context.name) } Parent(String context) {} } class Child extends Parent { Child() { super(Child.class.name) } } {code} Generates this stub for Child, missing the cast in the constructor {code:java} package org.apache.groovy.tests; import java.lang.*; import java.util.*; import java.io.*; import java.net.*; import groovy.lang.*; import groovy.util.*; public class Child extends org.apache.groovy.tests.Parent { ; public Child () { super (null); } @groovy.transform.Generated() @groovy.transform.Internal() @java.beans.Transient() public groovy.lang.MetaClass getMetaClass() { return (groovy.lang.MetaClass)null;} @groovy.transform.Generated() @groovy.transform.Internal() public void setMetaClass(groovy.lang.MetaClass mc) { } } {code} Which causes the Java compilation to fail {noformat} Child.java:[14,1] reference to Parent is ambiguous both constructor Parent(java.lang.Class) in org.apache.groovy.tests.Parent and constructor Parent(java.lang.String) in org.apache.groovy.tests.Parent match {noformat} But {code:java} package org.apache.groovy.tests class Parent { Parent(Class context) { this(context.name) } Parent(String context) {} Parent(Object context) { this(context.class.name) } } class Child extends Parent { Child() { super(Child.class.name) } } {code} Generates this stub for Child, with the cast in it {code:java} package org.apache.groovy.tests; import java.lang.*; import java.util.*; import java.io.*; import java.net.*; import groovy.lang.*; import groovy.util.*; public class Child extends org.apache.groovy.tests.Parent { ; public Child () { super ((java.lang.Class)null); } @groovy.transform.Generated() @groovy.transform.Internal() @java.beans.Transient() public groovy.lang.MetaClass getMetaClass() { return (groovy.lang.MetaClass)null;} @groovy.transform.Generated() @groovy.transform.Internal() public void setMetaClass(groovy.lang.MetaClass mc) { } } {code} was: {code:java} package org.apache.groovy.tests class Parent { Parent(Object context) { this(context.class.name) } Parent(Class context) { this(context.name) } Parent(String context) {} } class Child extends Parent { Child() { super(Child.class.name) } } {code} Generates this stub for Child, missing the cast in the constructor {code:java} package org.apache.groovy.tests; import java.lang.*; import java.util.*; import java.io.*; import java.net.*; import groovy.lang.*; import groovy.util.*; public class Child extends org.apache.groovy.tests.Parent { ; public Child () { super (null); } @groovy.transform.Generated() @groovy.transform.Internal() @java.beans.Transient() public groovy.lang.MetaClass getMetaClass() { return (groovy.lang.MetaClass)null;} @groovy.transform.Generated() @groovy.transform.Internal() public void setMetaClass(groovy.lang.MetaClass mc) { } } {code} But {code:java} package org.apache.groovy.tests class Parent { Parent(Class context) { this(context.name) } Parent(String context) {} Parent(Object context) { this(context.class.name) } } class Child extends Parent { Child() { super(Child.class.name) } } {code} Generates this stub for Child, with the cast in it {code:java} package org.apache.groovy.tests; import java.lang.*; import java.util.*; import java.io.*; import java.net.*; import groovy.lang.*; import groovy.util.*; public class Child extends org.apache.groovy.tests.Parent { ; public Child () { super ((java.lang.Class)null); } @groovy.transform.Generated() @groovy.transform.Internal() @java.beans.Transient() public groovy.lang.MetaClass getMetaClass() { return (groovy.lang.MetaClass)null;} @groovy.transform.Generated() @groovy.transform.Internal() public void setMetaClass(groovy.lang.MetaClass mc) { } } {code} > Stub missing cast, depending on constructor order > - > > Key: GROOVY-9777 > URL: https://issues.apache.org/jira/browse/GROOVY-9777 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Affects Versions: 3.0.6 >Reporter: Keegan Witt >Priority: Major > > > {code:java} > package org.apache.groovy.tests > class Parent { > Parent(Object context) { > this(context.class.name) > } > Parent(Class context) { > this(context.name) > } > Parent(String context) {} > } > class Child extends Parent { > Child() { >
[jira] [Updated] (GROOVY-9777) Stub missing cast, depending on constructor order
[ https://issues.apache.org/jira/browse/GROOVY-9777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt updated GROOVY-9777: Description: {code:java} package org.apache.groovy.tests class Parent { Parent(Object context) { this(context.class.name) } Parent(Class context) { this(context.name) } Parent(String context) {} } class Child extends Parent { Child() { super(Child.class.name) } } {code} Generates this stub for Child, missing the cast in the constructor {code:java} package org.apache.groovy.tests; import java.lang.*; import java.util.*; import java.io.*; import java.net.*; import groovy.lang.*; import groovy.util.*; public class Child extends org.apache.groovy.tests.Parent { ; public Child () { super (null); } @groovy.transform.Generated() @groovy.transform.Internal() @java.beans.Transient() public groovy.lang.MetaClass getMetaClass() { return (groovy.lang.MetaClass)null;} @groovy.transform.Generated() @groovy.transform.Internal() public void setMetaClass(groovy.lang.MetaClass mc) { } } {code} But {code:java} package org.apache.groovy.tests class Parent { Parent(Class context) { this(context.name) } Parent(String context) {} Parent(Object context) { this(context.class.name) } } class Child extends Parent { Child() { super(Child.class.name) } } {code} Generates this stub for Child, with the cast in it {code:java} package org.apache.groovy.tests; import java.lang.*; import java.util.*; import java.io.*; import java.net.*; import groovy.lang.*; import groovy.util.*; public class Child extends org.apache.groovy.tests.Parent { ; public Child () { super ((java.lang.Class)null); } @groovy.transform.Generated() @groovy.transform.Internal() @java.beans.Transient() public groovy.lang.MetaClass getMetaClass() { return (groovy.lang.MetaClass)null;} @groovy.transform.Generated() @groovy.transform.Internal() public void setMetaClass(groovy.lang.MetaClass mc) { } } {code} was: {code:java} package org.apache.groovy.tests class Parent { Parent(Object context) { this(context.class.name) } Parent(Class context) { this(context.name) } Parent(String context) {} } class Child extends Parent { Child() { super(Child.class.name) } } {code} Generates this stub for Child, missing the cast in the constructor {code:java} package org.apache.groovy.tests; import java.lang.*; import java.util.*; import java.io.*; import java.net.*; import groovy.lang.*; import groovy.util.*; public class Child extends org.apache.groovy.tests.Parent { ; public Child () { super (null); } @groovy.transform.Generated() @groovy.transform.Internal() @java.beans.Transient() public groovy.lang.MetaClass getMetaClass() { return (groovy.lang.MetaClass)null;} @groovy.transform.Generated() @groovy.transform.Internal() public void setMetaClass(groovy.lang.MetaClass mc) { } } {code} But {code:java} package org.apache.groovy.tests class Parent { Parent(Class context) { this(context.name) } Parent(String context) {} Parent(Object context) { this(context.class.name) } } class Child extends Parent { Child() { super(Child.class.name) } } {code} Generates this stub for Child, with the cast in it {code:java} package org.apache.groovy.tests; import java.lang.*; import java.util.*; import java.io.*; import java.net.*; import groovy.lang.*; import groovy.util.*; public class Child extends org.apache.groovy.tests.Parent { ; public Child () { super ((java.lang.Class)null); } @groovy.transform.Generated() @groovy.transform.Internal() @java.beans.Transient() public groovy.lang.MetaClass getMetaClass() { return (groovy.lang.MetaClass)null;} @groovy.transform.Generated() @groovy.transform.Internal() public void setMetaClass(groovy.lang.MetaClass mc) { } } {code} > Stub missing cast, depending on constructor order > - > > Key: GROOVY-9777 > URL: https://issues.apache.org/jira/browse/GROOVY-9777 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Affects Versions: 3.0.6 >Reporter: Keegan Witt >Priority: Major > > > {code:java} > package org.apache.groovy.tests > class Parent { > Parent(Object context) { > this(context.class.name) > } > Parent(Class context) { > this(context.name) > } > Parent(String context) {} > } > class Child extends Parent { > Child() { > super(Child.class.name) > } > } > {code} > Generates this stub for Child, missing the cast in the constructor > {code:java} > package org.apache.groovy.tests; > import java.lang.*; > import java.util.*; > import java.io.*; > import java.net.*; > import groovy.lang.*; >
[jira] [Created] (GROOVY-9777) Stub missing cast, depending on constructor order
Keegan Witt created GROOVY-9777: --- Summary: Stub missing cast, depending on constructor order Key: GROOVY-9777 URL: https://issues.apache.org/jira/browse/GROOVY-9777 Project: Groovy Issue Type: Bug Components: Stub generator / Joint compiler Affects Versions: 3.0.6 Reporter: Keegan Witt {code:java} package org.apache.groovy.tests class Parent { Parent(Object context) { this(context.class.name) } Parent(Class context) { this(context.name) } Parent(String context) {} } class Child extends Parent { Child() { super(Child.class.name) } } {code} Generates this stub for Child, missing the cast in the constructor {code:java} package org.apache.groovy.tests; import java.lang.*; import java.util.*; import java.io.*; import java.net.*; import groovy.lang.*; import groovy.util.*; public class Child extends org.apache.groovy.tests.Parent { ; public Child () { super (null); } @groovy.transform.Generated() @groovy.transform.Internal() @java.beans.Transient() public groovy.lang.MetaClass getMetaClass() { return (groovy.lang.MetaClass)null;} @groovy.transform.Generated() @groovy.transform.Internal() public void setMetaClass(groovy.lang.MetaClass mc) { } } {code} But {code:java} package org.apache.groovy.tests class Parent { Parent(Class context) { this(context.name) } Parent(String context) {} Parent(Object context) { this(context.class.name) } } class Child extends Parent { Child() { super(Child.class.name) } } {code} Generates this stub for Child, with the cast in it {code:java} package org.apache.groovy.tests; import java.lang.*; import java.util.*; import java.io.*; import java.net.*; import groovy.lang.*; import groovy.util.*; public class Child extends org.apache.groovy.tests.Parent { ; public Child () { super ((java.lang.Class)null); } @groovy.transform.Generated() @groovy.transform.Internal() @java.beans.Transient() public groovy.lang.MetaClass getMetaClass() { return (groovy.lang.MetaClass)null;} @groovy.transform.Generated() @groovy.transform.Internal() public void setMetaClass(groovy.lang.MetaClass mc) { } } {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (GROOVY-9752) Bump ASM version to 9.0
[ https://issues.apache.org/jira/browse/GROOVY-9752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt resolved GROOVY-9752. - Resolution: Fixed > Bump ASM version to 9.0 > --- > > Key: GROOVY-9752 > URL: https://issues.apache.org/jira/browse/GROOVY-9752 > Project: Groovy > Issue Type: Dependency upgrade >Reporter: Paul King >Assignee: Keegan Witt >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.6 > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9752) Bump ASM version to 9.0
[ https://issues.apache.org/jira/browse/GROOVY-9752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt updated GROOVY-9752: Description: Also add JDK16 to CompilerConfiguration. > Bump ASM version to 9.0 > --- > > Key: GROOVY-9752 > URL: https://issues.apache.org/jira/browse/GROOVY-9752 > Project: Groovy > Issue Type: Dependency upgrade >Reporter: Paul King >Assignee: Keegan Witt >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.6 > > > Also add JDK16 to CompilerConfiguration. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9752) Bump ASM version to 9.0
[ https://issues.apache.org/jira/browse/GROOVY-9752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt updated GROOVY-9752: Fix Version/s: 3.0.6 4.0.0-alpha-1 > Bump ASM version to 9.0 > --- > > Key: GROOVY-9752 > URL: https://issues.apache.org/jira/browse/GROOVY-9752 > Project: Groovy > Issue Type: Dependency upgrade >Reporter: Paul King >Assignee: Keegan Witt >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.6 > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (GROOVY-9752) Bump ASM version to 9.0
[ https://issues.apache.org/jira/browse/GROOVY-9752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt reassigned GROOVY-9752: --- Assignee: Keegan Witt > Bump ASM version to 9.0 > --- > > Key: GROOVY-9752 > URL: https://issues.apache.org/jira/browse/GROOVY-9752 > Project: Groovy > Issue Type: Dependency upgrade >Reporter: Paul King >Assignee: Keegan Witt >Priority: Major > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9717) 3.0 stubs include packages annotations on classes other than package-info.groovy
[ https://issues.apache.org/jira/browse/GROOVY-9717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt updated GROOVY-9717: Description: {code:java} @CustomAnnotation package com.foo class Foo {} @interface CustomAnnotation {} {code} Generates a stub that has {{@com.foo.CustomAnnotation package com.foo}} in _Foo.java_, which javac won't compile because it requires package annotations to be in _package-info.java_. Groovy 2.4 and 2.5 don't include this annotation in the stub. Ideally, the annotation would be included if in _package-info.groovy_, and otherwise omitted. But if we had to, and always omitted it, it at least wouldn't be a regression (assuming this difference wasn't made on purpose). Possibly we should also consider having the Groovy compiler not allow annotations on packages if not in package-info.groovy, though this would have to be a Groovy 4 thing, and only if it makes sense. was: {code:java} @CustomAnnotation package com.foo class Foo {} @interface CustomAnnotation {} {code} Generates a stub that has {{@com.foo.CustomAnnotation package com.foo}} in _Foo.java_, which javac won't compile because it requires package annotations to be in _package-info.java_. Groovy 2.4 and 2.5 don't include this annotation in the stub. Ideally, the annotation would be included if in _package-info.groovy_, and otherwise omitted. But if we had to, and always omitted it, it at least wouldn't be a regression (assuming this difference wasn't made on purpose). Possibly we should also consider having the Groovy compiler not allow annotations on packages if not in package-info.groovy, though this would have to be a Groovy 4 thing, and not only if it makes sense. > 3.0 stubs include packages annotations on classes other than > package-info.groovy > > > Key: GROOVY-9717 > URL: https://issues.apache.org/jira/browse/GROOVY-9717 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Reporter: Keegan Witt >Assignee: Paul King >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.6 > > > {code:java} > @CustomAnnotation > package com.foo > class Foo {} > @interface CustomAnnotation {} > {code} > Generates a stub that has {{@com.foo.CustomAnnotation package com.foo}} in > _Foo.java_, which javac won't compile because it requires package annotations > to be in _package-info.java_. Groovy 2.4 and 2.5 don't include this > annotation in the stub. > Ideally, the annotation would be included if in _package-info.groovy_, and > otherwise omitted. But if we had to, and always omitted it, it at least > wouldn't be a regression (assuming this difference wasn't made on purpose). > Possibly we should also consider having the Groovy compiler not allow > annotations on packages if not in package-info.groovy, though this would have > to be a Groovy 4 thing, and only if it makes sense. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9717) 3.0 stubs include packages annotations on classes other than package-info.groovy
[ https://issues.apache.org/jira/browse/GROOVY-9717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt updated GROOVY-9717: Description: {code:java} @CustomAnnotation package com.foo class Foo {} @interface CustomAnnotation {} {code} Generates a stub that has {{@com.foo.CustomAnnotation package com.foo}} in _Foo.java_, which javac won't compile because it requires package annotations to be in _package-info.java_. Groovy 2.4 and 2.5 don't include this annotation in the stub. Ideally, the annotation would be included if in _package-info.groovy_, and otherwise omitted. But if we had to, and always omitted it, it at least wouldn't be a regression (assuming this difference wasn't made on purpose). Possibly we should also consider having the Groovy compiler not allow annotations on packages if not in package-info.groovy, though this would have to be a Groovy 4 thing, and not only if it makes sense. was: {code:java} @CustomAnnotation package com.foo Foo {} @interface CustomAnnotation {} {code} Generates a stub that has {{@com.foo.CustomAnnotation package com.foo}} in _Foo.java_, which javac won't compile because it requires package annotations to be in _package-info.java_. Groovy 2.4 and 2.5 don't include this annotation in the stub. Ideally, the annotation would be included if in _package-info.groovy_, and otherwise omitted. But if we had to, and always omitted it, it at least wouldn't be a regression (assuming this difference wasn't made on purpose). Possibly we should also consider having the Groovy compiler not allow annotations on packages if not in package-info.groovy, though this would have to be a Groovy 4 thing, and not only if it makes sense. > 3.0 stubs include packages annotations on classes other than > package-info.groovy > > > Key: GROOVY-9717 > URL: https://issues.apache.org/jira/browse/GROOVY-9717 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Reporter: Keegan Witt >Priority: Major > > {code:java} > @CustomAnnotation > package com.foo > class Foo {} > @interface CustomAnnotation {} > {code} > Generates a stub that has {{@com.foo.CustomAnnotation package com.foo}} in > _Foo.java_, which javac won't compile because it requires package annotations > to be in _package-info.java_. Groovy 2.4 and 2.5 don't include this > annotation in the stub. > Ideally, the annotation would be included if in _package-info.groovy_, and > otherwise omitted. But if we had to, and always omitted it, it at least > wouldn't be a regression (assuming this difference wasn't made on purpose). > Possibly we should also consider having the Groovy compiler not allow > annotations on packages if not in package-info.groovy, though this would have > to be a Groovy 4 thing, and not only if it makes sense. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9717) 3.0 stubs include packages annotations on classes other than package-info.groovy
[ https://issues.apache.org/jira/browse/GROOVY-9717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt updated GROOVY-9717: Description: {code:java} @CustomAnnotation package com.foo Foo {} @interface CustomAnnotation {} {code} Generates a stub that has {{@com.foo.CustomAnnotation package com.foo}} in _Foo.java_, which javac won't compile because it requires package annotations to be in _package-info.java_. Groovy 2.4 and 2.5 don't include this annotation in the stub. Ideally, the annotation would be included if in _package-info.groovy_, and otherwise omitted. But if we had to, and always omitted it, it at least wouldn't be a regression (assuming this difference wasn't made on purpose). Possibly we should also consider having the Groovy compiler not allow annotations on packages if not in package-info.groovy, though this would have to be a Groovy 4 thing, and not only if it makes sense. was: {code:java} @CustomAnnotation package com.foo Foo {} @interface CustomAnnotation {} {code} Generates a stub that has {{@com.foo.CustomAnnotationpackage}} in _Foo.java_, which javac won't compile because it requires package annotations to be in _package-info.java_. Groovy 2.4 and 2.5 don't include this annotation in the stub. Ideally, the annotation would be included if in _package-info.groovy_, and otherwise omitted. But if we had to, and always omitted it, it at least wouldn't be a regression (assuming this difference wasn't made on purpose). Possibly we should also consider having the Groovy compiler not allow annotations on packages if not in package-info.groovy, though this would have to be a Groovy 4 thing, and not only if it makes sense. > 3.0 stubs include packages annotations on classes other than > package-info.groovy > > > Key: GROOVY-9717 > URL: https://issues.apache.org/jira/browse/GROOVY-9717 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Reporter: Keegan Witt >Priority: Major > > {code:java} > @CustomAnnotation > package com.foo > Foo {} > @interface CustomAnnotation {} > {code} > Generates a stub that has {{@com.foo.CustomAnnotation package com.foo}} in > _Foo.java_, which javac won't compile because it requires package annotations > to be in _package-info.java_. Groovy 2.4 and 2.5 don't include this > annotation in the stub. > Ideally, the annotation would be included if in _package-info.groovy_, and > otherwise omitted. But if we had to, and always omitted it, it at least > wouldn't be a regression (assuming this difference wasn't made on purpose). > Possibly we should also consider having the Groovy compiler not allow > annotations on packages if not in package-info.groovy, though this would have > to be a Groovy 4 thing, and not only if it makes sense. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9717) 3.0 stubs include packages annotations on classes other than package-info.groovy
[ https://issues.apache.org/jira/browse/GROOVY-9717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt updated GROOVY-9717: Description: {code:java} @CustomAnnotation package com.foo Foo {} @interface CustomAnnotation {} {code} Generates a stub that has {{@com.foo.CustomAnnotationpackage}} in _Foo.java_, which javac won't compile because it requires package annotations to be in _package-info.java_. Groovy 2.4 and 2.5 don't include this annotation in the stub. Ideally, the annotation would be included if in _package-info.groovy_, and otherwise omitted. But if we had to, and always omitted it, it at least wouldn't be a regression (assuming this difference wasn't made on purpose). Possibly we should also consider having the Groovy compiler not allow annotations on packages if not in package-info.groovy, though this would have to be a Groovy 4 thing, and not only if it makes sense. was: {code:java} @CustomAnnotation package com.foo Foo {} @interface CustomAnnotation {} {code} Generates a stub that has {{@com.foo.CustomAnnotationpackage}} in _Foo.java_, which javac won't compile because it requires package annotations to be in _package-info.java_. Groovy 2.4 and 2.5 don't include this annotation in the stub. Ideally, the annotation would be included if in _package-info.groovy_, and otherwise omitted. But if we had to, and always omitted it, it at least wouldn't be a regression (assuming this difference wasn't made on purpose). Possibly we should also consider having the Groovy compiler not allow annotations on packages if not in package-info.groovy. I'm not clear what use cases there are for using the annotation outside a package info file. > 3.0 stubs include packages annotations on classes other than > package-info.groovy > > > Key: GROOVY-9717 > URL: https://issues.apache.org/jira/browse/GROOVY-9717 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Reporter: Keegan Witt >Priority: Major > > {code:java} > @CustomAnnotation > package com.foo > Foo {} > @interface CustomAnnotation {} > {code} > Generates a stub that has {{@com.foo.CustomAnnotationpackage}} in _Foo.java_, > which javac won't compile because it requires package annotations to be in > _package-info.java_. Groovy 2.4 and 2.5 don't include this annotation in the > stub. > Ideally, the annotation would be included if in _package-info.groovy_, and > otherwise omitted. But if we had to, and always omitted it, it at least > wouldn't be a regression (assuming this difference wasn't made on purpose). > Possibly we should also consider having the Groovy compiler not allow > annotations on packages if not in package-info.groovy, though this would have > to be a Groovy 4 thing, and not only if it makes sense. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (GROOVY-9717) 3.0 stubs include packages annotations on classes other than package-info.groovy
Keegan Witt created GROOVY-9717: --- Summary: 3.0 stubs include packages annotations on classes other than package-info.groovy Key: GROOVY-9717 URL: https://issues.apache.org/jira/browse/GROOVY-9717 Project: Groovy Issue Type: Bug Components: Stub generator / Joint compiler Reporter: Keegan Witt {code:java} @CustomAnnotation package com.foo Foo {} @interface CustomAnnotation {} {code} Generates a stub that has {{@com.foo.CustomAnnotationpackage}} in _Foo.java_, which javac won't compile because it requires package annotations to be in _package-info.java_. Groovy 2.4 and 2.5 don't include this annotation in the stub. Ideally, the annotation would be included if in _package-info.groovy_, and otherwise omitted. But if we had to, and always omitted it, it at least wouldn't be a regression (assuming this difference wasn't made on purpose). Possibly we should also consider having the Groovy compiler not allow annotations on packages if not in package-info.groovy. I'm not clear what use cases there are for using the annotation outside a package info file. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GROOVY-9377) Support JDK15
[ https://issues.apache.org/jira/browse/GROOVY-9377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17070196#comment-17070196 ] Keegan Witt commented on GROOVY-9377: - Updated fix version 3.0.0 -> 3.0.3, and cherry-picked into 3.0.X branch. > Support JDK15 > - > > Key: GROOVY-9377 > URL: https://issues.apache.org/jira/browse/GROOVY-9377 > Project: Groovy > Issue Type: Improvement >Reporter: Paul King >Assignee: Paul King >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.3 > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-9377) Support JDK15
[ https://issues.apache.org/jira/browse/GROOVY-9377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt updated GROOVY-9377: Fix Version/s: (was: 3.0.0) 3.0.3 > Support JDK15 > - > > Key: GROOVY-9377 > URL: https://issues.apache.org/jira/browse/GROOVY-9377 > Project: Groovy > Issue Type: Improvement >Reporter: Paul King >Assignee: Paul King >Priority: Major > Fix For: 4.0.0-alpha-1, 3.0.3 > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GROOVY-9073) Support preview features in compiled classes
[ https://issues.apache.org/jira/browse/GROOVY-9073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16823511#comment-16823511 ] Keegan Witt commented on GROOVY-9073: - {quote}Using the preview switch and also using -Dgroovy.target.bytecode=12 when calling groovyc seems to then produce class files with the required bytecode versions. The Java compiler seems to prohibit setting the preview flag for older bytecode versions, e.g. JDK11 and earlier. Currently we allow this - even though the produced class files can't be run, we might want to fail early with some kind of compiler error message in this case (or some of the cases). {quote} That is correct. I was following the pattern we did with the `--parameters` option (GROOVY-7423), which doesn't work with Java previous to 8 ([JEP 118|https://openjdk.java.net/jeps/118]), but we don't check the Java version. Lemme know if you think we should add a check in this case. {quote}I'd suggest using --enable-preview as the long switch (we can leave the short switch as is perhaps or just omit it). This will better match error message from the JDK: Caught: java.lang.UnsupportedClassVersionError: Preview features are not enabled for JEP325G (class file version 56.65535). Try running with '--enable-preview'. {quote} {quote}The other comment wrt doco is to do with whether this flag would ever be used with Groovy preview features. We could piggy back on the JDK concept but we currently don't and should mention that at least in the release notes so that folks understand this is just for JDK features at present. {quote} I've updated the PR for these. Lemme know if the doc can be any clearer that it's specifically for Java features. I'd assume if we were to ever add a similar flag to Groovy, we'd have a separate flag to control that. {quote}The class files produced from above can be successfully run from java with the appropriate switch and classspath set. Such classes can be run from Groovy without the preview flag set (so long as they don't refer to any preview Java class files) but can't be run with the preview flag set! And indeed just running any script, e.g. groovy --preview -e "println new Date()" will give the UnsupportedClassVersionError message as above. I suspect there is both a runtime and compile-time notion of version/bytecode version and we haven't married those up properly yet. {quote} Hmm – I'll do some testing around this. I hadn't really tested this out yet. > Support preview features in compiled classes > > > Key: GROOVY-9073 > URL: https://issues.apache.org/jira/browse/GROOVY-9073 > Project: Groovy > Issue Type: Improvement > Components: Compiler >Reporter: Keegan Witt >Assignee: Keegan Witt >Priority: Major > Fix For: 3.0.0-beta-1, 2.5.7 > > Attachments: groovy9073_tweaks.patch > > Time Spent: 1.5h > Remaining Estimate: 0h > > In order to support the preview features ([JEP > 12|https://openjdk.java.net/jeps/12]), we need a new compiler flag to set the > [V_PREVIEW|https://asm.ow2.io/javadoc/org/objectweb/asm/Opcodes.html#V_PREVIEW] > opcode (to achieve the equivalent of {{--enable-preview}} mentioned in > [JDK-8195734|https://bugs.openjdk.java.net/browse/JDK-8195734]). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (GROOVY-9073) Support preview features in compiled classes
[ https://issues.apache.org/jira/browse/GROOVY-9073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16812693#comment-16812693 ] Keegan Witt commented on GROOVY-9073: - PR: https://github.com/apache/groovy/pull/906 > Support preview features in compiled classes > > > Key: GROOVY-9073 > URL: https://issues.apache.org/jira/browse/GROOVY-9073 > Project: Groovy > Issue Type: Improvement > Components: Compiler >Reporter: Keegan Witt >Assignee: Keegan Witt >Priority: Major > Fix For: 3.0.0-beta-1, 2.5.7 > > Time Spent: 10m > Remaining Estimate: 0h > > In order to support the preview features ([JEP > 12|https://openjdk.java.net/jeps/12]), we need a new compiler flag to set the > [V_PREVIEW|https://asm.ow2.io/javadoc/org/objectweb/asm/Opcodes.html#V_PREVIEW] > opcode (to achieve the equivalent of {{--enable-preview}} mentioned in > [JDK-8195734|https://bugs.openjdk.java.net/browse/JDK-8195734]). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (GROOVY-9073) Support preview features in compiled classes
Keegan Witt created GROOVY-9073: --- Summary: Support preview features in compiled classes Key: GROOVY-9073 URL: https://issues.apache.org/jira/browse/GROOVY-9073 Project: Groovy Issue Type: Improvement Reporter: Keegan Witt Assignee: Keegan Witt In order to support the preview features ([JEP 12)|https://openjdk.java.net/jeps/12]), we need a new compiler flag to set the [V_PREVIEW|https://asm.ow2.io/javadoc/org/objectweb/asm/Opcodes.html#V_PREVIEW] opcode (to achieve the equivalent of {{--enable-preview}} mentioned in [JDK-8195734|https://bugs.openjdk.java.net/browse/JDK-8195734]). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (GROOVY-9031) Traits using generics generate incorrect stub
Keegan Witt created GROOVY-9031: --- Summary: Traits using generics generate incorrect stub Key: GROOVY-9031 URL: https://issues.apache.org/jira/browse/GROOVY-9031 Project: Groovy Issue Type: Bug Components: Stub generator / Joint compiler Affects Versions: 2.5.6 Reporter: Keegan Witt {code:groovy} trait Test { V value } class TestImpl implements Test { } {code} Generates a stub like this {code:groovy} import java.lang.*; import java.io.*; import java.net.*; import java.util.*; import groovy.lang.*; import groovy.util.*; public class TestImpl extends java.lang.Object implements Test,groovy.lang.GroovyObject { ; @groovy.transform.Generated() @groovy.transform.Internal() public groovy.lang.MetaClass getMetaClass() { return (groovy.lang.MetaClass)null;} @groovy.transform.Generated() @groovy.transform.Internal() public void setMetaClass(groovy.lang.MetaClass mc) { } @groovy.transform.Generated() @groovy.transform.Internal() public java.lang.Object invokeMethod(java.lang.String method, java.lang.Object arguments) { return null;} @groovy.transform.Generated() @groovy.transform.Internal() public java.lang.Object getProperty(java.lang.String property) { return null;} @groovy.transform.Generated() @groovy.transform.Internal() public void setProperty(java.lang.String property, java.lang.Object value) { } public V getValue() { return null;} public void setValue(V value) { } } {code} Note that {{value}} has type {{V}} instead of type {{String}} and the generic reference isn't declared in the class either. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (GROOVY-8895) Traits defining getter conflicts with generated getter
Keegan Witt created GROOVY-8895: --- Summary: Traits defining getter conflicts with generated getter Key: GROOVY-8895 URL: https://issues.apache.org/jira/browse/GROOVY-8895 Project: Groovy Issue Type: Bug Components: Stub generator / Joint compiler Reporter: Keegan Witt {code:java} class Foo { } trait GetFoo { abstract Foo getFoo() } class BaseFooSpec { Foo foo } class FooSpec extends BaseFooSpec implements GetFoo { } {code} Generates a stub for FooSpec with {code:java} public class FooSpec extends BaseFooSpec implements GetFoo,groovy.lang.GroovyObject { ; @groovy.transform.Generated() @groovy.transform.Internal() public groovy.lang.MetaClass getMetaClass() { return (groovy.lang.MetaClass)null;} @groovy.transform.Generated() @groovy.transform.Internal() public void setMetaClass(groovy.lang.MetaClass mc) { } @groovy.transform.Generated() @groovy.transform.Internal() public java.lang.Object invokeMethod(java.lang.String method, java.lang.Object arguments) { return null;} @groovy.transform.Generated() @groovy.transform.Internal() public java.lang.Object getProperty(java.lang.String property) { return null;} @groovy.transform.Generated() @groovy.transform.Internal() public void setProperty(java.lang.String property, java.lang.Object value) { } public abstract Foo getFoo(); } {code} Note the {{getFoo()}} is still {{abstract}} instead of using the getter generated from _BaseFooSpec_. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (GROOVY-8783) Support Java 9/10/11 bytecode
[ https://issues.apache.org/jira/browse/GROOVY-8783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16612842#comment-16612842 ] Keegan Witt commented on GROOVY-8783: - Good idea. Should that go into the 2.5.x branch too? Or just master? > Support Java 9/10/11 bytecode > - > > Key: GROOVY-8783 > URL: https://issues.apache.org/jira/browse/GROOVY-8783 > Project: Groovy > Issue Type: Improvement > Components: Compiler >Affects Versions: 3.0.0-alpha-3, 2.5.2 >Reporter: Keegan Witt >Assignee: Keegan Witt >Priority: Major > Fix For: 3.0.0-alpha-4, 2.5.3 > > > 2.5.x doesn't support Java 9, 10, or 11 bytecode targets with both indy and > non-indy. Fixed in > [apache/groovy@{{b9f85fd}}|https://github.com/apache/groovy/commit/b9f85fd32da7b06c1b8a35d176911da40c762e33] > 3.0.x doesn't support Java 9, 10, or 11 bytecode targets with indy. Fixed in > [apache/groovy@{{9a8b38f}}|https://github.com/apache/groovy/commit/9a8b38f545ff000f67cb886e4141a37a21f77b7d]. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (GROOVY-8783) Support Java 9/10/11 bytecode
[ https://issues.apache.org/jira/browse/GROOVY-8783?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt resolved GROOVY-8783. - Resolution: Fixed > Support Java 9/10/11 bytecode > - > > Key: GROOVY-8783 > URL: https://issues.apache.org/jira/browse/GROOVY-8783 > Project: Groovy > Issue Type: Improvement > Components: Compiler >Affects Versions: 3.0.0-alpha-3, 2.5.2 >Reporter: Keegan Witt >Assignee: Keegan Witt >Priority: Major > Fix For: 3.0.0-alpha-4, 2.5.3 > > > 2.5.x doesn't support Java 9, 10, or 11 bytecode targets with both indy and > non-indy. Fixed in > [apache/groovy@{{b9f85fd}}|https://github.com/apache/groovy/commit/b9f85fd32da7b06c1b8a35d176911da40c762e33] > 3.0.x doesn't support Java 9, 10, or 11 bytecode targets with indy. Fixed in > [apache/groovy@{{9a8b38f}}|https://github.com/apache/groovy/commit/9a8b38f545ff000f67cb886e4141a37a21f77b7d]. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (GROOVY-8783) Support Java 9/10/11 bytecode
[ https://issues.apache.org/jira/browse/GROOVY-8783?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt updated GROOVY-8783: Fix Version/s: 2.5.3 3.0.0-alpha-4 > Support Java 9/10/11 bytecode > - > > Key: GROOVY-8783 > URL: https://issues.apache.org/jira/browse/GROOVY-8783 > Project: Groovy > Issue Type: Improvement > Components: Compiler >Affects Versions: 3.0.0-alpha-3, 2.5.2 >Reporter: Keegan Witt >Assignee: Keegan Witt >Priority: Major > Fix For: 3.0.0-alpha-4, 2.5.3 > > > 2.5.x doesn't support Java 9, 10, or 11 bytecode targets with both indy and > non-indy. Fixed in > [apache/groovy@{{b9f85fd}}|https://github.com/apache/groovy/commit/b9f85fd32da7b06c1b8a35d176911da40c762e33] > 3.0.x doesn't support Java 9, 10, or 11 bytecode targets with indy. Fixed in > [apache/groovy@{{9a8b38f}}|https://github.com/apache/groovy/commit/9a8b38f545ff000f67cb886e4141a37a21f77b7d]. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (GROOVY-8783) Support Java 9/10/11 bytecode
[ https://issues.apache.org/jira/browse/GROOVY-8783?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt reassigned GROOVY-8783: --- Assignee: Keegan Witt > Support Java 9/10/11 bytecode > - > > Key: GROOVY-8783 > URL: https://issues.apache.org/jira/browse/GROOVY-8783 > Project: Groovy > Issue Type: Improvement > Components: Compiler >Affects Versions: 3.0.0-alpha-3, 2.5.2 >Reporter: Keegan Witt >Assignee: Keegan Witt >Priority: Major > > 2.5.x doesn't support Java 9, 10, or 11 bytecode targets with both indy and > non-indy. Fixed in > [apache/groovy@{{b9f85fd}}|https://github.com/apache/groovy/commit/b9f85fd32da7b06c1b8a35d176911da40c762e33] > 3.0.x doesn't support Java 9, 10, or 11 bytecode targets with indy. Fixed in > [apache/groovy@{{9a8b38f}}|https://github.com/apache/groovy/commit/9a8b38f545ff000f67cb886e4141a37a21f77b7d]. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (GROOVY-8783) Support Java 9/10/11 bytecode
Keegan Witt created GROOVY-8783: --- Summary: Support Java 9/10/11 bytecode Key: GROOVY-8783 URL: https://issues.apache.org/jira/browse/GROOVY-8783 Project: Groovy Issue Type: Improvement Components: Compiler Affects Versions: 2.5.2, 3.0.0-alpha-3 Reporter: Keegan Witt 2.5.x doesn't support Java 9, 10, or 11 bytecode targets with both indy and non-indy. Fixed in [apache/groovy@{{b9f85fd}}|https://github.com/apache/groovy/commit/b9f85fd32da7b06c1b8a35d176911da40c762e33] 3.0.x doesn't support Java 9, 10, or 11 bytecode targets with indy. Fixed in [apache/groovy@{{9a8b38f}}|https://github.com/apache/groovy/commit/9a8b38f545ff000f67cb886e4141a37a21f77b7d]. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (GROOVY-8709) Autoclone clone() method not included in Java stub
Keegan Witt created GROOVY-8709: --- Summary: Autoclone clone() method not included in Java stub Key: GROOVY-8709 URL: https://issues.apache.org/jira/browse/GROOVY-8709 Project: Groovy Issue Type: Bug Components: Stub generator / Joint compiler Reporter: Keegan Witt {code:groovy} @AutoClone class Foo { String name } {code} Creates this stub, which is missing the {{clone()}} method. {code:java} import java.lang.*; import java.io.*; import java.net.*; import java.util.*; import groovy.lang.*; import groovy.util.*; @groovy.transform.AutoClone() public class Foo extends java.lang.Object implements groovy.lang.GroovyObject { ; @groovy.transform.Generated() public groovy.lang.MetaClass getMetaClass() { return (groovy.lang.MetaClass)null;} @groovy.transform.Generated() public void setMetaClass(groovy.lang.MetaClass mc) { } @groovy.transform.Generated() public java.lang.Object invokeMethod(java.lang.String method, java.lang.Object arguments) { return null;} @groovy.transform.Generated() public java.lang.Object getProperty(java.lang.String property) { return null;} @groovy.transform.Generated() public void setProperty(java.lang.String property, java.lang.Object value) { } public java.lang.String getName() { return (java.lang.String)null;} public void setName(java.lang.String value) { } } {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (GROOVY-7906) groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution
[ https://issues.apache.org/jira/browse/GROOVY-7906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16333634#comment-16333634 ] Keegan Witt edited comment on GROOVY-7906 at 1/21/18 7:24 PM: -- Actually, testing with 2.4.13 is passing event without cherry-picking these changes in. It looks like {{$\{BASH}}} is no longer set in Alpine. Although these are probably good things to get merged anyway. was (Author: keegan): Actually, testing with 2.4.13 is passing event without cherry-picking these changes in. It looks like {{$\{BASH}}} is no longer set in Alpine. > groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution > -- > > Key: GROOVY-7906 > URL: https://issues.apache.org/jira/browse/GROOVY-7906 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.7 > Environment: Alpine linux (=> no bash, busybox only) >Reporter: Peter Butkovic >Assignee: Daniel Sun >Priority: Major > > running groovy in alpine linux results in: > {code} > /tmp/groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution > {code} > as a workaround I'm running: > {code} > sed -ie '274,275d' /tmp/groovy-2.4.7/bin/startGroovy > {code} > prior to invoking groovy -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (GROOVY-7906) groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution
[ https://issues.apache.org/jira/browse/GROOVY-7906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16333634#comment-16333634 ] Keegan Witt commented on GROOVY-7906: - Actually, testing with 2.4.13 is passing event without cherry-picking these changes in. It looks like {{$\{BASH}}} is no longer set in Alpine. > groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution > -- > > Key: GROOVY-7906 > URL: https://issues.apache.org/jira/browse/GROOVY-7906 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.7 > Environment: Alpine linux (=> no bash, busybox only) >Reporter: Peter Butkovic >Assignee: Daniel Sun >Priority: Major > > running groovy in alpine linux results in: > {code} > /tmp/groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution > {code} > as a workaround I'm running: > {code} > sed -ie '274,275d' /tmp/groovy-2.4.7/bin/startGroovy > {code} > prior to invoking groovy -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (GROOVY-7906) groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution
[ https://issues.apache.org/jira/browse/GROOVY-7906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16333625#comment-16333625 ] Keegan Witt commented on GROOVY-7906: - I'll cherry pick these changes (as well as [87c68fba3b599238d5c900d8eb18975074fa926d|https://github.com/apache/groovy/commit/87c68fba3b599238d5c900d8eb18975074fa926d] and [92bd96fcdfe35e502987e1846715a08a45620db1|https://github.com/apache/groovy/commit/92bd96fcdfe35e502987e1846715a08a45620db1]) to the 2_4_X, 2_5_X, and 2_6_X branches. > groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution > -- > > Key: GROOVY-7906 > URL: https://issues.apache.org/jira/browse/GROOVY-7906 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.7 > Environment: Alpine linux (=> no bash, busybox only) >Reporter: Peter Butkovic >Assignee: Daniel Sun >Priority: Major > > running groovy in alpine linux results in: > {code} > /tmp/groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution > {code} > as a workaround I'm running: > {code} > sed -ie '274,275d' /tmp/groovy-2.4.7/bin/startGroovy > {code} > prior to invoking groovy -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (GROOVY-7906) groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution
[ https://issues.apache.org/jira/browse/GROOVY-7906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt resolved GROOVY-7906. - Resolution: Fixed Assignee: Daniel Sun This has been fixed already (by [042dbdb3f74a238a09768676f03ea05dcce95606|https://github.com/apache/groovy/commit/042dbdb3f74a238a09768676f03ea05dcce95606] and [28d2f6a5f34f44f524ffea0e44be70c3c6a5c24e|https://github.com/apache/groovy/commit/28d2f6a5f34f44f524ffea0e44be70c3c6a5c24e]). > groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution > -- > > Key: GROOVY-7906 > URL: https://issues.apache.org/jira/browse/GROOVY-7906 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.7 > Environment: Alpine linux (=> no bash, busybox only) >Reporter: Peter Butkovic >Assignee: Daniel Sun >Priority: Major > > running groovy in alpine linux results in: > {code} > /tmp/groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution > {code} > as a workaround I'm running: > {code} > sed -ie '274,275d' /tmp/groovy-2.4.7/bin/startGroovy > {code} > prior to invoking groovy -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (GROOVY-7923) I want to report that your latest distibution contains a Trojan
[ https://issues.apache.org/jira/browse/GROOVY-7923?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt reassigned GROOVY-7923: --- Assignee: Keegan Witt > I want to report that your latest distibution contains a Trojan > --- > > Key: GROOVY-7923 > URL: https://issues.apache.org/jira/browse/GROOVY-7923 > Project: Groovy > Issue Type: Bug >Reporter: Robert Murphy >Assignee: Keegan Witt > Attachments: MSE_Groovy2_4_7.PNG > > > Your latest distribution, 2.4.7 contains the Trojan Rundas!plock in its > uninstall.exe. If you wish to contact me for further information, use > robert.mur...@harman.com > (I have no idea what to fill out for the Component field, and I can't spare > the time today to figure it out.) > Thank you -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Assigned] (GROOVY-8224) Stubs for classes implementing traits with fields don't include getters/setters
[ https://issues.apache.org/jira/browse/GROOVY-8224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt reassigned GROOVY-8224: --- Assignee: (was: Keegan Witt) > Stubs for classes implementing traits with fields don't include > getters/setters > --- > > Key: GROOVY-8224 > URL: https://issues.apache.org/jira/browse/GROOVY-8224 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Reporter: Keegan Witt > > As an example, the stubs generated for _GroovyXImpl_ for the Groovy below > doesn't include {{int getFoo()}} or {{void setFoo(int value)}}. > {code:java} > trait GroovyXTrait { > int foo > } > class GroovyXImpl implements GroovyXTrait { } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Created] (GROOVY-8438) Running grape causes an exception
Keegan Witt created GROOVY-8438: --- Summary: Running grape causes an exception Key: GROOVY-8438 URL: https://issues.apache.org/jira/browse/GROOVY-8438 Project: Groovy Issue Type: Bug Components: Grape Affects Versions: 2.4.13 Reporter: Keegan Witt Running {{grape}} causes exception {noformat} java.lang.reflect.InvocationTargetException 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:109) at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:131) Caused by: groovy.lang.MissingMethodException: No signature of method: groovyjarjarcommonscli.Options.getOptionProperties() is applicable for argument types: (java.lang.String) values: [D] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58) at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:49) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at org.codehaus.groovy.tools.GrapeMain.run(GrapeMain.groovy:353) 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:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:925) at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:908) at org.codehaus.groovy.runtime.InvokerHelper.runScript(InvokerHelper.java:412) at org.codehaus.groovy.runtime.InvokerHelper$runScript.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133) at org.codehaus.groovy.tools.GrapeMain.main(GrapeMain.groovy) ... 6 more {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (GROOVY-7906) groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution
[ https://issues.apache.org/jira/browse/GROOVY-7906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16183756#comment-16183756 ] Keegan Witt commented on GROOVY-7906: - Agreed. I left this issue open so we can do a more permanent fix. > groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution > -- > > Key: GROOVY-7906 > URL: https://issues.apache.org/jira/browse/GROOVY-7906 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.7 > Environment: Alpine linux (=> no bash, busybox only) >Reporter: Peter Butkovic > > running groovy in alpine linux results in: > {code} > /tmp/groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution > {code} > as a workaround I'm running: > {code} > sed -ie '274,275d' /tmp/groovy-2.4.7/bin/startGroovy > {code} > prior to invoking groovy -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (GROOVY-8224) Stubs for classes implementing traits with fields don't include getters/setters
[ https://issues.apache.org/jira/browse/GROOVY-8224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt updated GROOVY-8224: Description: As an example, the stubs generated for _GroovyXImpl_ for the Groovy below doesn't include {{int getFoo()}} or {{void setFoo(int value)}}. {code:java} trait GroovyXTrait { int foo } class GroovyXImpl implements GroovyXTrait { } {code} > Stubs for classes implementing traits with fields don't include > getters/setters > --- > > Key: GROOVY-8224 > URL: https://issues.apache.org/jira/browse/GROOVY-8224 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Reporter: Keegan Witt >Assignee: Keegan Witt > > As an example, the stubs generated for _GroovyXImpl_ for the Groovy below > doesn't include {{int getFoo()}} or {{void setFoo(int value)}}. > {code:java} > trait GroovyXTrait { > int foo > } > class GroovyXImpl implements GroovyXTrait { } > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Created] (GROOVY-8224) Stubs for classes implementing traits with fields don't include getters/setters
Keegan Witt created GROOVY-8224: --- Summary: Stubs for classes implementing traits with fields don't include getters/setters Key: GROOVY-8224 URL: https://issues.apache.org/jira/browse/GROOVY-8224 Project: Groovy Issue Type: Bug Components: Stub generator / Joint compiler Reporter: Keegan Witt Assignee: Keegan Witt -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Comment Edited] (GROOVY-7906) groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution
[ https://issues.apache.org/jira/browse/GROOVY-7906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15739338#comment-15739338 ] Keegan Witt edited comment on GROOVY-7906 at 12/11/16 10:57 AM: I'm working on creating some official Groovy Docker images and encountered the same issue. It'd be less intrusive to use Bash just for Groovy, while not affecting the rest of the environment. One way is to just change the shebangs: {code} RUN set -ex \ && sed -i "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/grape \ && sed -i "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/groovy \ && sed -i "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/groovyc \ && sed -i "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/groovyConsole \ && sed -i "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/groovydoc \ && sed -i "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/groovysh \ && sed -i "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/java2groovy {code} I mentioned the idea on the related mailing list [discussion|http://groovy.329449.n5.nabble.com/Groovy-Docker-images-td5735270.html]. was (Author: keegan): I'm working on creating some official Groovy Docker images and encountered the same issue. It'd be less intrusive to use Bash just for Groovy, while not affecting the rest of the environment. One way is to just change the shebangs: {code} RUN set -ex \ && sed -i -e "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/grape \ && sed -i -e "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/groovy \ && sed -i -e "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/groovyc \ && sed -i -e "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/groovyConsole \ && sed -i -e "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/groovydoc \ && sed -i -e "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/groovysh \ && sed -i -e "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/java2groovy {code} I mentioned the idea on the related mailing list [discussion|http://groovy.329449.n5.nabble.com/Groovy-Docker-images-td5735270.html]. > groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution > -- > > Key: GROOVY-7906 > URL: https://issues.apache.org/jira/browse/GROOVY-7906 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.7 > Environment: Alpine linux (=> no bash, busybox only) >Reporter: Peter Butkovic > > running groovy in alpine linux results in: > {code} > /tmp/groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution > {code} > as a workaround I'm running: > {code} > sed -ie '274,275d' /tmp/groovy-2.4.7/bin/startGroovy > {code} > prior to invoking groovy -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (GROOVY-7906) groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution
[ https://issues.apache.org/jira/browse/GROOVY-7906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15739338#comment-15739338 ] Keegan Witt commented on GROOVY-7906: - I'm working on creating some official Groovy Docker images and encountered the same issue. It'd be less intrusive to use Bash just for Groovy, while not affecting the rest of the environment. One way is to just change the shebangs: {code} RUN set -ex \ && sed -i -e "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/grape \ && sed -i -e "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/groovy \ && sed -i -e "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/groovyc \ && sed -i -e "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/groovyConsole \ && sed -i -e "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/groovydoc \ && sed -i -e "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/groovysh \ && sed -i -e "s|#!/bin/sh|#!/bin/bash|" /opt/groovy/bin/java2groovy {code} I mentioned the idea on the related mailing list [discussion|http://groovy.329449.n5.nabble.com/Groovy-Docker-images-td5735270.html]. > groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution > -- > > Key: GROOVY-7906 > URL: https://issues.apache.org/jira/browse/GROOVY-7906 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.7 > Environment: Alpine linux (=> no bash, busybox only) >Reporter: Peter Butkovic > > running groovy in alpine linux results in: > {code} > /tmp/groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution > {code} > as a workaround I'm running: > {code} > sed -ie '274,275d' /tmp/groovy-2.4.7/bin/startGroovy > {code} > prior to invoking groovy -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Issue Comment Deleted] (GROOVY-7906) groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution
[ https://issues.apache.org/jira/browse/GROOVY-7906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt updated GROOVY-7906: Comment: was deleted (was: So should we change the shebangs to be bash?) > groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution > -- > > Key: GROOVY-7906 > URL: https://issues.apache.org/jira/browse/GROOVY-7906 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.7 > Environment: Alpine linux (=> no bash, busybox only) >Reporter: Peter Butkovic > > running groovy in alpine linux results in: > {code} > /tmp/groovy-2.4.7/bin/startGroovy: line 275: syntax error: bad substitution > {code} > as a workaround I'm running: > {code} > sed -ie '274,275d' /tmp/groovy-2.4.7/bin/startGroovy > {code} > prior to invoking groovy -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (GROOVY-7900) uninstall.exe possibly contains trojan (or false positive)
[ https://issues.apache.org/jira/browse/GROOVY-7900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15426403#comment-15426403 ] Keegan Witt edited comment on GROOVY-7900 at 8/18/16 4:57 PM: -- Kaspersky's latest definitions seem to no longer flag this executable (tested using https://scan.kaspersky.com, and then re-analyzed in VirusTotal). [~jfhumann] is it still causing you issues? I haven't found yet where to report false positives on Panda's site. was (Author: keegan): Kaspersky's latest definitions seem to no longer flag this executable (tested using https://scan.kaspersky.com). [~jfhumann] is it still causing you issues? I haven't found yet where to report false positives on Panda's site. > uninstall.exe possibly contains trojan (or false positive) > -- > > Key: GROOVY-7900 > URL: https://issues.apache.org/jira/browse/GROOVY-7900 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.7 > Environment: Windows 10 >Reporter: Jan-Fabian Humann >Assignee: Keegan Witt > > I installed groovy windows installer from the official download page: > http://www.groovy-lang.org/download.html > Kaspersky Endpoint Security 10 flags uninstall.exe in the groovy folder as > Trojan-Ransom.NSIS.Onion.yjd and deletes it. > To verify I installed groovy in a Windows 10 VM without Kaspersky and > uploaded the file to https://www.virustotal.com/ and this is the report I got: > https://virustotal.com/de/file/a3686f92af80b7ad97c4a36065a9468c90b69479105fcc952c2227cd0c4a5548/analysis/ > 3/55 Anti Virus programs flag this file as virus/suspicious. > Could you please investigate whether you download server/install program/etc > has been compromised or it is a false positive? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Assigned] (GROOVY-7900) uninstall.exe possibly contains trojan (or false positive)
[ https://issues.apache.org/jira/browse/GROOVY-7900?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Keegan Witt reassigned GROOVY-7900: --- Assignee: Keegan Witt > uninstall.exe possibly contains trojan (or false positive) > -- > > Key: GROOVY-7900 > URL: https://issues.apache.org/jira/browse/GROOVY-7900 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.7 > Environment: Windows 10 >Reporter: Jan-Fabian Humann >Assignee: Keegan Witt > > I installed groovy windows installer from the official download page: > http://www.groovy-lang.org/download.html > Kaspersky Endpoint Security 10 flags uninstall.exe in the groovy folder as > Trojan-Ransom.NSIS.Onion.yjd and deletes it. > To verify I installed groovy in a Windows 10 VM without Kaspersky and > uploaded the file to https://www.virustotal.com/ and this is the report I got: > https://virustotal.com/de/file/a3686f92af80b7ad97c4a36065a9468c90b69479105fcc952c2227cd0c4a5548/analysis/ > 3/55 Anti Virus programs flag this file as virus/suspicious. > Could you please investigate whether you download server/install program/etc > has been compromised or it is a false positive? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (GROOVY-7900) uninstall.exe possibly contains trojan (or false positive)
[ https://issues.apache.org/jira/browse/GROOVY-7900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15410117#comment-15410117 ] Keegan Witt commented on GROOVY-7900: - It's a false positive, but I'm not sure what options I have other than contacting the AV companies and asking them to update their definitions. I tried a fresh build with the new NSIS 3.0 today, and a different set of 3 gave [false positives\https://www.virustotal.com/en/file/b203cccb8ec3ac7b5888e8bf4bc01e32506bfa1e0f18e869c21e2b91a7482216/analysis/1470432834/].. > uninstall.exe possibly contains trojan (or false positive) > -- > > Key: GROOVY-7900 > URL: https://issues.apache.org/jira/browse/GROOVY-7900 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.7 > Environment: Windows 10 >Reporter: Jan-Fabian Humann > > I installed groovy windows installer from the official download page: > http://www.groovy-lang.org/download.html > Kaspersky Endpoint Security 10 flags uninstall.exe in the groovy folder as > Trojan-Ransom.NSIS.Onion.yjd and deletes it. > To verify I installed groovy in a Windows 10 VM without Kaspersky and > uploaded the file to https://www.virustotal.com/ and this is the report I got: > https://virustotal.com/de/file/a3686f92af80b7ad97c4a36065a9468c90b69479105fcc952c2227cd0c4a5548/analysis/ > 3/55 Anti Virus programs flag this file as virus/suspicious. > Could you please investigate whether you download server/install program/etc > has been compromised or it is a false positive? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (GROOVY-7788) Groovy does not run on 64 bit Windows 7
[ https://issues.apache.org/jira/browse/GROOVY-7788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15295678#comment-15295678 ] Keegan Witt commented on GROOVY-7788: - The installer runs a jar that detects the version of Java by checking in this order # JAVA_HOME # Registry key SOFTWARE\JavaSoft\Java Runtime Environment # Assume 32 bit Then it installs the Groovy binaries that match. Obviously, it would be a problem if Java wasn't installed or if a different architecture of Java was in JAVA_HOME when the installer was run (as you have noticed). I'll add a message box to the installer so it's clear what version it's installing. Longer term, I'm thinking I'll re-implement the binaries with Launch4J instead of C and that should eliminate the need for the installer to do any Java detection. I just haven't had time to get to it yet. > Groovy does not run on 64 bit Windows 7 > --- > > Key: GROOVY-7788 > URL: https://issues.apache.org/jira/browse/GROOVY-7788 > Project: Groovy > Issue Type: Bug > Components: windows installer >Affects Versions: 2.4.6 > Environment: Microsoft Windows 7 Enterprise 64 bit > java version 1.8.0_65 > Java(TM) SE Runtime Environment (build 1.8.0_65-b17) > Java HotSpot(TM) 64-Bit server VM (build 25.65-b01, mixed mode) >Reporter: Shawn Cole >Priority: Minor > Labels: windows > > When I try to execute groovy I get: > error: dynamic library C:\Program > Files\Java\jdk1.8.0_65\jre\bin\server\jvm.dll exists but could not be loaded! > This may be caused e.g. by trying to use a 32-bit executable to load a 64-bit > jvm (or vice versa) > error (win code 193): (null) > error: could not find client or server jvm under C:\Program > Files\Java\jdk1.8.0_65 > please check that it is a valid jdk / jre containing the desired type of jvm > I have a 64 bit machine and 64 bit java, with my JAVA_HOME pointing to > C:\Program Files\Java\jdk1.8.0_65 > The problem seems to be when I ran the windows installer, it installed a 32 > bit version of groovy on my machine that is not able to run on the 64 bit JVM. > Is there any workarounds to this? and please don't say install the 32 bit > version of java, because if that is the only solution i'd rather just not > learn this language. I can't seem to find any binaries specific to 64 bit or > 32. > Also note worthy: I can launch groovy shell and groovy console with their > corresponding batch files in the bin directory successfully. -- This message was sent by Atlassian JIRA (v6.3.4#6332)