Claus Rørbech
09/25/2023, 12:53 PMCompanion
object I get the following error when combining the plugin with kotlinx.serialization
.
java.lang.IllegalStateException: Multiple plugins generated nested class with same name Companion for class /Sample:
public final companion object Companion : R|kotlin/Any| {
}
public final companion object Companion : R|kotlin/Any| {
}
Seems like both plugins are generating a Companion
. For user-defined companions the FirRegularClassSymbol.companionObjectSymbol
will be non-null, but I have tried debugging and cannot find any information to indentify and prevent this situation in my FirDeclarationGenerationExtension.getNestedClassifiersNames
and/or FirDeclarationGenerationExtension.generateNestedClassLikeDeclaration
. Also tried debugging the kotlinx.serialization
-plugin and there is also no visibility of my generated companion, so does not look like an ordering issue and even with both plugins setting their appropriate GeneratedDeclarationKey
there is no way to detect each others additions. Anybody with a suggestion to identify this situation, or how are plugins supposed to coexist?dmitriy.novozhilov
09/25/2023, 1:08 PMClaus Rørbech
09/27/2023, 12:37 PMdmitriy.novozhilov
09/27/2023, 1:31 PM