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 2019/12/09 21:37:02 UTC
[jira] [Closed] (GROOVY-8399) ImportCustomizer is applied once per
class (should be once per module)
[ https://issues.apache.org/jira/browse/GROOVY-8399?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-8399.
-----------------------------
> ImportCustomizer is applied once per class (should be once per module)
> ----------------------------------------------------------------------
>
> Key: GROOVY-8399
> URL: https://issues.apache.org/jira/browse/GROOVY-8399
> Project: Groovy
> Issue Type: Bug
> Components: Compiler
> Reporter: Eric Milles
> Assignee: Eric Milles
> Priority: Major
> Fix For: 3.0.0-rc-2
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> CompilerConfiguration with ImportCustomizer gets applied once per class in a source unit. If unit has a lot of classes this can cause a lot of extra imports processing.{{CompilationUnit.applyToPrimaryClassNodes(PrimaryClassNodeOperation)}} is the loop that drives the CompilationCustomizers. {{org.codehaus.groovy.control.customizers.ImportCustomizer.call}} is where imports are added. Could check if ClassNode param is the primary class in the module before applying. Or {{ModuleNode}} could allow {{addImport}} and just dedup internally.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)