What is the intended way to construct IR elements ...
# k2-adopters
c
What is the intended way to construct IR elements like
IrClassReferenceImpl
and
IrVarargImpl
? I cannot find builders for those and seems like constructors have been internalized in favor of factory methods from 1.9 to 2.0. This prevents my compiler plugin to run with 2.0.0-RC if it was build with 1.9.x, but runs fine with 2.0.0-RC if also compiled with
2.0.0-RC1
. These IR elements are in
org.jetbrains.kotlin.ir.expressions.impl
so maybe not supposed to be constructed directly, but just cannot find other ways similarly to ex. factory methods in ExpressionHelpers.kt. Are there a better way to create `IrClassReference`s and `IrVararg`s or is it just expected to have to provide a version of the plugin compiled individually for 1.9 and 2.0?
g
I'm definitely not the definitive source but I don't think they currently are making any guarantees about compiler plugin API stability . The compiler plugin API has not been released or documented in any way I know of. I think the expectation should be everything can break version to version until they officially define/release/stabilize it (I don't know what it is supposed to look like, something like what we are using now, or something completely different?)