[GitHub] groovy pull request #726: Minor refactoring: use another extracting placehol...
Github user asfgit closed the pull request at: https://github.com/apache/groovy/pull/726 ---
[jira] [Commented] (GROOVY-8607) CliBuilder should ignore 'opt' property if provided within a Map of arguments
[ https://issues.apache.org/jira/browse/GROOVY-8607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16491526#comment-16491526 ] ASF GitHub Bot commented on GROOVY-8607: Github user asfgit closed the pull request at: https://github.com/apache/groovy/pull/725 > CliBuilder should ignore 'opt' property if provided within a Map of arguments > - > > Key: GROOVY-8607 > URL: https://issues.apache.org/jira/browse/GROOVY-8607 > Project: Groovy > Issue Type: Improvement >Affects Versions: 2.5.0-rc-3 >Reporter: Paul King >Priority: Major > Fix For: 2.5.0 > > > {code} > println "groovy version = ${GroovySystem.getVersion()}" > def builder = new CliBuilder() > def opt1 = [opt:'x'] > builder."${opt1.opt ?: '_'}"(opt1, 'desc opt1') // problem is here > def opt2 = [opt:'y',longOpt:'why'] > builder."${opt2.opt ?: '_'}"(opt2, 'desc opt1') // problem is here > def opt3 = [opt:'z',longOpt:'zed',argName:'arg',args:1] > builder."${opt3.opt ?: '_'}"(opt3, 'desc opt3') // problem is here > def opt4 = [longOpt:'quiet'] > builder."${opt4.opt ?: '_'}"(opt4, 'desc opt:') // problem is here > println builder.options > builder.usage() > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] groovy pull request #725: GROOVY-8607: CliBuilder should ignore 'opt' proper...
Github user asfgit closed the pull request at: https://github.com/apache/groovy/pull/725 ---
[GitHub] groovy pull request #726: Minor refactoring: use another extracting placehol...
GitHub user danielsun1106 opened a pull request: https://github.com/apache/groovy/pull/726 Minor refactoring: use another extracting placeholder logic You can merge this pull request into a Git repository by running: $ git pull https://github.com/danielsun1106/groovy minor-refactoring-another-extracting-placeholder-logic Alternatively you can review and apply these changes as the patch at: https://github.com/apache/groovy/pull/726.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #726 commit c68c4c0e0213a50b91550404953eca14636cfa31 Author: Daniel Sun Date: 2018-05-26T05:44:26Z Minor refactoring: use another extracting placeholder logic ---
[jira] [Commented] (GROOVY-8607) CliBuilder should ignore 'opt' property if provided within a Map of arguments
[ https://issues.apache.org/jira/browse/GROOVY-8607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16491510#comment-16491510 ] ASF GitHub Bot commented on GROOVY-8607: GitHub user paulk-asert opened a pull request: https://github.com/apache/groovy/pull/725 GROOVY-8607: CliBuilder should ignore 'opt' property if provided with… …in a Map of arguments You can merge this pull request into a Git repository by running: $ git pull https://github.com/paulk-asert/groovy groovy8607 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/groovy/pull/725.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #725 commit 0a22932c492955055b5a6065a5e8379a219579bd Author: Daniel Sun Date: 2018-05-26T05:04:19Z GROOVY-8607: CliBuilder should ignore 'opt' property if provided within a Map of arguments > CliBuilder should ignore 'opt' property if provided within a Map of arguments > - > > Key: GROOVY-8607 > URL: https://issues.apache.org/jira/browse/GROOVY-8607 > Project: Groovy > Issue Type: Improvement >Affects Versions: 2.5.0-rc-3 >Reporter: Paul King >Priority: Major > Fix For: 2.5.0 > > > {code} > println "groovy version = ${GroovySystem.getVersion()}" > def builder = new CliBuilder() > def opt1 = [opt:'x'] > builder."${opt1.opt ?: '_'}"(opt1, 'desc opt1') // problem is here > def opt2 = [opt:'y',longOpt:'why'] > builder."${opt2.opt ?: '_'}"(opt2, 'desc opt1') // problem is here > def opt3 = [opt:'z',longOpt:'zed',argName:'arg',args:1] > builder."${opt3.opt ?: '_'}"(opt3, 'desc opt3') // problem is here > def opt4 = [longOpt:'quiet'] > builder."${opt4.opt ?: '_'}"(opt4, 'desc opt:') // problem is here > println builder.options > builder.usage() > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] groovy pull request #725: GROOVY-8607: CliBuilder should ignore 'opt' proper...
GitHub user paulk-asert opened a pull request: https://github.com/apache/groovy/pull/725 GROOVY-8607: CliBuilder should ignore 'opt' property if provided with⦠â¦in a Map of arguments You can merge this pull request into a Git repository by running: $ git pull https://github.com/paulk-asert/groovy groovy8607 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/groovy/pull/725.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #725 commit 0a22932c492955055b5a6065a5e8379a219579bd Author: Daniel Sun Date: 2018-05-26T05:04:19Z GROOVY-8607: CliBuilder should ignore 'opt' property if provided within a Map of arguments ---
[GitHub] groovy pull request #724: Release 2.5.0 related fixes
Github user asfgit closed the pull request at: https://github.com/apache/groovy/pull/724 ---
[jira] [Commented] (GROOVY-8592) Migrate command line tools to picocli version of CliBuilder
[ https://issues.apache.org/jira/browse/GROOVY-8592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16491490#comment-16491490 ] Remko Popma commented on GROOVY-8592: - I had a quick look at the usage help message for groovysh again this morning and I didn’t see anything special, so I believe that the HelpFormatter can safely be omitted. Thanks again for your help with this ticket! I hope I’ll get to my PC tonight and will be able to submit a PR with completion scripts for GROOVY-8605, that would top things off nicely. Would be nice to have that in 2.5.0 GA, but if if it doesn’t make it in, a subsequent 2.5.x release would be fine too. > Migrate command line tools to picocli version of CliBuilder > --- > > Key: GROOVY-8592 > URL: https://issues.apache.org/jira/browse/GROOVY-8592 > Project: Groovy > Issue Type: Improvement > Components: command line processing >Affects Versions: 2.5.0-rc-3 >Reporter: Remko Popma >Assignee: Paul King >Priority: Major > Fix For: 2.5.0 > > > The following command line tools use either {{groovy.cli.commons.CliBuilder}} > or implicitly use {{groovy.util.CliBuilder}} which delegates to the > commons-cli version of CliBuilder: > * groovyConsole (groovy.ui.Console) > * groovydoc (org.codehaus.groovy.tools.groovydoc.Main) > * groovysh (org.codehaus.groovy.tools.shell.Main) > This ticket proposes to use {{groovy.cli.picocli.CliBuilder}} instead, so > that all command line tools in the {{bin}} directory of the Groovy > distribution show usage help in ANSI colors. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (GROOVY-8607) CliBuilder should ignore 'opt' property if provided within a Map of arguments
Paul King created GROOVY-8607: - Summary: CliBuilder should ignore 'opt' property if provided within a Map of arguments Key: GROOVY-8607 URL: https://issues.apache.org/jira/browse/GROOVY-8607 Project: Groovy Issue Type: Improvement Affects Versions: 2.5.0-rc-3 Reporter: Paul King Fix For: 2.5.0 {code} println "groovy version = ${GroovySystem.getVersion()}" def builder = new CliBuilder() def opt1 = [opt:'x'] builder."${opt1.opt ?: '_'}"(opt1, 'desc opt1') // problem is here def opt2 = [opt:'y',longOpt:'why'] builder."${opt2.opt ?: '_'}"(opt2, 'desc opt1') // problem is here def opt3 = [opt:'z',longOpt:'zed',argName:'arg',args:1] builder."${opt3.opt ?: '_'}"(opt3, 'desc opt3') // problem is here def opt4 = [longOpt:'quiet'] builder."${opt4.opt ?: '_'}"(opt4, 'desc opt:') // problem is here println builder.options builder.usage() {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] groovy pull request #724: Release 2.5.0 related fixes
GitHub user jwagenleitner opened a pull request: https://github.com/apache/groovy/pull/724 Release 2.5.0 related fixes Some recent commits seem to cause problems with the Nextflow 2.5.0 snapshot builds on the CI server. One can lead to a NPE (commit 90486ae1075d14a62d14452abfea0c27485a67b5) because fieldNode can be reassigned `null` after the `instanceof` check. Another change (commit 57cfd2a3e4d985b3248569ea1d92b02c59627703) seems to have caused an issue with assigning parameterized types. You can merge this pull request into a Git repository by running: $ git pull https://github.com/jwagenleitner/groovy rel25fixes Alternatively you can review and apply these changes as the patch at: https://github.com/apache/groovy/pull/724.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #724 commit 1376361bb9089b1d54e9938a7055610b67b8df0e Author: John Wagenleitner Date: 2018-05-24T21:59:20Z Fix parameter matching for parameterized types Revert of change 57cfd2a3e4d985b3 and fixes issues with Nextflow CI builds. commit c7d3e6d8916f78544e7354837fa0ff4b811931f6 Author: John Wagenleitner Date: 2018-05-25T20:16:18Z Fix NPE if accessed property not a member of the owning class ---
[jira] [Commented] (GROOVY-8592) Migrate command line tools to picocli version of CliBuilder
[ https://issues.apache.org/jira/browse/GROOVY-8592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16490735#comment-16490735 ] Paul King commented on GROOVY-8592: --- I have done groovydoc and groovyConsole (just on master so far). I backed out of groovysh tonight - I'll have another look in the morning. It has the custom commons-based HelpFormatter and I just wanted to convince myself it wasn't super critical. Wrt header and footer. No problems there. We would have a problem if the longOpt was setHeader or setFooter. > Migrate command line tools to picocli version of CliBuilder > --- > > Key: GROOVY-8592 > URL: https://issues.apache.org/jira/browse/GROOVY-8592 > Project: Groovy > Issue Type: Improvement > Components: command line processing >Affects Versions: 2.5.0-rc-3 >Reporter: Remko Popma >Assignee: Paul King >Priority: Major > Fix For: 2.5.0 > > > The following command line tools use either {{groovy.cli.commons.CliBuilder}} > or implicitly use {{groovy.util.CliBuilder}} which delegates to the > commons-cli version of CliBuilder: > * groovyConsole (groovy.ui.Console) > * groovydoc (org.codehaus.groovy.tools.groovydoc.Main) > * groovysh (org.codehaus.groovy.tools.shell.Main) > This ticket proposes to use {{groovy.cli.picocli.CliBuilder}} instead, so > that all command line tools in the {{bin}} directory of the Groovy > distribution show usage help in ANSI colors. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (GROOVY-8606) Provide friendly error message for invalid lambda body
[ https://issues.apache.org/jira/browse/GROOVY-8606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16490547#comment-16490547 ] Daniel Sun edited comment on GROOVY-8606 at 5/25/18 11:23 AM: -- Current solution breaks other tests, it is reverted for the time being [https://github.com/apache/groovy/commit/1bd642488104ca8204bd45c1c1cf4d304d7d564f] build result: http://ci.groovy-lang.org/viewLog.html?buildId=50178&tab=buildResultsDiv&buildTypeId=Groovy_Jdk8Build_PlusSnapshotDeploy&guest=1 was (Author: daniel_sun): Current solution breaks other tests, it is reverted for the time being [https://github.com/apache/groovy/commit/1bd642488104ca8204bd45c1c1cf4d304d7d564f] > Provide friendly error message for invalid lambda body > -- > > Key: GROOVY-8606 > URL: https://issues.apache.org/jira/browse/GROOVY-8606 > Project: Groovy > Issue Type: Improvement > Components: parser-antlr4 >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > > We should provide friendly error message like "Statements should be wrapped > in a block, e.g. () -> { some statements here }", e.g. > Script1.groovy: 1: Statements should be wrapped in a block, e.g. () -> { some > statements here } @ line 1, column 15. >def a = () -> assert 1 == 1 > ^ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (GROOVY-8606) Provide friendly error message for invalid lambda body
[ https://issues.apache.org/jira/browse/GROOVY-8606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-8606: --- Fix Version/s: (was: 3.0.0-alpha-3) (was: 2.6.0-alpha-4) > Provide friendly error message for invalid lambda body > -- > > Key: GROOVY-8606 > URL: https://issues.apache.org/jira/browse/GROOVY-8606 > Project: Groovy > Issue Type: Improvement > Components: parser-antlr4 >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > > We should provide friendly error message like "Statements should be wrapped > in a block, e.g. () -> { some statements here }", e.g. > Script1.groovy: 1: Statements should be wrapped in a block, e.g. () -> { some > statements here } @ line 1, column 15. >def a = () -> assert 1 == 1 > ^ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (GROOVY-8606) Provide friendly error message for invalid lambda body
[ https://issues.apache.org/jira/browse/GROOVY-8606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16490547#comment-16490547 ] Daniel Sun edited comment on GROOVY-8606 at 5/25/18 11:15 AM: -- Current solution breaks other tests, it is reverted for the time being [https://github.com/apache/groovy/commit/1bd642488104ca8204bd45c1c1cf4d304d7d564f] was (Author: daniel_sun): Fixed by https://github.com/apache/groovy/commit/1bd642488104ca8204bd45c1c1cf4d304d7d564f > Provide friendly error message for invalid lambda body > -- > > Key: GROOVY-8606 > URL: https://issues.apache.org/jira/browse/GROOVY-8606 > Project: Groovy > Issue Type: Improvement > Components: parser-antlr4 >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 2.6.0-alpha-4, 3.0.0-alpha-3 > > > We should provide friendly error message like "Statements should be wrapped > in a block, e.g. () -> { some statements here }", e.g. > Script1.groovy: 1: Statements should be wrapped in a block, e.g. () -> { some > statements here } @ line 1, column 15. >def a = () -> assert 1 == 1 > ^ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Issue Comment Deleted] (GROOVY-8606) Provide friendly error message for invalid lambda body
[ https://issues.apache.org/jira/browse/GROOVY-8606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-8606: --- Comment: was deleted (was: Current solution breaks other tests...) > Provide friendly error message for invalid lambda body > -- > > Key: GROOVY-8606 > URL: https://issues.apache.org/jira/browse/GROOVY-8606 > Project: Groovy > Issue Type: Improvement > Components: parser-antlr4 >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 2.6.0-alpha-4, 3.0.0-alpha-3 > > > We should provide friendly error message like "Statements should be wrapped > in a block, e.g. () -> { some statements here }", e.g. > Script1.groovy: 1: Statements should be wrapped in a block, e.g. () -> { some > statements here } @ line 1, column 15. >def a = () -> assert 1 == 1 > ^ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Reopened] (GROOVY-8606) Provide friendly error message for invalid lambda body
[ https://issues.apache.org/jira/browse/GROOVY-8606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun reopened GROOVY-8606: Current solution breaks other tests... > Provide friendly error message for invalid lambda body > -- > > Key: GROOVY-8606 > URL: https://issues.apache.org/jira/browse/GROOVY-8606 > Project: Groovy > Issue Type: Improvement > Components: parser-antlr4 >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 2.6.0-alpha-4, 3.0.0-alpha-3 > > > We should provide friendly error message like "Statements should be wrapped > in a block, e.g. () -> { some statements here }", e.g. > Script1.groovy: 1: Statements should be wrapped in a block, e.g. () -> { some > statements here } @ line 1, column 15. >def a = () -> assert 1 == 1 > ^ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (GROOVY-8606) Provide friendly error message for invalid lambda body
[ https://issues.apache.org/jira/browse/GROOVY-8606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun resolved GROOVY-8606. Resolution: Fixed Fix Version/s: 3.0.0-alpha-3 2.6.0-alpha-4 Fixed by https://github.com/apache/groovy/commit/1bd642488104ca8204bd45c1c1cf4d304d7d564f > Provide friendly error message for invalid lambda body > -- > > Key: GROOVY-8606 > URL: https://issues.apache.org/jira/browse/GROOVY-8606 > Project: Groovy > Issue Type: Improvement > Components: parser-antlr4 >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 2.6.0-alpha-4, 3.0.0-alpha-3 > > > We should provide friendly error message like "Statements should be wrapped > in a block, e.g. () -> { some statements here }", e.g. > Script1.groovy: 1: Statements should be wrapped in a block, e.g. () -> { some > statements here } @ line 1, column 15. >def a = () -> assert 1 == 1 > ^ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (GROOVY-8606) Provide friendly error message for invalid lambda body
[ https://issues.apache.org/jira/browse/GROOVY-8606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-8606: --- Description: We should provide friendly error message like "Statements should be wrapped in a block, e.g. () -> { some statements here }", e.g. Script1.groovy: 1: Statements should be wrapped in a block, e.g. () -> { some statements here } @ line 1, column 15. def a = () -> assert 1 == 1 ^ was: We should {{Statements should be wrapped in a block, e.g. () -> { some statements here }}} {code:java} Script1.groovy: 1: Statements should be wrapped in a block, e.g. () -> { some statements here } @ line 1, column 15. def a = () -> assert 1 == 1 ^ {code} > Provide friendly error message for invalid lambda body > -- > > Key: GROOVY-8606 > URL: https://issues.apache.org/jira/browse/GROOVY-8606 > Project: Groovy > Issue Type: Improvement > Components: parser-antlr4 >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > > We should provide friendly error message like "Statements should be wrapped > in a block, e.g. () -> { some statements here }", e.g. > Script1.groovy: 1: Statements should be wrapped in a block, e.g. () -> { some > statements here } @ line 1, column 15. >def a = () -> assert 1 == 1 > ^ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (GROOVY-8606) Provide friendly error message for invalid lambda body
[ https://issues.apache.org/jira/browse/GROOVY-8606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-8606: --- Description: We should {{Statements should be wrapped in a block, e.g. () -> { some statements here }}} {code:java} Script1.groovy: 1: Statements should be wrapped in a block, e.g. () -> { some statements here } @ line 1, column 15. def a = () -> assert 1 == 1 ^ {code} > Provide friendly error message for invalid lambda body > -- > > Key: GROOVY-8606 > URL: https://issues.apache.org/jira/browse/GROOVY-8606 > Project: Groovy > Issue Type: Improvement > Components: parser-antlr4 >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > > We should {{Statements should be wrapped in a block, e.g. () -> { some > statements here }}} > {code:java} > Script1.groovy: 1: Statements should be wrapped in a block, e.g. () -> { some > statements here } @ line 1, column 15. >def a = () -> assert 1 == 1 > ^ > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (GROOVY-8606) Provide friendly error message for invalid lambda body
Daniel Sun created GROOVY-8606: -- Summary: Provide friendly error message for invalid lambda body Key: GROOVY-8606 URL: https://issues.apache.org/jira/browse/GROOVY-8606 Project: Groovy Issue Type: Improvement Components: parser-antlr4 Reporter: Daniel Sun Assignee: Daniel Sun -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] groovy pull request #722: Request YourKit Java Profiler Open Source License
Github user asfgit closed the pull request at: https://github.com/apache/groovy/pull/722 ---
[jira] [Commented] (GROOVY-8592) Migrate command line tools to picocli version of CliBuilder
[ https://issues.apache.org/jira/browse/GROOVY-8592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16490425#comment-16490425 ] Paul King commented on GROOVY-8592: --- There is a three part answer: (1) docs within the docs zip (includes asciidoc, javadocs, groovydoc) will need to ready with the release (2) even though (1) is true, we keep snapshot doco for the next release on the website, so we can update that and point people to it if we get something badly wrong (3) anything on the groovy website we can update continuously, e.g. the groovy-2.5 release notes. I have no doubt we'll find numerous errors/bugs when people start using 2.5.0 in more mainstream projects and we'll likely need a 2.5.1 in 3-6 (guess) weeks anyway. > Migrate command line tools to picocli version of CliBuilder > --- > > Key: GROOVY-8592 > URL: https://issues.apache.org/jira/browse/GROOVY-8592 > Project: Groovy > Issue Type: Improvement > Components: command line processing >Affects Versions: 2.5.0-rc-3 >Reporter: Remko Popma >Assignee: Paul King >Priority: Major > Fix For: 2.5.0 > > > The following command line tools use either {{groovy.cli.commons.CliBuilder}} > or implicitly use {{groovy.util.CliBuilder}} which delegates to the > commons-cli version of CliBuilder: > * groovyConsole (groovy.ui.Console) > * groovydoc (org.codehaus.groovy.tools.groovydoc.Main) > * groovysh (org.codehaus.groovy.tools.shell.Main) > This ticket proposes to use {{groovy.cli.picocli.CliBuilder}} instead, so > that all command line tools in the {{bin}} directory of the Groovy > distribution show usage help in ANSI colors. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (GROOVY-8603) @CompileStatic: matching method check limited to 30 super classes
[ https://issues.apache.org/jira/browse/GROOVY-8603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16490423#comment-16490423 ] Peter Schmitz commented on GROOVY-8603: --- I'd like to say no, but... yes, it is. :-/ > @CompileStatic: matching method check limited to 30 super classes > - > > Key: GROOVY-8603 > URL: https://issues.apache.org/jira/browse/GROOVY-8603 > Project: Groovy > Issue Type: Bug > Components: Static Type Checker >Affects Versions: 2.3.11, 2.4.13, 2.5.0-rc-3 >Reporter: Peter Schmitz >Priority: Major > Labels: CompileStatic, Matching, extends, method, parameters, > typecheck > > There is currently a maximum hierarchical depth for childclasses when using > compile static. > The compiler only searches for method parameters that match the provided > class or up to 29 super classes. This in return means that the usable > hierarchical depth is limited 29 child classes/distance from the root. > Without CompileStatic this limit does not exists. Changing the following code > to Java works too. > This Code: > {code:java} > import groovy.transform.CompileStatic > @CompileStatic > class StaticTest { >public static int getNummer( ZClassDepth0 instance ) { > return instance.depth >} >public static void main( String[] args ) { > println getNummer( new ZClassDepth29() ) //works > println getNummer( new ZClassDepth30() ) //doesn't work >} > } > {code} > fails with the following execption: > {code:java} > Error:(13, 15) Groovyc: [Static type checking] - Cannot find matching method > StaticTest#getNummer(ZClassDepth30). Please check if the declared type is > right and if the method exists. > {code} > > How the "ZClassDepth" files where generated: > {code:java} > import java.nio.file.Paths > class Generator { >public static void main( String[] args ) { > def template = { int nummer -> > return """\ > public class ZClassDepth${ nummer } ${ nummer > 0 ? "extends ZClassDepth${ > nummer - 1 }" : '' } { >${ nummer > 0 ? '@Override' : '' } >public int getDepth() { > return $nummer >} > } > """ > } > def path = Paths.get( '[PATH_TO_SOURCE]/src' ) > 101.times{ i -> > new File( path.toFile(), "ZClassDepth${i}.groovy" ).text = template( > i ) > } >} > } > {code} > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)