Hi Jochen/Other devs Please ignore my previous email. I have narrowed down the problem. I will state what I am doing first
1. I have my own ClassNodeResolver that overrides findClassNode and finds source units that match the class being looked for. I return the sourceunit if the class name and the source unit names match (through LookUpResult(sourceUnit)) and I return a class node if I am looking for an inner class in the source unit (through LookUpResult(ClassHelper.makeWithoutCaching...)) 2. This works up until the very end of Phase SEMANTIC_ANALYSIS 3. But when I exit that phase, I see that one source unit is still queued. Fortunately, this gets added back because of the dequeued() operation (in compilationunit.java) after every phase 4. But what ends up happening is that every other phase operation I added (all my compiler customizations) have now run twice (first before the dequeue operation because the interrupt exception was not thrown to stop further phase processing and then after that last class has been added back to the compile mix as part of the dequeued() call) How do I prevent this double processing of phase operations from happening? regards Saravanan On Thu, Jun 12, 2025 at 11:21 PM Jochen Theodorou <blackd...@gmx.org> wrote: > On 12.06.25 16:07, Saravanan Palanichamy wrote: > > Thank you Jochen, > > > > I made some progress based on your recommendations in this manner > > > > 1. Added one source file as source unit to the compilation unit > > 2. I use a compilation unit that uses my custom ClassNodeResolver that > > derives from the base ClassNodeResolver > > 3. When it hits the findClassNode function, I call the parent, if the > > parent returned null, I then look in my directory folder for the > > file (I use the node name, replace the .'s with /'s and look for the > > file in my source folders) > > 4. And it works beautifully as it goes through resolving things for me > > > > Right now I feel like the kitten that unravelled the dependency string > > ball.😃 , thank you very much for helping with this > > nice > > [...] > > The compile error is that a class gets left behind in the > > CompileUnit's classesToCompile. I think this is because I am returning a > > source unit that contains both outer and inner classes when the look up > > should have returned an inner class. What is the right way to fix this? > > Should I add the source unit but return a dummy classnode that is not > > resolved yet? > > yeah please try that. > > bye Jochen >