From a715c2660af2594d423e0701b08caf1787924699 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Wed, 24 Nov 2021 13:52:22 +0300 Subject: [PATCH] Apply fix after https://github.com/Kotlin/kotlinx.serialization/issues/1602 --- .../kotlin/space/kscience/visionforge/VisionBase.kt | 4 +--- .../space/kscience/visionforge/markup/VisionOfMarkup.kt | 4 ---- .../space/kscience/visionforge/plotly/VisionOfPlotly.kt | 3 --- .../kotlin/space/kscience/visionforge/solid/SolidBase.kt | 4 ---- .../kotlin/space/kscience/visionforge/solid/SolidGroup.kt | 4 ---- .../kotlin/space/kscience/visionforge/solid/SolidReference.kt | 3 --- 6 files changed, 1 insertion(+), 21 deletions(-) diff --git a/visionforge-core/src/commonMain/kotlin/space/kscience/visionforge/VisionBase.kt b/visionforge-core/src/commonMain/kotlin/space/kscience/visionforge/VisionBase.kt index dce9bbd5..e7865a24 100644 --- a/visionforge-core/src/commonMain/kotlin/space/kscience/visionforge/VisionBase.kt +++ b/visionforge-core/src/commonMain/kotlin/space/kscience/visionforge/VisionBase.kt @@ -29,11 +29,9 @@ internal data class MetaListener( @SerialName("vision") public open class VisionBase( @Transient override var parent: VisionGroup? = null, + protected var properties: MutableMeta? = null ) : Vision { - @Transient - protected open var properties: MutableMeta? = null - @Synchronized protected fun getOrCreateProperties(): MutableMeta { if (properties == null) { diff --git a/visionforge-markdown/src/commonMain/kotlin/space/kscience/visionforge/markup/VisionOfMarkup.kt b/visionforge-markdown/src/commonMain/kotlin/space/kscience/visionforge/markup/VisionOfMarkup.kt index a5ec3fa0..87682978 100644 --- a/visionforge-markdown/src/commonMain/kotlin/space/kscience/visionforge/markup/VisionOfMarkup.kt +++ b/visionforge-markdown/src/commonMain/kotlin/space/kscience/visionforge/markup/VisionOfMarkup.kt @@ -5,7 +5,6 @@ import kotlinx.serialization.Serializable import kotlinx.serialization.modules.SerializersModule import kotlinx.serialization.modules.polymorphic import kotlinx.serialization.modules.subclass -import space.kscience.dataforge.meta.MutableMeta import space.kscience.dataforge.meta.string import space.kscience.dataforge.names.Name import space.kscience.dataforge.names.asName @@ -18,9 +17,6 @@ public class VisionOfMarkup( public val format: String = COMMONMARK_FORMAT ) : VisionBase() { - //FIXME to be removed after https://github.com/Kotlin/kotlinx.serialization/issues/1602 fix - protected override var properties: MutableMeta? = null - //TODO add templates public var content: String? by meta.string(CONTENT_PROPERTY_KEY) diff --git a/visionforge-plotly/src/commonMain/kotlin/space/kscience/visionforge/plotly/VisionOfPlotly.kt b/visionforge-plotly/src/commonMain/kotlin/space/kscience/visionforge/plotly/VisionOfPlotly.kt index 99df2e84..1b20b95f 100644 --- a/visionforge-plotly/src/commonMain/kotlin/space/kscience/visionforge/plotly/VisionOfPlotly.kt +++ b/visionforge-plotly/src/commonMain/kotlin/space/kscience/visionforge/plotly/VisionOfPlotly.kt @@ -2,7 +2,6 @@ package space.kscience.visionforge.plotly import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable -import space.kscience.dataforge.meta.MutableMeta import space.kscience.dataforge.misc.DFExperimental import space.kscience.plotly.Plot import space.kscience.plotly.Plotly @@ -12,8 +11,6 @@ import space.kscience.visionforge.html.VisionOutput @Serializable @SerialName("vision.plotly") public class VisionOfPlotly private constructor() : VisionBase() { - //FIXME to be removed after https://github.com/Kotlin/kotlinx.serialization/issues/1602 fix - override var properties: MutableMeta? = null public constructor(plot: Plot) : this() { properties = plot.meta diff --git a/visionforge-solid/src/commonMain/kotlin/space/kscience/visionforge/solid/SolidBase.kt b/visionforge-solid/src/commonMain/kotlin/space/kscience/visionforge/solid/SolidBase.kt index 021079d3..70e2501e 100644 --- a/visionforge-solid/src/commonMain/kotlin/space/kscience/visionforge/solid/SolidBase.kt +++ b/visionforge-solid/src/commonMain/kotlin/space/kscience/visionforge/solid/SolidBase.kt @@ -2,15 +2,11 @@ package space.kscience.visionforge.solid import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable -import space.kscience.dataforge.meta.MutableMeta import space.kscience.dataforge.meta.descriptors.MetaDescriptor import space.kscience.visionforge.VisionBase @Serializable @SerialName("solid") public open class SolidBase : VisionBase(), Solid { - //FIXME to be removed after https://github.com/Kotlin/kotlinx.serialization/issues/1602 fix - override var properties: MutableMeta? = null - override val descriptor: MetaDescriptor get() = Solid.descriptor } diff --git a/visionforge-solid/src/commonMain/kotlin/space/kscience/visionforge/solid/SolidGroup.kt b/visionforge-solid/src/commonMain/kotlin/space/kscience/visionforge/solid/SolidGroup.kt index 604aac01..b3e8ccd8 100644 --- a/visionforge-solid/src/commonMain/kotlin/space/kscience/visionforge/solid/SolidGroup.kt +++ b/visionforge-solid/src/commonMain/kotlin/space/kscience/visionforge/solid/SolidGroup.kt @@ -2,7 +2,6 @@ package space.kscience.visionforge.solid import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable -import space.kscience.dataforge.meta.MutableMeta import space.kscience.dataforge.meta.descriptors.MetaDescriptor import space.kscience.dataforge.names.Name import space.kscience.dataforge.names.NameToken @@ -32,9 +31,6 @@ public interface PrototypeHolder { @SerialName("group.solid") public class SolidGroup : VisionGroupBase(), Solid, PrototypeHolder { - //FIXME to be removed after https://github.com/Kotlin/kotlinx.serialization/issues/1602 fix - override var properties: MutableMeta? = null - override val children: Map get() = super.childrenInternal.filter { it.key != PROTOTYPES_TOKEN } private var prototypes: MutableVisionGroup? diff --git a/visionforge-solid/src/commonMain/kotlin/space/kscience/visionforge/solid/SolidReference.kt b/visionforge-solid/src/commonMain/kotlin/space/kscience/visionforge/solid/SolidReference.kt index eeab05ff..04c54907 100644 --- a/visionforge-solid/src/commonMain/kotlin/space/kscience/visionforge/solid/SolidReference.kt +++ b/visionforge-solid/src/commonMain/kotlin/space/kscience/visionforge/solid/SolidReference.kt @@ -2,7 +2,6 @@ package space.kscience.visionforge.solid import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable -import space.kscience.dataforge.meta.MutableMeta import space.kscience.dataforge.meta.ObservableMutableMeta import space.kscience.dataforge.meta.descriptors.MetaDescriptor import space.kscience.dataforge.meta.get @@ -62,8 +61,6 @@ public class SolidReferenceGroup( public val refName: Name, ) : VisionBase(), SolidReference, VisionGroup, Solid { - override var properties: MutableMeta? = null - /** * Recursively search for defined template in the parent */