fir-tree
fir-tree copied to clipboard
Are compiler plugins taken into account?
Hi 👋
Apologies for the naive question but looks like plugins are not taken into account right?
If I'm dumping this:
import kotlinx.serialization.Serializable
@Serializable
class Foo(
val bar: Int
)
I get that:
When I would expect a lot more declarations (companion, serializer, etc...)
Am I correct? If yes, is there a way to add the plugins somewhere?
The issue here is that the kotlinx.serialization plug-in does most of its work in the IR phase, thus later than the moment to which FIR Tree hooks up. In fact, right now the compiler plug-in API only allows creating bodies in the IR phase, so none would be shown here.
Shouldn't I see at least the Companion declaration? And $serializer as well?