Add changelog; fix Kotlin update & merge issues
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0e3155d..621bf09 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,32 @@
+1.3.3 / 2022-05-11
+==================
+
+This release contains support for Protocol Buffers packed fields, as well as several bugfixes.
+It uses Kotlin 1.6.21 by default.
+
+### Protobuf packed fields
+
+It is now possible to encode and decode Kotlin classes to/from Protobuf messages with [packed repeated fields](https://developers.google.com/protocol-buffers/docs/encoding#packed).
+To mark the field as packed, use `@ProtoPacked` annotation on it.
+Note it affects only `List` and primitive collection such as `IntArray` types.
+With this feature, it is now possible to decode Proto3 messages, where all repeated fields are packed by default.
+[Protobuf schema generator](https://kotlin.github.io/kotlinx.serialization/kotlinx-serialization-protobuf/kotlinx.serialization.protobuf.schema/-proto-buf-schema-generator/index.html) also supports new `@ProtoPacked` annotation.
+
+Many thanks to [Paul de Vrieze](https://github.com/pdvrieze) for his valuable contribution!
+
+### Other improvements & small features
+
+ * Incorporate JsonPath into exception messages (#1841)
+ * Mark block in corresponding encodeStructure/decodeStructure extensions as crossinline to reduce amount of bytecode (#1917)
+ * Support serialization of compile-time `Collection<E>` properties that are not lists at the runtime (#1821)
+ * Best-effort kotlin reflect avoidance in serializer(Type) (#1819)
+
+### Bugfixes
+
+ * Iterate over element indices in ObjectSerializer in order to let the format skip unknown keys (#1916)
+ * Correctly support registering both default polymorphic serializer & deserializer (#1849)
+ * Make error message for captured generic type parameters much more straightforward (#1863)
+
1.3.2 / 2021-12-23
==================
diff --git a/build.gradle b/build.gradle
index b8d6731..69aa68d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -12,16 +12,16 @@
if (project.hasProperty("library.version")) {
ext.overriden_version = property('library.version')
}
- ext.experimentalsEnabled = ["-progressive", "-Xopt-in=kotlin.Experimental",
- "-Xopt-in=kotlin.ExperimentalMultiplatform",
- "-Xopt-in=kotlinx.serialization.InternalSerializationApi"
+ ext.experimentalsEnabled = ["-progressive", "-opt-in=kotlin.Experimental",
+ "-opt-in=kotlin.ExperimentalMultiplatform",
+ "-opt-in=kotlinx.serialization.InternalSerializationApi"
]
- ext.experimentalsInTestEnabled = ["-progressive", "-Xopt-in=kotlin.Experimental",
- "-Xopt-in=kotlin.ExperimentalMultiplatform",
- "-Xopt-in=kotlinx.serialization.ExperimentalSerializationApi",
- "-Xopt-in=kotlinx.serialization.InternalSerializationApi",
- "-Xopt-in=kotlin.ExperimentalUnsignedTypes"
+ ext.experimentalsInTestEnabled = ["-progressive", "-opt-in=kotlin.Experimental",
+ "-opt-in=kotlin.ExperimentalMultiplatform",
+ "-opt-in=kotlinx.serialization.ExperimentalSerializationApi",
+ "-opt-in=kotlinx.serialization.InternalSerializationApi",
+ "-opt-in=kotlin.ExperimentalUnsignedTypes"
]
ext.koverEnabled = property('kover.enabled') ?: true
diff --git a/formats/json/api/kotlinx-serialization-json.api b/formats/json/api/kotlinx-serialization-json.api
index eb91626..1fe1440 100644
--- a/formats/json/api/kotlinx-serialization-json.api
+++ b/formats/json/api/kotlinx-serialization-json.api
@@ -270,7 +270,7 @@
public fun containsValue (Lkotlinx/serialization/json/JsonElement;)Z
public final fun entrySet ()Ljava/util/Set;
public fun equals (Ljava/lang/Object;)Z
- public synthetic fun get (Ljava/lang/Object;)Ljava/lang/Object;
+ public final synthetic fun get (Ljava/lang/Object;)Ljava/lang/Object;
public final fun get (Ljava/lang/Object;)Lkotlinx/serialization/json/JsonElement;
public fun get (Ljava/lang/String;)Lkotlinx/serialization/json/JsonElement;
public fun getEntries ()Ljava/util/Set;
diff --git a/guide/test/BasicSerializationTest.kt b/guide/test/BasicSerializationTest.kt
index 5a2f8a5..74c4433 100644
--- a/guide/test/BasicSerializationTest.kt
+++ b/guide/test/BasicSerializationTest.kt
@@ -109,7 +109,7 @@
@Test
fun testExampleClasses12() {
captureOutput("ExampleClasses12") { example.exampleClasses12.main() }.verifyOutputLinesStart(
- "Exception in thread \"main\" kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 52: Expected string literal but 'null' literal was found.",
+ "Exception in thread \"main\" kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 52: Expected string literal but 'null' literal was found at path: $.language",
"Use 'coerceInputValues = true' in 'Json {}` builder to coerce nulls to default values."
)
}