fir-tree icon indicating copy to clipboard operation
fir-tree copied to clipboard

Are compiler plugins taken into account?

Open martinbonnin opened this issue 3 months ago • 2 comments

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:

Image

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?

martinbonnin avatar Aug 31 '25 12:08 martinbonnin

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.

serras avatar Sep 01 '25 11:09 serras

Shouldn't I see at least the Companion declaration? And $serializer as well?

martinbonnin avatar Sep 01 '25 12:09 martinbonnin