You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use AutoConfig for a mod written in Kotlin. I'm wrapping a custom kotlinx.serialization serializer with a PartitioningSerializer, but the mod fails to load due to the companion object the kotlinx compiler plugin generates. The PartitioningSerializer class sees the static "Companion" field as a module, with no way to mark it as excluded.
When I have something like this for my config classes:
I get a RuntimeException with the message: Invalid module: public static final mod.package.Config$Companion mod.package.Config.Companion. If this was Java, I could annotate this field with @ConfigEntry.Gui.Excluded, but this can only apply to a field, which I don't have access to from Kotlin. I either cannot use Kotlin's serialization plugin, or cannot use AutoConfig's PartitioningSerializer and instead must make my own.
I'm not sure why static fields would be included by default. Is this behavior intended?
I've attached a full crash log. The class names are slightly different from above, CoreConfig is the root config that has this issue.
I'm trying to use AutoConfig for a mod written in Kotlin. I'm wrapping a custom kotlinx.serialization serializer with a PartitioningSerializer, but the mod fails to load due to the companion object the kotlinx compiler plugin generates. The PartitioningSerializer class sees the static "Companion" field as a module, with no way to mark it as excluded.
When I have something like this for my config classes:
I get a RuntimeException with the message:
Invalid module: public static final mod.package.Config$Companion mod.package.Config.Companion
. If this was Java, I could annotate this field with @ConfigEntry.Gui.Excluded, but this can only apply to a field, which I don't have access to from Kotlin. I either cannot use Kotlin's serialization plugin, or cannot use AutoConfig's PartitioningSerializer and instead must make my own.I'm not sure why static fields would be included by default. Is this behavior intended?
I've attached a full crash log. The class names are slightly different from above,
CoreConfig
is the root config that has this issue.crash-2021-12-17_20.11.47-client.txt
The text was updated successfully, but these errors were encountered: