Skip to content

Commit 9650a28

Browse files
committed
Add changelog; fix Kotlin update & merge issues
1 parent 4af6772 commit 9650a28

File tree

4 files changed

+39
-10
lines changed

4 files changed

+39
-10
lines changed

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
1.3.3 / 2022-05-11
2+
==================
3+
4+
This release contains support for Protocol Buffers packed fields, as well as several bugfixes.
5+
It uses Kotlin 1.6.21 by default.
6+
7+
### Protobuf packed fields
8+
9+
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).
10+
To mark the field as packed, use `@ProtoPacked` annotation on it.
11+
Note it affects only `List` and primitive collection such as `IntArray` types.
12+
With this feature, it is now possible to decode Proto3 messages, where all repeated fields are packed by default.
13+
[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.
14+
15+
Many thanks to [Paul de Vrieze](https://github.com/pdvrieze) for his valuable contribution!
16+
17+
### Other improvements & small features
18+
19+
* Incorporate JsonPath into exception messages (#1841)
20+
* Mark block in corresponding encodeStructure/decodeStructure extensions as crossinline to reduce amount of bytecode (#1917)
21+
* Support serialization of compile-time `Collection<E>` properties that are not lists at the runtime (#1821)
22+
* Best-effort kotlin reflect avoidance in serializer(Type) (#1819)
23+
24+
### Bugfixes
25+
26+
* Iterate over element indices in ObjectSerializer in order to let the format skip unknown keys (#1916)
27+
* Correctly support registering both default polymorphic serializer & deserializer (#1849)
28+
* Make error message for captured generic type parameters much more straightforward (#1863)
29+
130
1.3.2 / 2021-12-23
231
==================
332

build.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ buildscript {
1212
if (project.hasProperty("library.version")) {
1313
ext.overriden_version = property('library.version')
1414
}
15-
ext.experimentalsEnabled = ["-progressive", "-Xopt-in=kotlin.Experimental",
16-
"-Xopt-in=kotlin.ExperimentalMultiplatform",
17-
"-Xopt-in=kotlinx.serialization.InternalSerializationApi"
15+
ext.experimentalsEnabled = ["-progressive", "-opt-in=kotlin.Experimental",
16+
"-opt-in=kotlin.ExperimentalMultiplatform",
17+
"-opt-in=kotlinx.serialization.InternalSerializationApi"
1818
]
1919

20-
ext.experimentalsInTestEnabled = ["-progressive", "-Xopt-in=kotlin.Experimental",
21-
"-Xopt-in=kotlin.ExperimentalMultiplatform",
22-
"-Xopt-in=kotlinx.serialization.ExperimentalSerializationApi",
23-
"-Xopt-in=kotlinx.serialization.InternalSerializationApi",
24-
"-Xopt-in=kotlin.ExperimentalUnsignedTypes"
20+
ext.experimentalsInTestEnabled = ["-progressive", "-opt-in=kotlin.Experimental",
21+
"-opt-in=kotlin.ExperimentalMultiplatform",
22+
"-opt-in=kotlinx.serialization.ExperimentalSerializationApi",
23+
"-opt-in=kotlinx.serialization.InternalSerializationApi",
24+
"-opt-in=kotlin.ExperimentalUnsignedTypes"
2525
]
2626
ext.koverEnabled = property('kover.enabled') ?: true
2727

formats/json/api/kotlinx-serialization-json.api

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ public final class kotlinx/serialization/json/JsonObject : kotlinx/serialization
270270
public fun containsValue (Lkotlinx/serialization/json/JsonElement;)Z
271271
public final fun entrySet ()Ljava/util/Set;
272272
public fun equals (Ljava/lang/Object;)Z
273-
public synthetic fun get (Ljava/lang/Object;)Ljava/lang/Object;
273+
public final synthetic fun get (Ljava/lang/Object;)Ljava/lang/Object;
274274
public final fun get (Ljava/lang/Object;)Lkotlinx/serialization/json/JsonElement;
275275
public fun get (Ljava/lang/String;)Lkotlinx/serialization/json/JsonElement;
276276
public fun getEntries ()Ljava/util/Set;

guide/test/BasicSerializationTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class BasicSerializationTest {
109109
@Test
110110
fun testExampleClasses12() {
111111
captureOutput("ExampleClasses12") { example.exampleClasses12.main() }.verifyOutputLinesStart(
112-
"Exception in thread \"main\" kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 52: Expected string literal but 'null' literal was found.",
112+
"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",
113113
"Use 'coerceInputValues = true' in 'Json {}` builder to coerce nulls to default values."
114114
)
115115
}

0 commit comments

Comments
 (0)