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.
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...
Remove the @ExperimentalTime annotation from usages of TimeSource (#4046). Thanks, @hfhbd!
Introduce a workaround for an Android bug that caused an occasional NullPointerException when setting the StateFlow value on old Android devices (#3820).
No longer use kotlin.random.Random as part of Dispatchers.Default and Dispatchers.IO initialization (#4051).
Flow.timeout throws the exception with which the channel was closed (#4071).
Small tweaks and documentation fixes.
1.8.1-Beta
Remove the @ExperimentalTime annotation from usages of TimeSource (#4046). Thanks, @hfhbd!
Attempt a workaround for an Android bug that caused an occasional NullPointerException when setting the StateFlow value on old Android devices (#3820).
No longer use kotlin.random.Random as part of Dispatchers.Default and Dispatchers.IO initialization (#4051).
Remove the @ExperimentalTime annotation from usages of TimeSource (#4046). Thanks, @hfhbd!
Introduce a workaround for an Android bug that caused an occasional NullPointerException when setting the StateFlow value on old Android devices (#3820).
No longer use kotlin.random.Random as part of Dispatchers.Default and Dispatchers.IO initialization (#4051).
Flow.timeout throws the exception with which the channel was closed (#4071).
Small tweaks and documentation fixes.
Changelog relative to version 1.8.1-Beta
Flow.timeout throws the exception with which the channel was closed (#4071).
Small documentation fixes.
Version 1.8.1-Beta
Remove the @ExperimentalTime annotation from usages of TimeSource (#4046). Thanks, @hfhbd!
Attempt a workaround for an Android bug that caused an occasional NullPointerException when setting the StateFlow value on old Android devices (#3820).
No longer use kotlin.random.Random as part of Dispatchers.Default and Dispatchers.IO initialization (#4051).
Bumps the dependencies group with 31 updates:
24.0.1
24.1.0
0.5.0
0.8.0
1.20.4-R0.1-SNAPSHOT
1.21-R0.1-SNAPSHOT
1.6.3
1.7.0
1.8.0
1.8.1
2.15.0
2.16.0
2.15.0
2.16.0
2.3.10
2.3.11
2.3.10
2.3.11
2.3.10
2.3.11
2.3.10
2.3.11
2.3.10
2.3.11
2.3.10
2.3.11
2.3.10
2.3.11
2.3.10
2.3.11
2.3.10
2.3.11
2.3.10
2.3.11
2.3.10
2.3.11
2.3.10
2.3.11
2.3.10
2.3.11
1.8.1
1.8.2
9.38-rc3
9.40
1.5.3
1.5.6
0.49.0
0.51.1
0.49.0
0.51.1
0.49.0
0.51.1
0.49.0
0.51.1
1.7
1.7.1
2.2.3
2.3.0
1.9.24
2.0.0
1.9.23
2.0.0
Updates
org.jetbrains:annotations
from 24.0.1 to 24.1.0Release notes
Sourced from org.jetbrains:annotations's releases.
Changelog
Sourced from org.jetbrains:annotations's changelog.
Commits
b41de54
Update README to 24.1.05da8dac
Graduate CheckReturnValue annotation (#94)ac4b67f
Merge pull request #93 from Anton-Vasilev/patch-137ab6c2
Typo "an user" -> "a user"Updates
org.gradle.toolchains.foojay-resolver-convention
from 0.5.0 to 0.8.0Updates
io.papermc.paper:paper-api
from 1.20.4-R0.1-SNAPSHOT to 1.21-R0.1-SNAPSHOTUpdates
org.jetbrains.kotlinx:kotlinx-serialization-json
from 1.6.3 to 1.7.0Release notes
Sourced from org.jetbrains.kotlinx:kotlinx-serialization-json's releases.
... (truncated)
Changelog
Sourced from org.jetbrains.kotlinx:kotlinx-serialization-json's changelog.
... (truncated)
Commits
d2dc7d2
Update to Kotlin 2.0 and prepare 1.7.0 release (#2706)1cac162
Merge remote-tracking branch 'origin/master' into devfbd0734
Use@PublishedApi
annotation on functions called from plugin-generated code (...4bf4113
Add bencoding to community-supported formats (#2687)c487e78
JSON: Fix mutableclassDiscriminatorMode
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 repositorydd1b76e
Prepare Changelog and Readme for 1.7.0-RC releaseb4bf182
Raise Require-Kotlin-Version to 2.0.0-RC1Updates
org.jetbrains.kotlinx:kotlinx-coroutines-core
from 1.8.0 to 1.8.1Release notes
Sourced from org.jetbrains.kotlinx:kotlinx-coroutines-core's releases.
Changelog
Sourced from org.jetbrains.kotlinx:kotlinx-coroutines-core's changelog.
Commits
cd696d3
Version 1.8.1c1ba5af
Fix the ticker channel example giving wrong results on the website (#4109)2430d9a
Fix broken API reference links to the Project Reactor Javadoc (#4111)f22b229
fix the link toThread.uncaughtExceptionHandler
515308d
fix: get rid of horizontal scrolling by splitting the comment and show more c...f8d1821
Fix typo in coroutine-context-and-dispatchers.md (#3941)20707d3
fix: removesampleStart
andsampleEnd
comments from example in coroutine-...0148534
chore: fix identation in example loadContributorsBlocking() (#4085)74774df
Docs: reference to The Hitchhiker's Guide to the Galaxy (#4082)d106ac7
Docs: avoid scrolling sample code; fix test description; add () to functions ...Updates
com.github.shynixn.mccoroutine:mccoroutine-bukkit-api
from 2.15.0 to 2.16.0Release notes
Sourced from com.github.shynixn.mccoroutine:mccoroutine-bukkit-api's releases.
Commits
fea39be
Merge pull request #114 from Shynixn/developmentc120f64
#113 Updated to release version.11805fd
#113 Fixed entity dispatcher.8742c39
Merge branch 'master' into development5d8f8df
#113 Implemented main dispatcher.ca3dd7f
Automatic CI Documentation.Updates
com.github.shynixn.mccoroutine:mccoroutine-bukkit-core
from 2.15.0 to 2.16.0Release notes
Sourced from com.github.shynixn.mccoroutine:mccoroutine-bukkit-core's releases.
Commits
fea39be
Merge pull request #114 from Shynixn/developmentc120f64
#113 Updated to release version.11805fd
#113 Fixed entity dispatcher.8742c39
Merge branch 'master' into development5d8f8df
#113 Implemented main dispatcher.ca3dd7f
Automatic CI Documentation.Updates
com.github.shynixn.mccoroutine:mccoroutine-bukkit-core
from 2.15.0 to 2.16.0Release notes
Sourced from com.github.shynixn.mccoroutine:mccoroutine-bukkit-core's releases.
Commits
fea39be
Merge pull request #114 from Shynixn/developmentc120f64
#113 Updated to release version.11805fd
#113 Fixed entity dispatcher.8742c39
Merge branch 'master' into development5d8f8df
#113 Implemented main dispatcher.ca3dd7f
Automatic CI Documentation.Updates
io.ktor:ktor-server-core
from 2.3.10 to 2.3.11Release notes
Sourced from io.ktor:ktor-server-core's releases.
Changelog
Sourced from io.ktor:ktor-server-core's changelog.
Commits
b5d9213
Add changelog for 2.3.11 (#4027)8ca9632
KTOR-6909 Add SocketTimeout for Test Engine (#4021)Updates
io.ktor:ktor-server-netty
from 2.3.10 to 2.3.11Release notes
Sourced from io.ktor:ktor-server-netty's releases.
Changelog
Sourced from io.ktor:ktor-server-netty's changelog.
Commits
b5d9213
Add changelog for 2.3.11 (#4027)8ca9632
KTOR-6909 Add SocketTimeout for Test Engine (#4021)Updates
io.ktor:ktor-server-content-negotiation
from 2.3.10 to 2.3.11Release notes
Sourced from io.ktor:ktor-server-content-negotiation's releases.
Changelog
Sourced from io.ktor:ktor-server-content-negotiation's changelog.
Commits
b5d9213
Add changelog for 2.3.11 (#4027)8ca9632
KTOR-6909 Add SocketTimeout for Test Engine (#4021)Updates
io.ktor:ktor-serialization-kotlinx-json
from 2.3.10 to 2.3.11Release notes
Sourced from io.ktor:ktor-serialization-kotlinx-json's releases.
Changelog
Sourced from io.ktor:ktor-serialization-kotlinx-json's changelog.
Commits
b5d9213
Add changelog for 2.3.11 (#4027)8ca9632
KTOR-6909 Add SocketTimeout for Test Engine (#4021)Updates
io.ktor:ktor-server-auth
from 2.3.10 to 2.3.11Release notes
Sourced from io.ktor:ktor-server-auth's releases.
Changelog
Sourced from io.ktor:ktor-server-auth's changelog.
Commits
b5d9213
Add changelog for 2.3.11 (#4027)8ca9632
KTOR-6909 Add SocketTimeout for Test Engine (#4021)Updates
io.ktor:ktor-server-auth-jwt
from 2.3.10 to 2.3.11Release notes
Sourced from io.ktor:ktor-server-auth-jwt's releases.
Changelog
Sourced from io.ktor:ktor-server-auth-jwt's changelog.
Commits
b5d9213
Add changelog for 2.3.11 (#4027)8ca9632
KTOR-6909 Add SocketTimeout for Test Engine (#4021)Updates
io.ktor:ktor-network-tls-certificates
from 2.3.10 to 2.3.11Release notes
Sourced from io.ktor:ktor-network-tls-certificates's releases.
Changelog
Sourced from io.ktor:ktor-network-tls-certificates's changelog.
Commits
b5d9213
Add changelog for 2.3.11 (#4027)8ca9632
KTOR-6909 Add SocketTimeout for Test Engine (#4021)Updates
io.ktor:ktor-server-velocity
from 2.3.10 to 2.3.11Release notes
Sourced from io.ktor:ktor-server-velocity's releases.
Changelog
Sourced from io.ktor:ktor-server-velocity's changelog.
Commits
b5d9213
Add changelog for 2.3.11 (#4027)8ca9632
KTOR-6909 Add SocketTimeout for Test Engine (#4021)Updates
io.ktor:ktor-server-openapi
from 2.3.10 to 2.3.11Release notes
Sourced from io.ktor:ktor-server-openapi's releases.
Changelog
Sourced from io.ktor:ktor-server-openapi's changelog.
Commits
b5d9213
Add changelog for 2.3.11 (#4027)8ca9632
KTOR-6909 Add SocketTimeout for Test Engine (#4021)Updates
io.ktor:ktor-client-core
from 2.3.10 to 2.3.11Release notes
Sourced from io.ktor:ktor-client-core's releases.
Changelog
Sourced from io.ktor:ktor-client-core's changelog.
Commits
b5d9213
Add changelog for 2.3.11 (#4027)8ca9632
KTOR-6909 Add SocketTimeout for Test Engine (#4021)Updates
io.ktor:ktor-client-java
from 2.3.10 to 2.3.11Release notes
Sourced from io.ktor:ktor-client-java's releases.
Changelog
Sourced from io.ktor:ktor-client-java's changelog.
Commits
b5d9213
Add changelog for 2.3.11 (#4027)8ca9632
KTOR-6909 Add SocketTimeout for Test Engine (#4021)Updates
io.ktor:ktor-client-logging
from 2.3.10 to 2.3.11Release notes
Sourced from io.ktor:ktor-client-logging's releases.
Changelog
Sourced from io.ktor:ktor-client-logging's changelog.
Commits
b5d9213
Add changelog for 2.3.11 (#4027)8ca9632
KTOR-6909 Add SocketTimeout for Test Engine (#4021)Updates
io.ktor:ktor-client-content-negotiation
from 2.3.10 to 2.3.11Release notes
Sourced from io.ktor:ktor-client-content-negotiation's releases.
Changelog
Sourced from io.ktor:ktor-client-content-negotiation's changelog.
Commits
b5d9213
Add changelog for 2.3.11 (#4027)8ca9632
KTOR-6909 Add SocketTimeout for Test Engine (#4021)Updates
io.ktor:ktor-server-netty
from 2.3.10 to 2.3.11Release notes
Sourced from io.ktor:ktor-server-netty's releases.
Changelog
Sourced from io.ktor:ktor-server-netty's changelog.
Commits
b5d9213
Add changelog for 2.3.11 (#4027)8ca9632
KTOR-6909 Add SocketTimeout for Test Engine (#4021)Updates
io.ktor:ktor-server-content-negotiation
from 2.3.10 to 2.3.11Release notes
Sourced from io.ktor:ktor-server-content-negotiation's releases.
Changelog
Sourced from io.ktor:ktor-server-content-negotiation's changelog.
Commits
b5d9213
Add changelog for 2.3.11 (#4027)8ca9632
KTOR-6909 Add SocketTimeout for Test Engine (#4021)Updates
io.ktor:ktor-serialization-kotlinx-json
from 2.3.10 to 2.3.11Release notes
Sourced from io.ktor:ktor-serialization-kotlinx-json's releases.
Changelog
Sourced from io.ktor:ktor-serialization-kotlinx-json's changelog.
Commits
b5d9213
Add changelog for 2.3.11 (#4027)8ca9632
KTOR-6909 Add SocketTimeout for Test Engine (#4021)Updates
io.ktor:ktor-server-auth
from 2.3.10 to 2.3.11Release notes
Sourced from io.ktor:ktor-server-auth's releases.
Changelog
Sourced from io.ktor:ktor-server-auth's changelog.
Commits
b5d9213
Add changelog for 2.3.11 (#4027)8ca9632
KTOR-6909 Add SocketTimeout for Test Engine (#4021)Updates
io.ktor:ktor-server-auth-jwt
from 2.3.10 to 2.3.11Release notes
Sourced from io.ktor:ktor-server-auth-jwt's releases.
Changelog
Sourced from io.ktor:ktor-server-auth-jwt's changelog.
Commits
b5d9213
Add changelog for 2.3.11 (#4027)8ca9632
KTOR-6909 Add SocketTimeout for Test Engine (#4021)Updates
io.ktor:ktor-network-tls-certificates
from 2.3.10 to 2.3.11Release notes
Sourced from io.ktor:ktor-network-tls-certificates's releases.
Changelog
Sourced from io.ktor:ktor-network-tls-certificates's changelog.
Commits
b5d9213
Add changelog for 2.3.11 (#4027)8ca9632
KTOR-6909 Add SocketTimeout for Test Engine (#4021)Updates
io.ktor:ktor-server-velocity
from 2.3.10 to 2.3.11Release notes
Sourced from io.ktor:ktor-server-velocity's releases.
Changelog
Sourced from io.ktor:ktor-server-velocity's changelog.
Commits
b5d9213
Add changelog for 2.3.11 (#4027)8ca9632
KTOR-6909 Add SocketTimeout for Test Engine (#4021)Updates
io.ktor:ktor-server-openapi
from 2.3.10 to 2.3.11Release notes
Sourced from io.ktor:ktor-server-openapi's releases.
Changelog
Sourced from io.ktor:ktor-server-openapi's changelog.
Commits
b5d9213
Add changelog for 2.3.11 (#4027)8ca9632
KTOR-6909 Add SocketTimeout for Test Engine (#4021)Updates
io.ktor:ktor-client-core
from 2.3.10 to 2.3.11Release notes
Sourced from io.ktor:ktor-client-core's releases.
Changelog
Sourced from io.ktor:ktor-client-core's changelog.
Commits
b5d9213
Add changelog for 2.3.11 (#4027)8ca9632
KTOR-6909 Add SocketTimeout for Test Engine (#4021)Updates
io.ktor:ktor-client-java
from 2.3.10 to 2.3.11Release notes
Sourced from io.ktor:ktor-client-java's releases.
Changelog
Sourced from io.ktor:ktor-client-java's changelog.
Commits
b5d9213
Add changelog for 2.3.11 (#4027)8ca9632
KTOR-6909 Add SocketTimeout for Test Engine (#4021)Updates
io.ktor:ktor-client-logging
from 2.3.10 to 2.3.11Release notes
Sourced from io.ktor:ktor-client-logging's releases.
Changelog
Sourced from io.ktor:ktor-client-logging's changelog.
Commits
b5d9213
Add changelog for 2.3.11 (