Github user danielsun1106 commented on a diff in the pull request: https://github.com/apache/groovy/pull/835#discussion_r238350588 --- Diff: subprojects/parser-antlr4/build.gradle --- @@ -30,9 +30,11 @@ def srcBase = "subprojects/parser-antlr4/src" def srcMain = "$srcBase/main" def srcTest = "$srcBase/test" -final PARSER_PACKAGE_NAME = 'org.apache.groovy.parser.antlr4' generateGrammarSource { + maxHeapSize = '1g' --- End diff -- https://travis-ci.org/danielsun1106/groovy/jobs/460259483 ``` > Task :generateGrammarSource FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':generateGrammarSource'. > Java heap space ``` Groovy's grammar is quite complicated, so more memory will be consumed. As you can see, the `generateGrammarSource` task fails if the heap size is a bit small, e.g. `512m`. Also, you can try to clone apache/groovy and set the heap size to `maxHeapSize = '512m'` then run `gradlew clean generateGrammarSource --no-build-cache` locally, I believe OOM can be reproduced.
---