Affects Version/s: 2.5.6
Fix Version/s: None
Steps to reproduce:
1. make sure the build is not delegated to Gradle in Preferences | Build, Execution, Deployment | Build Tools | Gradle
2. rebuild project
3. make changes in Person.groovy and Bootstrap.groovy (to mark them as subject for recompilation)
4. build project
What happens with -Dgroovyc.asm.resolving.only=false:
1. Bootstrap.groovy and Person.groovy are added to CompilationUnit#queuedSources
2. ResolveVisitor visits Bootstrap.groovy and tries to load PersonService
3. asmResolving flag is set to false by IntelliJ, this results in skipping findDecompiled call inside ClassNodeResolver#tryAsLoaderClassOrScript
4. the PersonService class fails to load because of missing Person class
5. tryAsScript kicks in and adds PersonService to CompilationUnit#queuedSources
6. when it comes to Micronaut ClassNode#isResolved returns false for PersonService
What happens without -Dgroovyc.asm.resolving.only=false:
3. asmResolving is not set by IntellliJ
4. findDecompiled returns DecompiledClassNode for PersonService
5. when it comes to Micronaut ClassNode#isResolved returns true for PersonService, and this results in an exception because the class cannot be loaded actually.
I've tried to fix it in the compiler but I'm not sure what's the proper fix would be.
Please let me know if I can do something within IntelliJ.
The issue in JB YouTrack for the reference: https://youtrack.jetbrains.com/issue/IDEA-218698