Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump the maven-dependencies group with 6 updates #340

Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jun 16, 2024

Bumps the maven-dependencies group with 6 updates:

Package From To
org.jetbrains.kotlinx:kotlinx-serialization-core 1.6.3 1.7.0
org.jetbrains.kotlinx:kotlinx-serialization-json 1.6.3 1.7.0
org.jetbrains.kotlinx:kotlinx-serialization-cbor 1.6.3 1.7.0
org.jetbrains.kotlinx:kotlinx-serialization-protobuf 1.6.3 1.7.0
org.apache.maven.plugins:maven-surefire-plugin 3.2.5 3.3.0
io.projectreactor:reactor-core 3.6.6 3.6.7

Updates org.jetbrains.kotlinx:kotlinx-serialization-core from 1.6.3 to 1.7.0

Release notes

Sourced from org.jetbrains.kotlinx:kotlinx-serialization-core's releases.

1.7.0

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 1.7.0-RC changelog, 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.

The only difference with 1.7.0-RC is that the classDiscriminatorMode property in JsonBuilder is marked as experimental, as it should have been when it was introduced (#2680).

1.7.0-RC

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.

Important change: priority of PolymorphicSerializer for interfaces during call to serializer() function

Non-sealed interfaces in kotlinx.serialization are always serializable with a polymorphic serializer, even if they do not have @Serializable annotation. This also means that serializersModule.serializer<SomeInterface>() call will return you a serializer capable of polymorphism. This function was written in a way that it unconditionally returns a PolymorphicSerializer if type argument is a non-sealed interface. This caused problems with SerializersModule 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 here. To overcome these problems, we had to change the behavior of this function regarding interfaces. It now looks into SerializersModule first if T is a non-sealed interface, and only if there is no registered contextual serializer for T, it returns a polymorphic serializer.

Behavior before 1.7.0-RC:

interface SomeInterface
val module = SerializersModule {
contextual(SomeInterface::class, CustomSomeInterfaceSerializer)
}
// Prints PolymorphicSerializer<SomeInterface>:
println(module.serializer<SomeInterface>())

Behavior in 1.7.0-RC, 1.7.0, and higher:

interface SomeInterface
val module = SerializersModule {
contextual(SomeInterface::class, CustomSomeInterfaceSerializer)
}
// Prints CustomSomeInterfaceSerializer:
println(module.serializer<SomeInterface>())

We expect minimal impact from this change, but be aware of it anyway. Implementation details are available in this PR.

Due to the serializer() function being also a compiler intrinsic, 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 at least of 2.0.0-RC1 version. To verify so, 1.7.0-RC runtime will be rejected by older plugins.

... (truncated)

Changelog

Sourced from org.jetbrains.kotlinx:kotlinx-serialization-core's changelog.

1.7.0 / 2024-06-05

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 1.7.0-RC changelog, 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.

The only difference with 1.7.0-RC is that classDiscriminatorMode property in JsonBuilder is marked as experimental, as it should have been when it was introduced (#2680).

1.7.0-RC / 2024-05-16

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.

Important change: priority of PolymorphicSerializer for interfaces during call to serializer() function

Non-sealed interfaces in kotlinx.serialization are always serializable with a polymorphic serializer, even if they do not have @Serializable annotation. This also means that serializersModule.serializer<SomeInterface>() call will return you a serializer capable of polymorphism. This function was written in a way that it unconditionally returns a PolymorphicSerializer if type argument is a non-sealed interface. This caused problems with SerializersModule 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 here. To overcome these problems, we had to change the behavior of this function regarding interfaces. It now looks into SerializersModule first if T is a non-sealed interface, and only if there is no registered contextual serializer for T, it returns a polymorphic serializer.

Behavior before 1.7.0-RC:

interface SomeInterface
val module = SerializersModule {
contextual(SomeInterface::class, CustomSomeInterfaceSerializer)
}
// Prints PolymorphicSerializer<SomeInterface>:
println(module.serializer<SomeInterface>())

Behavior in 1.7.0-RC, 1.7.0, and higher:

interface SomeInterface
val module = SerializersModule {
contextual(SomeInterface::class, CustomSomeInterfaceSerializer)
}
// Prints CustomSomeInterfaceSerializer:
println(module.serializer<SomeInterface>())
</tr></table>

... (truncated)

Commits
  • d2dc7d2 Update to Kotlin 2.0 and prepare 1.7.0 release (#2706)
  • 1cac162 Merge remote-tracking branch 'origin/master' into dev
  • fbd0734 Use @​PublishedApi annotation on functions called from plugin-generated code (...
  • 4bf4113 Add bencoding to community-supported formats (#2687)
  • c487e78 JSON: Fix mutable classDiscriminatorMode in config, and mark experimental i...
  • 385c97d Remove yellow code (#2691)
  • 688f64b Added link to kotlinx-serialization-smile in the formats list (#2689)
  • 1f38e22 Add additional repository
  • dd1b76e Prepare Changelog and Readme for 1.7.0-RC release
  • b4bf182 Raise Require-Kotlin-Version to 2.0.0-RC1
  • Additional commits viewable in compare view

Updates org.jetbrains.kotlinx:kotlinx-serialization-json from 1.6.3 to 1.7.0

Release notes

Sourced from org.jetbrains.kotlinx:kotlinx-serialization-json's releases.

1.7.0

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 1.7.0-RC changelog, 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.

The only difference with 1.7.0-RC is that the classDiscriminatorMode property in JsonBuilder is marked as experimental, as it should have been when it was introduced (#2680).

1.7.0-RC

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.

Important change: priority of PolymorphicSerializer for interfaces during call to serializer() function

Non-sealed interfaces in kotlinx.serialization are always serializable with a polymorphic serializer, even if they do not have @Serializable annotation. This also means that serializersModule.serializer<SomeInterface>() call will return you a serializer capable of polymorphism. This function was written in a way that it unconditionally returns a PolymorphicSerializer if type argument is a non-sealed interface. This caused problems with SerializersModule 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 here. To overcome these problems, we had to change the behavior of this function regarding interfaces. It now looks into SerializersModule first if T is a non-sealed interface, and only if there is no registered contextual serializer for T, it returns a polymorphic serializer.

Behavior before 1.7.0-RC:

interface SomeInterface
val module = SerializersModule {
contextual(SomeInterface::class, CustomSomeInterfaceSerializer)
}
// Prints PolymorphicSerializer<SomeInterface>:
println(module.serializer<SomeInterface>())

Behavior in 1.7.0-RC, 1.7.0, and higher:

interface SomeInterface
val module = SerializersModule {
contextual(SomeInterface::class, CustomSomeInterfaceSerializer)
}
// Prints CustomSomeInterfaceSerializer:
println(module.serializer<SomeInterface>())

We expect minimal impact from this change, but be aware of it anyway. Implementation details are available in this PR.

Due to the serializer() function being also a compiler intrinsic, 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 at least of 2.0.0-RC1 version. To verify so, 1.7.0-RC runtime will be rejected by older plugins.

... (truncated)

Changelog

Sourced from org.jetbrains.kotlinx:kotlinx-serialization-json's changelog.

1.7.0 / 2024-06-05

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 1.7.0-RC changelog, 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.

The only difference with 1.7.0-RC is that classDiscriminatorMode property in JsonBuilder is marked as experimental, as it should have been when it was introduced (#2680).

1.7.0-RC / 2024-05-16

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.

Important change: priority of PolymorphicSerializer for interfaces during call to serializer() function

Non-sealed interfaces in kotlinx.serialization are always serializable with a polymorphic serializer, even if they do not have @Serializable annotation. This also means that serializersModule.serializer<SomeInterface>() call will return you a serializer capable of polymorphism. This function was written in a way that it unconditionally returns a PolymorphicSerializer if type argument is a non-sealed interface. This caused problems with SerializersModule 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 here. To overcome these problems, we had to change the behavior of this function regarding interfaces. It now looks into SerializersModule first if T is a non-sealed interface, and only if there is no registered contextual serializer for T, it returns a polymorphic serializer.

Behavior before 1.7.0-RC:

interface SomeInterface
val module = SerializersModule {
contextual(SomeInterface::class, CustomSomeInterfaceSerializer)
}
// Prints PolymorphicSerializer<SomeInterface>:
println(module.serializer<SomeInterface>())

Behavior in 1.7.0-RC, 1.7.0, and higher:

interface SomeInterface
val module = SerializersModule {
contextual(SomeInterface::class, CustomSomeInterfaceSerializer)
}
// Prints CustomSomeInterfaceSerializer:
println(module.serializer<SomeInterface>())
</tr></table>

... (truncated)

Commits
  • d2dc7d2 Update to Kotlin 2.0 and prepare 1.7.0 release (#2706)
  • 1cac162 Merge remote-tracking branch 'origin/master' into dev
  • fbd0734 Use @​PublishedApi annotation on functions called from plugin-generated code (...
  • 4bf4113 Add bencoding to community-supported formats (#2687)
  • c487e78 JSON: Fix mutable classDiscriminatorMode in config, and mark experimental i...
  • 385c97d Remove yellow code (#2691)
  • 688f64b Added link to kotlinx-serialization-smile in the formats list (#2689)
  • 1f38e22 Add additional repository
  • dd1b76e Prepare Changelog and Readme for 1.7.0-RC release
  • b4bf182 Raise Require-Kotlin-Version to 2.0.0-RC1
  • Additional commits viewable in compare view

Updates org.jetbrains.kotlinx:kotlinx-serialization-cbor from 1.6.3 to 1.7.0

Release notes

Sourced from org.jetbrains.kotlinx:kotlinx-serialization-cbor's releases.

1.7.0

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 1.7.0-RC changelog, 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.

The only difference with 1.7.0-RC is that the classDiscriminatorMode property in JsonBuilder is marked as experimental, as it should have been when it was introduced (#2680).

1.7.0-RC

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.

Important change: priority of PolymorphicSerializer for interfaces during call to serializer() function

Non-sealed interfaces in kotlinx.serialization are always serializable with a polymorphic serializer, even if they do not have @Serializable annotation. This also means that serializersModule.serializer<SomeInterface>() call will return you a serializer capable of polymorphism. This function was written in a way that it unconditionally returns a PolymorphicSerializer if type argument is a non-sealed interface. This caused problems with SerializersModule 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 here. To overcome these problems, we had to change the behavior of this function regarding interfaces. It now looks into SerializersModule first if T is a non-sealed interface, and only if there is no registered contextual serializer for T, it returns a polymorphic serializer.

Behavior before 1.7.0-RC:

interface SomeInterface
val module = SerializersModule {
contextual(SomeInterface::class, CustomSomeInterfaceSerializer)
}
// Prints PolymorphicSerializer<SomeInterface>:
println(module.serializer<SomeInterface>())

Behavior in 1.7.0-RC, 1.7.0, and higher:

interface SomeInterface
val module = SerializersModule {
contextual(SomeInterface::class, CustomSomeInterfaceSerializer)
}
// Prints CustomSomeInterfaceSerializer:
println(module.serializer<SomeInterface>())

We expect minimal impact from this change, but be aware of it anyway. Implementation details are available in this PR.

Due to the serializer() function being also a compiler intrinsic, 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 at least of 2.0.0-RC1 version. To verify so, 1.7.0-RC runtime will be rejected by older plugins.

... (truncated)

Changelog

Sourced from org.jetbrains.kotlinx:kotlinx-serialization-cbor's changelog.

1.7.0 / 2024-06-05

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 1.7.0-RC changelog, 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.

The only difference with 1.7.0-RC is that classDiscriminatorMode property in JsonBuilder is marked as experimental, as it should have been when it was introduced (#2680).

1.7.0-RC / 2024-05-16

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.

Important change: priority of PolymorphicSerializer for interfaces during call to serializer() function

Non-sealed interfaces in kotlinx.serialization are always serializable with a polymorphic serializer, even if they do not have @Serializable annotation. This also means that serializersModule.serializer<SomeInterface>() call will return you a serializer capable of polymorphism. This function was written in a way that it unconditionally returns a PolymorphicSerializer if type argument is a non-sealed interface. This caused problems with SerializersModule 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 here. To overcome these problems, we had to change the behavior of this function regarding interfaces. It now looks into SerializersModule first if T is a non-sealed interface, and only if there is no registered contextual serializer for T, it returns a polymorphic serializer.

Behavior before 1.7.0-RC:

interface SomeInterface
val module = SerializersModule {
contextual(SomeInterface::class, CustomSomeInterfaceSerializer)
}
// Prints PolymorphicSerializer<SomeInterface>:
println(module.serializer<SomeInterface>())

Behavior in 1.7.0-RC, 1.7.0, and higher:

interface SomeInterface
val module = SerializersModule {
contextual(SomeInterface::class, CustomSomeInterfaceSerializer)
}
// Prints CustomSomeInterfaceSerializer:
println(module.serializer<SomeInterface>())
</tr></table>

... (truncated)

Commits
  • d2dc7d2 Update to Kotlin 2.0 and prepare 1.7.0 release (#2706)
  • 1cac162 Merge remote-tracking branch 'origin/master' into dev
  • fbd0734 Use @​PublishedApi annotation on functions called from plugin-generated code (...
  • 4bf4113 Add bencoding to community-supported formats (#2687)
  • c487e78 JSON: Fix mutable classDiscriminatorMode in config, and mark experimental i...
  • 385c97d Remove yellow code (#2691)
  • 688f64b Added link to kotlinx-serialization-smile in the formats list (#2689)
  • 1f38e22 Add additional repository
  • dd1b76e Prepare Changelog and Readme for 1.7.0-RC release
  • b4bf182 Raise Require-Kotlin-Version to 2.0.0-RC1
  • Additional commits viewable in compare view

Updates org.jetbrains.kotlinx:kotlinx-serialization-protobuf from 1.6.3 to 1.7.0

Release notes

Sourced from org.jetbrains.kotlinx:kotlinx-serialization-protobuf's releases.

1.7.0

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 1.7.0-RC changelog, 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.

The only difference with 1.7.0-RC is that the classDiscriminatorMode property in JsonBuilder is marked as experimental, as it should have been when it was introduced (#2680).

1.7.0-RC

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.

Important change: priority of PolymorphicSerializer for interfaces during call to serializer() function

Non-sealed interfaces in kotlinx.serialization are always serializable with a polymorphic serializer, even if they do not have @Serializable annotation. This also means that serializersModule.serializer<SomeInterface>() call will return you a serializer capable of polymorphism. This function was written in a way that it unconditionally returns a PolymorphicSerializer if type argument is a non-sealed interface. This caused problems with SerializersModule 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 here. To overcome these problems, we had to change the behavior of this function regarding interfaces. It now looks into SerializersModule first if T is a non-sealed interface, and only if there is no registered contextual serializer for T, it returns a polymorphic serializer.

Behavior before 1.7.0-RC:

interface SomeInterface
val module = SerializersModule {
contextual(SomeInterface::class, CustomSomeInterfaceSerializer)
}
// Prints PolymorphicSerializer<SomeInterface>:
println(module.serializer<SomeInterface>())

Behavior in 1.7.0-RC, 1.7.0, and higher:

interface SomeInterface
val module = SerializersModule {
contextual(SomeInterface::class, CustomSomeInterfaceSerializer)
}
// Prints CustomSomeInterfaceSerializer:
println(module.serializer<SomeInterface>())

We expect minimal impact from this change, but be aware of it anyway. Implementation details are available in this PR.

Due to the serializer() function being also a compiler intrinsic, 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 at least of 2.0.0-RC1 version. To verify so, 1.7.0-RC runtime will be rejected by older plugins.

... (truncated)

Changelog

Sourced from org.jetbrains.kotlinx:kotlinx-serialization-protobuf's changelog.

1.7.0 / 2024-06-05

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 1.7.0-RC changelog, 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.

The only difference with 1.7.0-RC is that classDiscriminatorMode property in JsonBuilder is marked as experimental, as it should have been when it was introduced (#2680).

1.7.0-RC / 2024-05-16

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.

Important change: priority of PolymorphicSerializer for interfaces during call to serializer() function

Non-sealed interfaces in kotlinx.serialization are always serializable with a polymorphic serializer, even if they do not have @Serializable annotation. This also means that serializersModule.serializer<SomeInterface>() call will return you a serializer capable of polymorphism. This function was written in a way that it unconditionally returns a PolymorphicSerializer if type argument is a non-sealed interface. This caused problems with SerializersModule 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 here. To overcome these problems, we had to change the behavior of this function regarding interfaces. It now looks into SerializersModule first if T is a non-sealed interface, and only if there is no registered contextual serializer for T, it returns a polymorphic serializer.

Behavior before 1.7.0-RC:

interface SomeInterface
val module = SerializersModule {
contextual(SomeInterface::class, CustomSomeInterfaceSerializer)
}
// Prints PolymorphicSerializer<SomeInterface>:
println(module.serializer<SomeInterface>())

Behavior in 1.7.0-RC, 1.7.0, and higher:

interface SomeInterface
val module = SerializersModule {
contextual(SomeInterface::class, CustomSomeInterfaceSerializer)
}
// Prints CustomSomeInterfaceSerializer:
println(module.serializer<SomeInterface>())
</tr></table>

... (truncated)

Commits
  • d2dc7d2 Update to Kotlin 2.0 and prepare 1.7.0 release (#2706)
  • 1cac162 Merge remote-tracking branch 'origin/master' into dev
  • fbd0734 Use @​PublishedApi annotation on functions called from plugin-generated code (...
  • 4bf4113 Add bencoding to community-supported formats (#2687)
  • c487e78 JSON: Fix mutable classDiscriminatorMode in config, and mark experimental i...
  • 385c97d Remove yellow code (#2691)
  • 688f64b Added link to kotlinx-serialization-smile in the formats list (#2689)
  • 1f38e22 Add additional repository
  • dd1b76e Prepare Changelog and Readme for 1.7.0-RC release
  • b4bf182 Raise Require-Kotlin-Version to 2.0.0-RC1
  • Additional commits viewable in compare view

Updates org.jetbrains.kotlinx:kotlinx-serialization-json from 1.6.3 to 1.7.0

Release notes

Sourced from org.jetbrains.kotlinx:kotlinx-serialization-json's releases.

1.7.0

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 1.7.0-RC changelog, 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.

The only difference with 1.7.0-RC is that the classDiscriminatorMode property in JsonBuilder is marked as experimental, as it should have been when it was introduced (#2680).

1.7.0-RC

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.

Important change: priority of PolymorphicSerializer for interfaces during call to serializer() function

Non-sealed interfaces in kotlinx.serialization are always serializable with a polymorphic serializer, even if they do not have @Serializable annotation. This also means that serializersModule.serializer<SomeInterface>() call will return you a serializer capable of polymorphism. This function was written in a way that it unconditionally returns a PolymorphicSerializer if type argument is a non-sealed interface. This caused problems with SerializersModule 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 here. To overcome these problems, we had to change the behavior of this function regarding interfaces. It now looks into SerializersModule first if T is a non-sealed interface, and only if there is no registered contextual serializer for T, it returns a polymorphic serializer.

Behavior before 1.7.0-RC:

interface SomeInterface
val module = SerializersModule {
contextual(SomeInterface::class, CustomSomeInterfaceSerializer)
}
// Prints PolymorphicSerializer<SomeInterface>:
println(module.serializer<SomeInterface>())

Behavior in 1.7.0-RC, 1.7.0, and higher:

interface SomeInterface
val module = SerializersModule {
contextual(SomeInterface::class, CustomSomeInterfaceSerializer)
}
// Prints CustomSomeInterfaceSerializer:
println(module.serializer<SomeInterface>())

We expect minimal impact from this change, but be aware of it anyway. Implementation details are available in this PR.

Due to the serializer() function being also a compiler intrinsic, 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 at least of 2.0.0-RC1 version. To verify so, 1.7.0-RC runtime will be rejected by older plugins.

... (truncated)

Changelog

Sourced from org.jetbrains.kotlinx:kotlinx-serialization-json's changelog.

1.7.0 / 2024-06-05

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 1.7.0-RC changelog, 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.

The only difference with 1.7.0-RC is that classDiscriminatorMode property in JsonBuilder is marked as experimental, as it should have been when it was introduced (#2680).

1.7.0-RC / 2024-05-16

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.

Important change: priority of PolymorphicSerializer for interfaces during call to serializer() function

Non-sealed interfaces in kotlinx.serialization are always serializable with a polymorphic serializer, even if they do not have @Serializable annotation. This also means that serializersModule.serializer<SomeInterface>() call will return you a serializer capable of polymorphism. This function was written in a way that it unconditionally returns a PolymorphicSerializer if type argument is a non-sealed interface. This caused problems with SerializersModule 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 here. To overcome these problems, we had to change the behavior of this function regarding interfaces. It now looks into SerializersModule first if T is a non-sealed interface, and only if there is no registered contextual serializer for T, it returns a polymorphic serializer.

Behavior before 1.7.0-RC:

interface SomeInterface
val module = SerializersModule {
contextual(SomeInterface::class, CustomSomeInterfaceSerializer)
}
// Prints PolymorphicSerializer<SomeInterface>:
println(module.serializer<SomeInterface>())

Behavior in 1.7.0-RC, 1.7.0, and higher:

interface SomeInterface
val module = SerializersModule {
contextual(SomeInterface::class, CustomSomeInterfaceSerializer)
}
// Prints CustomSomeInterfaceSerializer:
println(module.serializer<SomeInterface>())
</tr></table>

... (truncated)

Commits
  • d2dc7d2 Update to Kotlin 2.0 and prepare 1.7.0 release (#2706)
  • 1cac162 Merge remote-tracking branch 'origin/master' into dev
  • fbd0734 Use @​PublishedApi annotation on functions called from plugin-generated code (...
  • 4bf4113 Add bencoding to community-supported formats (#2687)
  • c487e78 JSON: Fix mutable classDiscriminatorMode in config, and mark experimental i...
  • 385c97d Remove yellow code (#2691)
  • 688f64b Added link to kotlinx-serialization-smile in the formats list (#2689)
  • 1f38e22 Add additional repository
  • dd1b76e Prepare Changelog and Readme for 1.7.0-RC release
  • b4bf182 Raise Require-Kotlin-Version to 2.0.0-RC1
  • Additional commits viewable in compare view

Updates org.jetbrains.kotlinx:kotlinx-serialization-cbor from 1.6.3 to 1.7.0

Release notes

Sourced from org.jetbrains.kotlinx:kotlinx-serialization-cbor's releases.

1.7.0

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 1.7.0-RC changelog, 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.

The only difference with 1.7.0-RC is that the classDiscriminatorMode property in JsonBuilder is marked as experimental, as it should have been when it was introduced (#2680).

1.7.0-RC

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.

Important change: priority of PolymorphicSerializer for interfaces during call to serializer() function

Non-sealed interfaces in kotlinx.serialization are always serializable with a polymorphic serializer, even if they do not have @Serializable annotation. This also means that serializersModule.serializer<SomeInterface>() call will return you a serializer capable of polymorphism. This function was written in a way that it unconditionally returns a PolymorphicSerializer if type argument is a non-sealed interface. This caused problems with SerializersModule 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 here. To overcome these problems, we had to change the behavior of this function regarding interfaces. It now looks into SerializersModule first if T is a non-sealed interface, and only if there is no registered contextual serializer for T, it returns a polymorphic serializer.

Behavior before 1.7.0-RC:

interface SomeInterface
val module = SerializersModule {
contextual(SomeInterface::class, CustomSomeInterfaceSerializer)
}
// Prints PolymorphicSerializer<SomeInterface>:
println(module.serializer<SomeInterface>())

Behavior in 1.7.0-RC, 1.7.0, and higher:

interface SomeInterface
val module = SerializersModule {
contextual(SomeInterface::class, CustomSomeInterfaceSerializer)
}
// Prints CustomSomeInterfaceSerializer:
println(module.serializer<SomeInterface>())

We expect minimal impact from this change, but be aware of it anyway. Implementation details are available in this PR.

Due to the serializer() function being also a compiler intrinsic, 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 at least of 2.0.0-RC1 version. To verify so, 1.7.0-RC runtime will be rejected by older plugins.

... (truncated)

Changelog

Sourced from org.jetbrains.kotlinx:kotlinx-serialization-cbor's changelog.

1.7.0 / 2024-06-05

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 1.7.0-RC changelog, 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.

The only difference with 1.7.0-RC is that classDiscriminatorMode property in JsonBuilder is marked as experimental, as it should have been when it was introduced (#2680).

1.7.0-RC / 2024-05-16

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.

Important change: priority of PolymorphicSerializer for interfaces during call to serializer() function

Non-sealed interfaces in kotlinx.serialization are always serializable with a polymorphic serializer, even if they do not have @Serializable annotation. This also means that serializersModule.serializer<SomeInterface>() call will return you a serializer capable of polymorphism. This function was written in a way that it unconditionally returns a PolymorphicSerializer if type argument is a non-sealed interface. This caused problems with SerializersModule 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 here. To overcome these problems, we had to change the behavior of this function regarding interfaces. It now looks into SerializersModule first if T is a non-sealed interface, and only if there is no registered contextual serializer for T, it returns a polymorphic serializer.

Behavior before 1.7.0-RC:

interface SomeInterface
val module = SerializersModule {
contextual(SomeInterface::class, CustomSomeInterfaceSerializer)
}
// Prints PolymorphicSerializer<SomeInterface>:
println(module.serializer<SomeInterface>())

Behavior in 1.7.0-RC, 1.7.0, and higher:

interface SomeInterface
val module = SerializersModule {
contextual(SomeInterface::class, CustomSomeInterfaceSerializer)
}
// Prints CustomSomeInterfaceSerializer:
println(module.serializer<SomeInterface>())
</tr></table>

... (truncated)

Commits
  • d2dc7d2 Update to Kotlin 2.0 and prepare 1.7.0 release (#2706)
  • 1cac162 Merge remote-tracking branch 'origin/master' into dev
  • fbd0734 Use @​PublishedApi annotation on functions called from plugin-generated code (...
  • 4bf4113 Add bencoding to community-supported formats (#2687)
  • c487e78 JSON: Fix mutable classDiscriminatorMode in config, and mark experimental i...
  • 385c97d Remove yellow code (#2691)
  • 688f64b Added link to kotlinx-serialization-smile in the formats list (#2689)
  • 1f38e22 Add additional repository
  • dd1b76e Prepare Changelog and Readme for 1.7.0-RC release
  • b4bf182 Raise Require-Kotlin-Version to 2.0.0-RC1
  • Additional commits viewable in compare view

Updates org.jetbrains.kotlinx:kotlinx-serialization-protobuf from 1.6.3 to 1.7.0

Release notes

Sourced from org.jetbrains.kotlinx:kotlinx-serialization-protobuf's releases.

1.7.0

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 1.7.0-RC changelog, 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.

The only difference with 1.7.0-RC is that the classDiscriminatorMode property in JsonBuilder is marked as experimental, as it should have been when it was introduced (#2680).

1.7.0-RC

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.

Important change: priority of PolymorphicSerializer for interfaces during call to serializer() function

Non-sealed interfaces in kotlinx.serialization are always serializable with a polymorphic serializer, even if they do not have @Serializable annotation. This also means that serializersModule.serializer<SomeInterface>() call will return you a serializer capable of polymorphism. This function was written in a way that it unconditionally returns a PolymorphicSerializer if type argument is a non-sealed interface. This caused problems with SerializersModule 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 here. To overcome these problems, we had to change the behavior of this function regarding interfaces. It now looks into SerializersModule first if T is a non-sealed interface, and only if there is no registered contextual serializer for T, it returns a polymorphic serializer.

Behavior before 1.7.0-RC:

interface SomeInterface
val module = SerializersModule {
contextual(SomeInterface::class, CustomSomeInterfaceSerializer)
}
// Prints PolymorphicSerializer<SomeInterface>:
println(module.serializer<SomeInterface>())

Behavior in 1.7.0-RC, 1.7.0, and higher:

interface SomeInterface
val module = SerializersModule {
contextual(SomeInterface::class, CustomSomeInterfaceSerializer)
}
// Prints CustomSomeInterfaceSerializer:
println(module.serializer<SomeInterface>())

We expect minimal impact from this change, but be aware of it anyway. Implementation details are available in this PR.

Due to the serializer() function being also a compiler intrinsic, 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 at least of 2.0.0-RC1 version. To verify so, 1.7.0-RC runtime will be rejected by older plugins.

... (truncated)

Changelog

Sourced from org.jetbrains.kotlinx:kotlinx-serialization-protobuf's changelog.

1.7.0 / 2024-06-05

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 1.7.0-RC changelog, it may not be possible to us...

Description has been truncated

Bumps the maven-dependencies group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [org.jetbrains.kotlinx:kotlinx-serialization-core](https://github.com/Kotlin/kotlinx.serialization) | `1.6.3` | `1.7.0` |
| [org.jetbrains.kotlinx:kotlinx-serialization-json](https://github.com/Kotlin/kotlinx.serialization) | `1.6.3` | `1.7.0` |
| [org.jetbrains.kotlinx:kotlinx-serialization-cbor](https://github.com/Kotlin/kotlinx.serialization) | `1.6.3` | `1.7.0` |
| [org.jetbrains.kotlinx:kotlinx-serialization-protobuf](https://github.com/Kotlin/kotlinx.serialization) | `1.6.3` | `1.7.0` |
| [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) | `3.2.5` | `3.3.0` |
| [io.projectreactor:reactor-core](https://github.com/reactor/reactor-core) | `3.6.6` | `3.6.7` |


Updates `org.jetbrains.kotlinx:kotlinx-serialization-core` from 1.6.3 to 1.7.0
- [Release notes](https://github.com/Kotlin/kotlinx.serialization/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md)
- [Commits](Kotlin/kotlinx.serialization@v1.6.3...v1.7.0)

Updates `org.jetbrains.kotlinx:kotlinx-serialization-json` from 1.6.3 to 1.7.0
- [Release notes](https://github.com/Kotlin/kotlinx.serialization/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md)
- [Commits](Kotlin/kotlinx.serialization@v1.6.3...v1.7.0)

Updates `org.jetbrains.kotlinx:kotlinx-serialization-cbor` from 1.6.3 to 1.7.0
- [Release notes](https://github.com/Kotlin/kotlinx.serialization/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md)
- [Commits](Kotlin/kotlinx.serialization@v1.6.3...v1.7.0)

Updates `org.jetbrains.kotlinx:kotlinx-serialization-protobuf` from 1.6.3 to 1.7.0
- [Release notes](https://github.com/Kotlin/kotlinx.serialization/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md)
- [Commits](Kotlin/kotlinx.serialization@v1.6.3...v1.7.0)

Updates `org.jetbrains.kotlinx:kotlinx-serialization-json` from 1.6.3 to 1.7.0
- [Release notes](https://github.com/Kotlin/kotlinx.serialization/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md)
- [Commits](Kotlin/kotlinx.serialization@v1.6.3...v1.7.0)

Updates `org.jetbrains.kotlinx:kotlinx-serialization-cbor` from 1.6.3 to 1.7.0
- [Release notes](https://github.com/Kotlin/kotlinx.serialization/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md)
- [Commits](Kotlin/kotlinx.serialization@v1.6.3...v1.7.0)

Updates `org.jetbrains.kotlinx:kotlinx-serialization-protobuf` from 1.6.3 to 1.7.0
- [Release notes](https://github.com/Kotlin/kotlinx.serialization/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md)
- [Commits](Kotlin/kotlinx.serialization@v1.6.3...v1.7.0)

Updates `org.apache.maven.plugins:maven-surefire-plugin` from 3.2.5 to 3.3.0
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](apache/maven-surefire@surefire-3.2.5...surefire-3.3.0)

Updates `io.projectreactor:reactor-core` from 3.6.6 to 3.6.7
- [Release notes](https://github.com/reactor/reactor-core/releases)
- [Commits](reactor/reactor-core@v3.6.6...v3.6.7)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-serialization-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: maven-dependencies
- dependency-name: org.jetbrains.kotlinx:kotlinx-serialization-json
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: maven-dependencies
- dependency-name: org.jetbrains.kotlinx:kotlinx-serialization-cbor
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: maven-dependencies
- dependency-name: org.jetbrains.kotlinx:kotlinx-serialization-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: maven-dependencies
- dependency-name: org.jetbrains.kotlinx:kotlinx-serialization-json
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: maven-dependencies
- dependency-name: org.jetbrains.kotlinx:kotlinx-serialization-cbor
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: maven-dependencies
- dependency-name: org.jetbrains.kotlinx:kotlinx-serialization-protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: maven-dependencies
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: maven-dependencies
- dependency-name: io.projectreactor:reactor-core
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: maven-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot requested review from sandjelkovic, a team, gklijs, CodeDrivenMitch and smcvb and removed request for a team June 16, 2024 23:05
@dependabot dependabot bot added this to the Release 4.10.0 milestone Jun 16, 2024
@github-actions github-actions bot merged commit 3485661 into master Jun 16, 2024
5 of 8 checks passed
@dependabot dependabot bot deleted the dependabot/maven/maven-dependencies-a2dddda7c3 branch June 16, 2024 23:05
smcvb added a commit that referenced this pull request Jul 23, 2024
Revert Kotlin Serialization to 1.6.3 for backwards compatibility

#340
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants