You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2021/09/22 17:03:00 UTC

[jira] [Commented] (GROOVY-10248) Groovy ResolveVisitor runs twice

    [ https://issues.apache.org/jira/browse/GROOVY-10248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17418718#comment-17418718 ] 

Eric Milles commented on GROOVY-10248:
--------------------------------------

I do have a solution for this that I have been lobbying for, but it is tangled up with the runtime compilation handling of outer class searching: https://github.com/apache/groovy/pull/1614#issuecomment-903847576

https://github.com/groovy/groovy-eclipse/commit/e9b3d70f6e9c3467af4fa97af361e4a64d7defb7

> Groovy ResolveVisitor runs twice
> --------------------------------
>
>                 Key: GROOVY-10248
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10248
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>            Reporter: Svatopluk Dedic
>            Priority: Minor
>
> CompilationUnit [runs ResolveVisitor explicitly|https://github.com/groovy/groovy-core/blob/master/src/main/org/codehaus/groovy/control/CompilationUnit.java#L541] but the resolver is also registered as a [regular PhaseOperation|https://github.com/groovy/groovy-core/blob/master/src/main/org/codehaus/groovy/control/CompilationUnit.java#L178].
> It's not that big deal, as classes resolved in the 1st pass are relatively quickly determined as resolved. But still the whole AST source must be traversed.
> The ISourceUnitOperation's guard (check source.phase against unit.phase) does not work here, as the explicit resolver cannot upgrade the source's phase (not all operations completed).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)