You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2020/06/11 00:09:00 UTC
[jira] [Commented] (GROOVY-9585) CompilerConfiguration copy
constructor does not copy compilation customizers
[ https://issues.apache.org/jira/browse/GROOVY-9585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17132796#comment-17132796 ]
Paul King commented on GROOVY-9585:
-----------------------------------
The changes for this are relatively simple but when applied break gradle somehow.
{{org.gradle.api.internal.tasks.compile.ApiGroovyCompiler$TrackingClassGenerationCompilationCustomizer}} is throwing an NPE and {{:groovy-macro:compileGroovy}} fails.
I'd guess gradle is using the copy constructor and assuming that the new config has no customizers but I haven't tracked it down fully yet, so it could be something else.
> CompilerConfiguration copy constructor does not copy compilation customizers
> ----------------------------------------------------------------------------
>
> Key: GROOVY-9585
> URL: https://issues.apache.org/jira/browse/GROOVY-9585
> Project: Groovy
> Issue Type: Bug
> Reporter: Eric Milles
> Priority: Minor
>
> Consider the following:
> {code:groovy}
> import org.codehaus.groovy.control.*
> import org.codehaus.groovy.control.customizers.*
> def config = new CompilerConfiguration()
> config.addCompilationCustomizers(new ImportCustomizer().tap {
> addStarImport('groovy.transform')
> })
> def clone = new CompilerConfiguration(config)
> assert clone.getCompilationCustomizers().size() == 1
> {code}
> Trying to copy from a base config (like one set up by STC and SC unit tests) results in missing the compilation customizers.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)