Hey there,
I'm working on a compiler plugin which generates new files in the AnalysisHandlerExtension.
Everything works fine until I turn on incremental compilation.
The problem is that the compiler has no idea about the relation between the generated files and their "originating files".
The first compilation works fine.
Then when a originating file changes, the compiler only compiles the originating file (Here I create a new generated file). But the compiler starts another compilation round and now compiles both the originating file and the generated file.
And this is the problem. The compiler should not trigger another round only to recompile the two files from the previous round.
I tried to cache the relations between the files and delete the generated ones, when ever a originating one changes, but this does not work, because the dirty generated files are already in the environment of the compiler.
I also tried to manually remove the files via reflection but the compiler can't handle that.
Another thing I tried is to just generate the file again, but this causes other issues, because the compiler analysis the old version of the file which may have errors in it.
Is there a workaround for my issue?