https://kotlinlang.org logo
#compiler
Title
# compiler
d

Damian Baczyński

02/23/2024, 1:11 PM
Hi. I have a compiler plugin that generates classes (
IrClass
) across multiple files (
IrFile
). In result I have multiple classes with different parents. Some of those classes are duplicates and could be reused. However, if I use class declared in file A in file B it breaks with incremental compilation after file A is deleted. How to share those classes properly to avoid IC errors?
I tried to generate a
IrFile
and set it as a parent for those classes, but I don't know how to do this properly or even if such a case is supported (this file is ignored by the compiler despite being added to
IrModuleFragment.files
).
2 Views