[
https://issues.apache.org/jira/browse/GROOVY-9585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18102406#comment-18102406
]
Paul King commented on GROOVY-9585:
-----------------------------------
Gradle seems to only use the no-arg constructors now. This is a breaking change
if anyone was relying on the customizers not being copied - so for instance,
you'll get two ImportNodes if there was an existing one in the config and you
are manually re-adding because of this flaw.
> 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
> Labels: breaking
>
> 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.20.10#820010)