The docs for SerializablePersistentStateComponent say you need to use @JvmField, but this does not work except for Maps and Collections: code
In order for it to work, the field needs to be marked with a storage annotation such as @field:Property instead in order to trigger this logic
3rd party plugins can also not leverage kotlin-serializazation due to different classloaders make that statement return false, is this expected and tracked as an improvement to the platform?
Hi! We are trying to resolve some complexities at the moment, at least by dropping the need for @JvmField. I don’t think kotlinx-serializazation is a right solution as it is rather bad to have JSON in XML if settings are shared in Git.
Benefits of K-S though is that it is easy to test the serialization and adding custom serialization layers if needed. Wish there was a K-S XML serializer we could use with it.
I currently test the forwards/backwards compatibility of the serialization using these utils which is close but not exact to how the IDE does the serialization, (if you have a better way please let me know):