Initially it was implemented via "relatedConfigurations", but these
relatedConfigurations didn't contain outgoing configurations for default
base compilations, but for KotlinJvmAndroid did. There is no reason to
check incoming configurations for dependency rewriter. So for
KotlinJvmAndroidCompilation it is enough to check their variant-specific
outgoing configurations.
^KT-58225 Verification Pending
It had a little use and even this use was causing a problem. Since
inside `maybeRegister { }` this block Gradle forbids creation of
other entities. Because this block is part of "entity configuration".
So it is recommended to replace with either
* `getOrCreate("foo", invokeWhenCreated = {})`
* or just getOrCreate("foo").apply {}
It was public api which has not much use outside KGP.
Moreover, this api has a little use so it is ok list configuration names
in place.
^KT-58225 Verification Pending
SerializerFactory is an implementation detail for Kotlin/JS and Native:
it should be added as a supertype to a companion object of certain serializable classes
and `serializer(vararg KSerializer<*>)` function from it should be implemented.
Existing implementation added the supertype, but did not add proper override to FirClass
of a companion, which led to various warnings and errors like 'Abstract function 'serializer' is not implemented in non-abstract companion object'.
Also implemented the addition of SerializerFactory supertype to user-defined companions within @Serializable and @MetaSerializable when necessary.
Also set up proper box tests for FIR+Kotlin/JS combination.
#KT-58501 Fixed
#KT-59768 Fixed
It's important to filter out failures from lazy resolve before calling other
suppressors like BlackBoxCodegenSuppressor. Otherwise other suppressors
can filter out every failure from test and keep it as ignored even if
the only problem in lazy resolve contracts, which disables with special directive
This is needed for providing types for '_DebugLabel' variables in
code fragments. Originally, there come a JVM type descriptor, so there
it's converted to a FirResolvedTypeRef reference through FirJavaTypeRef.
this error is not valid for scripts, where some receivers are set
later in the lowering, and it looks like in other cases this problem
will be detected later in lowering or codegen anyway.