Skip to content

Commit

Permalink
Add changelog; fix Kotlin update & merge issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sandwwraith committed May 11, 2022
1 parent 4af6772 commit 9650a28
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 10 deletions.
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
==================

Expand Down
16 changes: 8 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ buildscript {
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

Expand Down
2 changes: 1 addition & 1 deletion formats/json/api/kotlinx-serialization-json.api
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public final class kotlinx/serialization/json/JsonObject : kotlinx/serialization
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;
Expand Down
2 changes: 1 addition & 1 deletion guide/test/BasicSerializationTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class BasicSerializationTest {
@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."
)
}
Expand Down

0 comments on commit 9650a28

Please sign in to comment.