Skip to content

Commit 869586b

Browse files
Bump serialization from 1.6.3 to 1.7.0 (#127)
Bumps `serialization` from 1.6.3 to 1.7.0. Updates `org.jetbrains.kotlinx:kotlinx-serialization-json` from 1.6.3 to 1.7.0 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/Kotlin/kotlinx.serialization/releases">org.jetbrains.kotlinx:kotlinx-serialization-json's releases</a>.</em></p> <blockquote> <h2>1.7.0</h2> <p>This release contains all of the changes from 1.7.0-RC and is compatible with Kotlin 2.0. Please note that for reasons explained in the <a href="https://github.com/Kotlin/kotlinx.serialization/releases/tag/v1.7.0-RC">1.7.0-RC changelog</a>, it may not be possible to use it with the Kotlin 1.9.x compiler plugin. Yet, it is still fully backward compatible with previous versions.</p> <p>The only difference with 1.7.0-RC is that the <code>classDiscriminatorMode</code> property in <code>JsonBuilder</code> is marked as experimental, as it should have been when it was introduced (<a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2680">#2680</a>).</p> <h2>1.7.0-RC</h2> <p>This is a release candidate for the next version. It is based on Kotlin 2.0.0-RC3 and is fully compatible with a stable Kotlin 2.0 release. Due to a potential breaking change (see below), it requires a compiler plugin with a version at least of 2.0.0-RC1.</p> <h3>Important change: priority of PolymorphicSerializer for interfaces during call to serializer<!-- raw HTML omitted -->() function</h3> <p>Non-sealed interfaces in kotlinx.serialization are always <a href="https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/polymorphism.md#serializing-interfaces">serializable with a polymorphic serializer</a>, even if they do not have <code>@serializable</code> annotation. This also means that <code>serializersModule.serializer&lt;SomeInterface&gt;()</code> call will return you a serializer capable of polymorphism. This function was written in a way that it unconditionally returns a <code>PolymorphicSerializer</code> if type argument is a non-sealed interface. This caused problems with <code>SerializersModule</code> functionality, because actual module was not taken into consideration, and therefore it was impossible to override serializer for interface using 'contextual serialization' feature. The problem is described in detail <a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2060">here</a>. To overcome these problems, we had to change the behavior of this function regarding interfaces. It now looks into <code>SerializersModule</code> first if <code>T</code> is a non-sealed interface, and only if there is no registered contextual serializer for <code>T</code>, it returns a polymorphic serializer.</p> <p>Behavior <strong>before 1.7.0-RC</strong>:</p> <pre lang="kotlin"><code>interface SomeInterface <p>val module = SerializersModule { contextual(SomeInterface::class, CustomSomeInterfaceSerializer) }</p> <p>// Prints PolymorphicSerializer&lt;SomeInterface&gt;: println(module.serializer&lt;SomeInterface&gt;()) </code></pre></p> <p>Behavior <strong>in 1.7.0-RC, 1.7.0, and higher</strong>:</p> <pre lang="kotlin"><code>interface SomeInterface <p>val module = SerializersModule { contextual(SomeInterface::class, CustomSomeInterfaceSerializer) }</p> <p>// Prints CustomSomeInterfaceSerializer: println(module.serializer&lt;SomeInterface&gt;()) </code></pre></p> <p>We expect minimal impact from this change, but be aware of it anyway. Implementation details are available in <a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2060">this PR</a>.</p> <p>Due to the <a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/1348">serializer() function being also a compiler intrinsic</a>, code of kotlinx.serialization compiler plugin also accommodates this change in the 2.0 branch. To get a consistent result from both plugin and runtime, kotlinx.serialization compiler plugin should be <strong>at least of 2.0.0-RC1 version.</strong> <strong>To verify so, 1.7.0-RC runtime will be rejected by older plugins.</strong></p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md">org.jetbrains.kotlinx:kotlinx-serialization-json's changelog</a>.</em></p> <blockquote> <h1>1.7.0 / 2024-06-05</h1> <p>This release contains all of the changes from 1.7.0-RC and is compatible with Kotlin 2.0. Please note that for reasons explained in the <a href="https://github.com/Kotlin/kotlinx.serialization/releases/tag/v1.7.0-RC">1.7.0-RC changelog</a>, it may not be possible to use it with the Kotlin 1.9.x compiler plugin. Yet, it is still fully backwards compatible with previous versions.</p> <p>The only difference with 1.7.0-RC is that <code>classDiscriminatorMode</code> property in <code>JsonBuilder</code> is marked as experimental, as it should have been when it was introduced (<a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2680">#2680</a>).</p> <h1>1.7.0-RC / 2024-05-16</h1> <p>This is a release candidate for the next version. It is based on Kotlin 2.0.0-RC3 and is fully compatible with a stable Kotlin 2.0 release. Due to a potential breaking change (see below), it requires a compiler plugin with a version at least of 2.0.0-RC1.</p> <h3>Important change: priority of PolymorphicSerializer for interfaces during call to serializer<!-- raw HTML omitted -->() function</h3> <p>Non-sealed interfaces in kotlinx.serialization are always <a href="https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/polymorphism.md#serializing-interfaces">serializable with a polymorphic serializer</a>, even if they do not have <code>@serializable</code> annotation. This also means that <code>serializersModule.serializer&lt;SomeInterface&gt;()</code> call will return you a serializer capable of polymorphism. This function was written in a way that it unconditionally returns a <code>PolymorphicSerializer</code> if type argument is a non-sealed interface. This caused problems with <code>SerializersModule</code> functionality, because actual module was not taken into consideration, and therefore it was impossible to override serializer for interface using 'contextual serialization' feature. The problem is described in details <a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2060">here</a>. To overcome these problems, we had to change the behavior of this function regarding interfaces. It now looks into <code>SerializersModule</code> first if <code>T</code> is a non-sealed interface, and only if there is no registered contextual serializer for <code>T</code>, it returns a polymorphic serializer.</p> <p>Behavior <strong>before 1.7.0-RC</strong>:</p> <pre lang="kotlin"><code>interface SomeInterface <p>val module = SerializersModule { contextual(SomeInterface::class, CustomSomeInterfaceSerializer) }</p> <p>// Prints PolymorphicSerializer&lt;SomeInterface&gt;: println(module.serializer&lt;SomeInterface&gt;()) </code></pre></p> <p>Behavior <strong>in 1.7.0-RC, 1.7.0, and higher</strong>:</p> <pre lang="kotlin"><code>interface SomeInterface <p>val module = SerializersModule { contextual(SomeInterface::class, CustomSomeInterfaceSerializer) }</p> <p>// Prints CustomSomeInterfaceSerializer: println(module.serializer&lt;SomeInterface&gt;()) &lt;/tr&gt;&lt;/table&gt; </code></pre></p> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/d2dc7d2978bd62971e8ab00de197d59d7e378ed2"><code>d2dc7d2</code></a> Update to Kotlin 2.0 and prepare 1.7.0 release (<a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2706">#2706</a>)</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/1cac162673312984ea2a8084635ec573a836a0bc"><code>1cac162</code></a> Merge remote-tracking branch 'origin/master' into dev</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/fbd07344176647d005aedd7ece6194f97db1efca"><code>fbd0734</code></a> Use <a href="https://github.com/PublishedApi"><code>@​PublishedApi</code></a> annotation on functions called from plugin-generated code (...</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/4bf4113c2c6936e841caf2a8670382e701e7fcc2"><code>4bf4113</code></a> Add bencoding to community-supported formats (<a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2687">#2687</a>)</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/c487e78e31001d0650e988cd6061917706c8c123"><code>c487e78</code></a> JSON: Fix mutable <code>classDiscriminatorMode</code> in config, and mark experimental i...</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/385c97d39d4eb759698cd10e7b46b6372aa24b08"><code>385c97d</code></a> Remove yellow code (<a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2691">#2691</a>)</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/688f64bdbbfa19fd259bf0dfc166181c978c5a6d"><code>688f64b</code></a> Added link to kotlinx-serialization-smile in the formats list (<a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2689">#2689</a>)</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/1f38e2289e4bedc714e6f70fe23927e6041919f9"><code>1f38e22</code></a> Add additional repository</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/dd1b76ee217a42ed3aaca4697b6198f1aaa4cfe2"><code>dd1b76e</code></a> Prepare Changelog and Readme for 1.7.0-RC release</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/b4bf182e9c384e848f588dfe04277e1d79db3d1d"><code>b4bf182</code></a> Raise Require-Kotlin-Version to 2.0.0-RC1</li> <li>Additional commits viewable in <a href="https://github.com/Kotlin/kotlinx.serialization/compare/v1.6.3...v1.7.0">compare view</a></li> </ul> </details> <br /> Updates `org.jetbrains.kotlinx:kotlinx-serialization-json-okio` from 1.6.3 to 1.7.0 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/Kotlin/kotlinx.serialization/releases">org.jetbrains.kotlinx:kotlinx-serialization-json-okio's releases</a>.</em></p> <blockquote> <h2>1.7.0</h2> <p>This release contains all of the changes from 1.7.0-RC and is compatible with Kotlin 2.0. Please note that for reasons explained in the <a href="https://github.com/Kotlin/kotlinx.serialization/releases/tag/v1.7.0-RC">1.7.0-RC changelog</a>, it may not be possible to use it with the Kotlin 1.9.x compiler plugin. Yet, it is still fully backward compatible with previous versions.</p> <p>The only difference with 1.7.0-RC is that the <code>classDiscriminatorMode</code> property in <code>JsonBuilder</code> is marked as experimental, as it should have been when it was introduced (<a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2680">#2680</a>).</p> <h2>1.7.0-RC</h2> <p>This is a release candidate for the next version. It is based on Kotlin 2.0.0-RC3 and is fully compatible with a stable Kotlin 2.0 release. Due to a potential breaking change (see below), it requires a compiler plugin with a version at least of 2.0.0-RC1.</p> <h3>Important change: priority of PolymorphicSerializer for interfaces during call to serializer<!-- raw HTML omitted -->() function</h3> <p>Non-sealed interfaces in kotlinx.serialization are always <a href="https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/polymorphism.md#serializing-interfaces">serializable with a polymorphic serializer</a>, even if they do not have <code>@serializable</code> annotation. This also means that <code>serializersModule.serializer&lt;SomeInterface&gt;()</code> call will return you a serializer capable of polymorphism. This function was written in a way that it unconditionally returns a <code>PolymorphicSerializer</code> if type argument is a non-sealed interface. This caused problems with <code>SerializersModule</code> functionality, because actual module was not taken into consideration, and therefore it was impossible to override serializer for interface using 'contextual serialization' feature. The problem is described in detail <a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2060">here</a>. To overcome these problems, we had to change the behavior of this function regarding interfaces. It now looks into <code>SerializersModule</code> first if <code>T</code> is a non-sealed interface, and only if there is no registered contextual serializer for <code>T</code>, it returns a polymorphic serializer.</p> <p>Behavior <strong>before 1.7.0-RC</strong>:</p> <pre lang="kotlin"><code>interface SomeInterface <p>val module = SerializersModule { contextual(SomeInterface::class, CustomSomeInterfaceSerializer) }</p> <p>// Prints PolymorphicSerializer&lt;SomeInterface&gt;: println(module.serializer&lt;SomeInterface&gt;()) </code></pre></p> <p>Behavior <strong>in 1.7.0-RC, 1.7.0, and higher</strong>:</p> <pre lang="kotlin"><code>interface SomeInterface <p>val module = SerializersModule { contextual(SomeInterface::class, CustomSomeInterfaceSerializer) }</p> <p>// Prints CustomSomeInterfaceSerializer: println(module.serializer&lt;SomeInterface&gt;()) </code></pre></p> <p>We expect minimal impact from this change, but be aware of it anyway. Implementation details are available in <a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2060">this PR</a>.</p> <p>Due to the <a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/1348">serializer() function being also a compiler intrinsic</a>, code of kotlinx.serialization compiler plugin also accommodates this change in the 2.0 branch. To get a consistent result from both plugin and runtime, kotlinx.serialization compiler plugin should be <strong>at least of 2.0.0-RC1 version.</strong> <strong>To verify so, 1.7.0-RC runtime will be rejected by older plugins.</strong></p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md">org.jetbrains.kotlinx:kotlinx-serialization-json-okio's changelog</a>.</em></p> <blockquote> <h1>1.7.0 / 2024-06-05</h1> <p>This release contains all of the changes from 1.7.0-RC and is compatible with Kotlin 2.0. Please note that for reasons explained in the <a href="https://github.com/Kotlin/kotlinx.serialization/releases/tag/v1.7.0-RC">1.7.0-RC changelog</a>, it may not be possible to use it with the Kotlin 1.9.x compiler plugin. Yet, it is still fully backwards compatible with previous versions.</p> <p>The only difference with 1.7.0-RC is that <code>classDiscriminatorMode</code> property in <code>JsonBuilder</code> is marked as experimental, as it should have been when it was introduced (<a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2680">#2680</a>).</p> <h1>1.7.0-RC / 2024-05-16</h1> <p>This is a release candidate for the next version. It is based on Kotlin 2.0.0-RC3 and is fully compatible with a stable Kotlin 2.0 release. Due to a potential breaking change (see below), it requires a compiler plugin with a version at least of 2.0.0-RC1.</p> <h3>Important change: priority of PolymorphicSerializer for interfaces during call to serializer<!-- raw HTML omitted -->() function</h3> <p>Non-sealed interfaces in kotlinx.serialization are always <a href="https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/polymorphism.md#serializing-interfaces">serializable with a polymorphic serializer</a>, even if they do not have <code>@serializable</code> annotation. This also means that <code>serializersModule.serializer&lt;SomeInterface&gt;()</code> call will return you a serializer capable of polymorphism. This function was written in a way that it unconditionally returns a <code>PolymorphicSerializer</code> if type argument is a non-sealed interface. This caused problems with <code>SerializersModule</code> functionality, because actual module was not taken into consideration, and therefore it was impossible to override serializer for interface using 'contextual serialization' feature. The problem is described in details <a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2060">here</a>. To overcome these problems, we had to change the behavior of this function regarding interfaces. It now looks into <code>SerializersModule</code> first if <code>T</code> is a non-sealed interface, and only if there is no registered contextual serializer for <code>T</code>, it returns a polymorphic serializer.</p> <p>Behavior <strong>before 1.7.0-RC</strong>:</p> <pre lang="kotlin"><code>interface SomeInterface <p>val module = SerializersModule { contextual(SomeInterface::class, CustomSomeInterfaceSerializer) }</p> <p>// Prints PolymorphicSerializer&lt;SomeInterface&gt;: println(module.serializer&lt;SomeInterface&gt;()) </code></pre></p> <p>Behavior <strong>in 1.7.0-RC, 1.7.0, and higher</strong>:</p> <pre lang="kotlin"><code>interface SomeInterface <p>val module = SerializersModule { contextual(SomeInterface::class, CustomSomeInterfaceSerializer) }</p> <p>// Prints CustomSomeInterfaceSerializer: println(module.serializer&lt;SomeInterface&gt;()) &lt;/tr&gt;&lt;/table&gt; </code></pre></p> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/d2dc7d2978bd62971e8ab00de197d59d7e378ed2"><code>d2dc7d2</code></a> Update to Kotlin 2.0 and prepare 1.7.0 release (<a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2706">#2706</a>)</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/1cac162673312984ea2a8084635ec573a836a0bc"><code>1cac162</code></a> Merge remote-tracking branch 'origin/master' into dev</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/fbd07344176647d005aedd7ece6194f97db1efca"><code>fbd0734</code></a> Use <a href="https://github.com/PublishedApi"><code>@​PublishedApi</code></a> annotation on functions called from plugin-generated code (...</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/4bf4113c2c6936e841caf2a8670382e701e7fcc2"><code>4bf4113</code></a> Add bencoding to community-supported formats (<a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2687">#2687</a>)</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/c487e78e31001d0650e988cd6061917706c8c123"><code>c487e78</code></a> JSON: Fix mutable <code>classDiscriminatorMode</code> in config, and mark experimental i...</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/385c97d39d4eb759698cd10e7b46b6372aa24b08"><code>385c97d</code></a> Remove yellow code (<a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2691">#2691</a>)</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/688f64bdbbfa19fd259bf0dfc166181c978c5a6d"><code>688f64b</code></a> Added link to kotlinx-serialization-smile in the formats list (<a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2689">#2689</a>)</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/1f38e2289e4bedc714e6f70fe23927e6041919f9"><code>1f38e22</code></a> Add additional repository</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/dd1b76ee217a42ed3aaca4697b6198f1aaa4cfe2"><code>dd1b76e</code></a> Prepare Changelog and Readme for 1.7.0-RC release</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/b4bf182e9c384e848f588dfe04277e1d79db3d1d"><code>b4bf182</code></a> Raise Require-Kotlin-Version to 2.0.0-RC1</li> <li>Additional commits viewable in <a href="https://github.com/Kotlin/kotlinx.serialization/compare/v1.6.3...v1.7.0">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent c646086 commit 869586b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ kotest = "5.9.1"
44
detekt = "1.23.6"
55
ktlint = "1.1.0"
66
okio = "3.9.0"
7-
serialization = "1.6.3"
7+
serialization = "1.7.0"
88
benchmark = "0.4.11"
99
openapi = "2024.3"
1010
jackson = "2.17.1"

0 commit comments

Comments
 (0)