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

Annotating property type with @Serializable does not override default serialzer #1895

Closed
lukellmann opened this issue Apr 5, 2022 · 8 comments

Comments

@lukellmann
Copy link
Contributor

Describe the bug

The default serializer of a serializable class can be overwritten by annotating the property that should be serialized with SomeOtherSerializer with @Serializable(with = SomeOtherSerializer::class).

Since the Serializable annotation has the targets PROPERTY, CLASS and TYPE, I expected that this should also work when annotating the type of the property instead of the property itself.

However it seems like this is only true for classes that are not serializable by default and always require specifying a serializer.

The reason I want to annotate the type instead of the property is for using typealiases with it. The project that I want to use this for needs to serialize Instants in different formats and to reduce repetition and improve readability I wanted to replace

@Serializable
data class Data(
    @Serializable(with = InstantInEpochSecondsSerializer::class)
    val instant: Instant
)

with

typealias InstantInEpochSeconds = @Serializable(with = InstantInEpochSecondsSerializer::class) Instant

@Serializable
data class Data(val instant: InstantInEpochSeconds)

To Reproduce

The issue can be reproduced by the following code (requiring kotlinx-datetime as a dependency for the Instant class)

// the Instant class is annotated with @Serializable(with = InstantIso8601Serializer::class)

@Serializable
data class InstantDefault(val instant: Instant)

@Serializable
data class InstantProperty(
    @Serializable(with = InstantInEpochSecondsSerializer::class)
    val instant: Instant,
)

@Serializable
data class InstantType(
    val instant: @Serializable(with = InstantInEpochSecondsSerializer::class) Instant,
)


// the Duration class is not annotated with @Serializable

@Serializable
data class DurationProperty(
    @Serializable(with = DurationInSecondsSerializer::class)
    val duration: Duration,
)

@Serializable
data class DurationType(
    val duration: @Serializable(with = DurationInSecondsSerializer::class) Duration,
)


inline fun <reified T> printJson(value: T) = println(Json.encodeToString(value))

fun main() {
    val instant = Instant.fromEpochSeconds(10)
    val duration = 10.seconds

    // expected {"instant":"1970-01-01T00:00:10Z"}, got {"instant":"1970-01-01T00:00:10Z"}
    printJson(InstantDefault(instant))

    // expected {"instant":10}, got {"instant":10}
    printJson(InstantProperty(instant))

    // this is wrong:
    // expected {"instant":10}, got {"instant":"1970-01-01T00:00:10Z"}
    printJson(InstantType(instant))


    // expected {"duration":10}, got {"duration":10}
    printJson(DurationProperty(duration))

    // expected {"duration":10}, got {"duration":10}
    printJson(DurationType(duration))
}
custom serializers
object InstantInEpochSecondsSerializer : KSerializer<Instant> {
    
    override val descriptor = PrimitiveSerialDescriptor("InstantInEpochSeconds", PrimitiveKind.LONG)

    override fun serialize(encoder: Encoder, value: Instant) {
        encoder.encodeLong(value.epochSeconds)
    }

    override fun deserialize(decoder: Decoder): Instant {
        return Instant.fromEpochSeconds(decoder.decodeLong())
    }
}


object DurationInSecondsSerializer : KSerializer<Duration> {
    
    override val descriptor = PrimitiveSerialDescriptor("DurationInSeconds", PrimitiveKind.LONG)

    override fun serialize(encoder: Encoder, value: Duration) {
        encoder.encodeLong(value.inWholeSeconds)
    }

    override fun deserialize(decoder: Decoder): Duration {
        return decoder.decodeLong().toDuration(DurationUnit.SECONDS)
    }
}

Expected behavior

Instead of printing

{"instant":"1970-01-01T00:00:10Z"}
{"instant":10}
{"instant":"1970-01-01T00:00:10Z"}
{"duration":10}
{"duration":10}

it should print

{"instant":"1970-01-01T00:00:10Z"}
{"instant":10}
{"instant":10}
{"duration":10}
{"duration":10}

(it should use InstantInEpochSecondsSerializer instead of InstantIso8601Serializer for the InstantType.instant property)

Environment

  • Kotlin version: reproduced on 1.6.10 and 1.6.20
  • Library version: 1.3.2
  • Kotlin platforms: JVM
  • Gradle version: reproduced on 7.4 and 7.4.2
@sandwwraith
Copy link
Member

Target TYPE was added to be able to specify serializers inside other types, e.g. List<@Serializable(with = InstantInEpochSecondsSerializer::class) Instant>

But I agree it should also work in a described way. However, probably not with typealias.

@sandwwraith sandwwraith self-assigned this Apr 6, 2022
@sandwwraith sandwwraith added the bug label Apr 6, 2022
@lukellmann
Copy link
Contributor Author

Target TYPE was added to be able to specify serializers inside other types, e.g. List<@Serializable(with = InstantInEpochSecondsSerializer::class) Instant>

This indeed works as intended.

But I agree it should also work in a described way. However, probably not with typealias.

Since the typealias approach works for Duration and inside other types like List, I don't see why it wouldn't work everywhere once this bug is fixed.

@lukellmann
Copy link
Contributor Author

I further found out that this seems to be only the case for serializable classes that use a custom serializer and not the generated one.

If Instant in the above example is replaced by

@Serializable(with = SomeCustomSerializer::class)
data class SomeClass(val data: Int)

and InstantInEpochSecondsSerializer by OverrideSerializer I can still observe this bug, however if Instant is instead replaced by

@Serializable
data class SomeClass(val data: Int)

I can no longer observe this bug.

custom serializers
object SomeCustomSerializer : KSerializer<SomeClass> {
    
    override val descriptor = PrimitiveSerialDescriptor("SomeClass", PrimitiveKind.STRING)

    override fun serialize(encoder: Encoder, value: SomeClass) {
        encoder.encodeString(value.data.toString())
    }

    override fun deserialize(decoder: Decoder): SomeClass {
        return SomeClass(decoder.decodeString().toInt())
    }
}

object OverrideSerializer : KSerializer<SomeClass> {

    override val descriptor = PrimitiveSerialDescriptor("SomeClassAsAlwaysTheSame", PrimitiveKind.STRING)

    override fun serialize(encoder: Encoder, value: SomeClass) {
        encoder.encodeString("AlwaysTheSame");
    }

    override fun deserialize(decoder: Decoder): SomeClass {
        decoder.decodeString()
        return SomeClass(1)
    }
}

lukellmann added a commit to lukellmann/kord that referenced this issue May 1, 2022
HopeBaron pushed a commit to kordlib/kord that referenced this issue May 5, 2022
* Instant serializers

* use Instant for UpdateStatus.since

* use Instant for Activity timestamps

* use Instant for Typing Start timestamps

* use Instant for request_to_speak_timestamp

* use Instant for DiscordTemplate

* use Instant for last_pin_timestamp

* use Instant for Message timestamps

* use Instant for archive_timestamp

* use Instant for join_timestamp

* use Instant for Embed.timestamp

* use Instant for joined_at

* use Instant for premium_since

* use Instant for synced_at

* use Instant for DiscordCreatedInvite.createdAt

* fix tests

* typealiases

* more and simpler tests

* throw SerializationException on overflow in InstantInEpochMillisecondsSerializer

* Range check to prevent false positive

* Don't use typealiases because of Kotlin/kotlinx.serialization#1895
@lukellmann
Copy link
Contributor Author

Do you think I could contribute a fix myself?
I haven't worked with kotlin compiler/plugin source before, so where would be the right place to get started?

@sandwwraith
Copy link
Member

Plugin sources are located in the Kotlin repository: https://github.com/JetBrains/kotlin/tree/master/plugins/kotlin-serialization/kotlin-serialization-compiler (ignore the README though, it's outdated since all Kotlin idea plugins are now in intellij monorepo).

It may be hard to get a grasp on large compiler API, but of course, nothing is impossible :)

sandwwraith added a commit to JetBrains/kotlin that referenced this issue Sep 27, 2022
In `val p: @serializable(X) Foo` and `@Serializable(Y) class Foo` situation,
now X would be chosen as serializer.

Fixes Kotlin/kotlinx.serialization#1895
@lukellmann
Copy link
Contributor Author

It seems like you did some work related to this issue @sandwwraith. Will this be fixed now in some next version?

@sandwwraith
Copy link
Member

@lukellmann Yes, the fix should go to the master branch of Kotlin which is now 1.8.20. I'll see if it's possible to backport fix to 1.8.0

@lukellmann
Copy link
Contributor Author

That's amazing, thanks :)

sandwwraith added a commit to JetBrains/kotlin that referenced this issue Oct 13, 2022
In `val p: @serializable(X) Foo` and `@Serializable(Y) class Foo` situation,
now X would be chosen as serializer.

Fixes Kotlin/kotlinx.serialization#1895
EgorKulikov pushed a commit to JetBrains/kotlin that referenced this issue Oct 20, 2022
In `val p: @serializable(X) Foo` and `@Serializable(Y) class Foo` situation,
now X would be chosen as serializer.

Fixes Kotlin/kotlinx.serialization#1895
Soarex16 pushed a commit to Soarex16/kotlin that referenced this issue Dec 5, 2022
In `val p: @serializable(X) Foo` and `@Serializable(Y) class Foo` situation,
now X would be chosen as serializer.

Fixes Kotlin/kotlinx.serialization#1895
lukellmann added a commit to kordlib/kord that referenced this issue Feb 10, 2023
Using typealiases for overriding the default Instant serializer wasn't
possible in #605 because of
Kotlin/kotlinx.serialization#1895.
Since this Bug was fixed in Kotlin 1.8.20-Beta, the typealiases
dev.kord.common.serialization.InstantInEpochMilliseconds and
dev.kord.common.serialization.InstantInEpochSeconds can now be used.

The changes in the public API are probably because of changes in the
serialization and AtomicFU plugins with Kotlin 1.8.20-Beta. However,
they are unlikely to affect anyone since only generated symbols that
aren't supposed to be accessed directly were touched.
lukellmann added a commit to kordlib/kord that referenced this issue Feb 17, 2023
Using typealiases for overriding the default Instant serializer wasn't
possible in #605 because of
Kotlin/kotlinx.serialization#1895.
Since this Bug was fixed in Kotlin 1.8.20-Beta, the typealiases
dev.kord.common.serialization.InstantInEpochMilliseconds and
dev.kord.common.serialization.InstantInEpochSeconds can now be used.

The changes in the public API are probably because of changes in the
serialization and AtomicFU plugins with Kotlin 1.8.20-Beta. However,
they are unlikely to affect anyone since only generated symbols that
aren't supposed to be accessed directly were touched.
lukellmann added a commit to kordlib/kord that referenced this issue Feb 17, 2023
Using typealiases for overriding the default Instant serializer wasn't
possible in #605 because of
Kotlin/kotlinx.serialization#1895.
Since this Bug was fixed in Kotlin 1.8.20-Beta, the typealiases
dev.kord.common.serialization.InstantInEpochMilliseconds and
dev.kord.common.serialization.InstantInEpochSeconds can now be used.

The changes in the public API are probably because of changes in the
serialization and AtomicFU plugins with Kotlin 1.8.20-Beta. However,
they are unlikely to affect anyone since only generated symbols that
aren't supposed to be accessed directly were touched.
lukellmann added a commit to kordlib/kord that referenced this issue Mar 8, 2023
Using typealiases for overriding the default Instant serializer wasn't
possible in #605 because of
Kotlin/kotlinx.serialization#1895.
Since this Bug was fixed in Kotlin 1.8.20-RC, the typealiases
dev.kord.common.serialization.InstantInEpochMilliseconds and
dev.kord.common.serialization.InstantInEpochSeconds can now be used.

The changes in the public API are probably because of changes in the
serialization and AtomicFU plugins with Kotlin 1.8.20-RC. However, they
are unlikely to affect anyone since only generated symbols that aren't
supposed to be accessed directly were touched.
lukellmann added a commit to kordlib/kord that referenced this issue Mar 9, 2023
Using typealiases for overriding the default Instant serializer wasn't
possible in #605 because of
Kotlin/kotlinx.serialization#1895.
Since this Bug was fixed in Kotlin 1.8.20-RC, the typealiases
dev.kord.common.serialization.InstantInEpochMilliseconds and
dev.kord.common.serialization.InstantInEpochSeconds can now be used.

The changes in the public API are probably because of changes in the
serialization and AtomicFU plugins with Kotlin 1.8.20-RC. However, they
are unlikely to affect anyone since only generated symbols that aren't
supposed to be accessed directly were touched.
lukellmann added a commit to kordlib/kord that referenced this issue Mar 9, 2023
* Kotlin 1.8.10 -> 1.8.20-RC
* KSP 1.8.10-1.0.9 -> 1.8.20-RC-1.0.9
* kotlinx.coroutines 1.6.4 -> 1.7.0-Beta

Using typealiases for overriding the default Instant serializer wasn't
possible in #605 because of
Kotlin/kotlinx.serialization#1895.
Since this Bug was fixed in Kotlin 1.8.20-RC, the typealiases
dev.kord.common.serialization.InstantInEpochMilliseconds and
dev.kord.common.serialization.InstantInEpochSeconds can now be used.

The changes in the public API are probably because of changes in the
serialization and AtomicFU plugins with Kotlin 1.8.20-RC. However, they
are unlikely to affect anyone since only generated symbols that aren't
supposed to be accessed directly were touched.
lukellmann added a commit to kordlib/kord that referenced this issue Mar 21, 2023
* Kotlin 1.8.10 -> 1.8.20-RC
* KSP 1.8.10-1.0.9 -> 1.8.20-RC-1.0.9
* kotlinx.coroutines 1.6.4 -> 1.7.0-Beta

Using typealiases for overriding the default Instant serializer wasn't
possible in #605 because of
Kotlin/kotlinx.serialization#1895.
Since this Bug was fixed in Kotlin 1.8.20-RC, the typealiases
dev.kord.common.serialization.InstantInEpochMilliseconds and
dev.kord.common.serialization.InstantInEpochSeconds can now be used.

The changes in the public API are probably because of changes in the
serialization and AtomicFU plugins with Kotlin 1.8.20-RC. However, they
are unlikely to affect anyone since only generated symbols that aren't
supposed to be accessed directly were touched.
lukellmann added a commit to kordlib/kord that referenced this issue Mar 25, 2023
* Kotlin 1.8.10 -> 1.8.20-RC2
* KSP 1.8.10-1.0.9 -> 1.8.20-RC2-1.0.9
* kotlinx.coroutines 1.6.4 -> 1.7.0-Beta
* AtomicFU 0.20.0 -> 0.20.1

Using typealiases for overriding the default Instant serializer wasn't
possible in #605 because of
Kotlin/kotlinx.serialization#1895.
Since this Bug was fixed in Kotlin 1.8.20-RC2, the typealiases
dev.kord.common.serialization.InstantInEpochMilliseconds and
dev.kord.common.serialization.InstantInEpochSeconds can now be used.

The changes in the public API are probably because of changes in the
serialization and AtomicFU plugins with Kotlin 1.8.20-RC2. However, they
are unlikely to affect anyone since only generated symbols that aren't
supposed to be accessed directly were touched.
lukellmann added a commit to kordlib/kord that referenced this issue Apr 2, 2023
* Kotlin 1.8.10 -> 1.8.20
* KSP 1.8.10-1.0.9 -> 1.8.20-RC2-1.0.9
* kotlinx.coroutines 1.6.4 -> 1.7.0-Beta
* AtomicFU 0.20.0 -> 0.20.1

Using typealiases for overriding the default Instant serializer wasn't
possible in #605 because of
Kotlin/kotlinx.serialization#1895.
Since this Bug was fixed in Kotlin 1.8.20, the typealiases
dev.kord.common.serialization.InstantInEpochMilliseconds and
dev.kord.common.serialization.InstantInEpochSeconds can now be used.

The changes in the public API are probably because of changes in the
serialization and AtomicFU plugins with Kotlin 1.8.20. However, they
are unlikely to affect anyone since only generated symbols that aren't
supposed to be accessed directly were touched.
lukellmann added a commit to kordlib/kord that referenced this issue Apr 3, 2023
* Kotlin 1.8.10 -> 1.8.20
* KSP 1.8.10-1.0.9 -> 1.8.20-1.0.10
* kotlinx.coroutines 1.6.4 -> 1.7.0-Beta
* AtomicFU 0.20.0 -> 0.20.1

Using typealiases for overriding the default Instant serializer wasn't
possible in #605 because of
Kotlin/kotlinx.serialization#1895.
Since this Bug was fixed in Kotlin 1.8.20, the typealiases
dev.kord.common.serialization.InstantInEpochMilliseconds and
dev.kord.common.serialization.InstantInEpochSeconds can now be used.

The changes in the public API are probably because of changes in the
serialization and AtomicFU plugins with Kotlin 1.8.20. However, they
are unlikely to affect anyone since only generated symbols that aren't
supposed to be accessed directly were touched.
lukellmann added a commit to kordlib/kord that referenced this issue Apr 5, 2023
* Kotlin 1.8.10 -> 1.8.20
* KSP 1.8.10-1.0.9 -> 1.8.20-1.0.10
* kotlinx.coroutines 1.6.4 -> 1.7.0-Beta
* AtomicFU 0.20.0 -> 0.20.1

Using typealiases for overriding the default Instant serializer wasn't
possible in #605 because of
Kotlin/kotlinx.serialization#1895.
Since this Bug was fixed in Kotlin 1.8.20, the typealiases
dev.kord.common.serialization.InstantInEpochMilliseconds and
dev.kord.common.serialization.InstantInEpochSeconds can now be used.

The changes in the public API are probably because of changes in the
serialization and AtomicFU plugins with Kotlin 1.8.20. However, they
are unlikely to affect anyone since only generated symbols that aren't
supposed to be accessed directly were touched.
lukellmann added a commit to kordlib/kord that referenced this issue Apr 6, 2023
* Kotlin 1.8.10 -> 1.8.20
* KSP 1.8.10-1.0.9 -> 1.8.20-1.0.10
* kotlinx.coroutines 1.6.4 -> 1.7.0-Beta
* AtomicFU 0.20.0 -> 0.20.2
* KotlinPoet 1.12.0 -> 1.13.0

Using typealiases for overriding the default Instant serializer wasn't
possible in #605 because of
Kotlin/kotlinx.serialization#1895.
Since this Bug was fixed in Kotlin 1.8.20, the typealiases
dev.kord.common.serialization.InstantInEpochMilliseconds and
dev.kord.common.serialization.InstantInEpochSeconds can now be used.

The changes in the public API are probably because of changes in the
serialization and AtomicFU plugins with Kotlin 1.8.20. However, they
are unlikely to affect anyone since only generated symbols that aren't
supposed to be accessed directly were touched.
lukellmann added a commit to kordlib/kord that referenced this issue Apr 14, 2023
* Kotlin 1.8.10 -> 1.8.20
* KSP 1.8.10-1.0.9 -> 1.8.20-1.0.10
* kotlinx.coroutines 1.6.4 -> 1.7.0-Beta
* AtomicFU 0.20.0 -> 0.20.2
* KotlinPoet 1.12.0 -> 1.13.0

Using typealiases for overriding the default Instant serializer wasn't
possible in #605 because of
Kotlin/kotlinx.serialization#1895.
Since this Bug was fixed in Kotlin 1.8.20, the typealiases
dev.kord.common.serialization.InstantInEpochMilliseconds and
dev.kord.common.serialization.InstantInEpochSeconds can now be used.

The changes in the public API are probably because of changes in the
serialization and AtomicFU plugins with Kotlin 1.8.20. However, they
are unlikely to affect anyone since only generated symbols that aren't
supposed to be accessed directly were touched.
lukellmann added a commit to kordlib/kord that referenced this issue Apr 15, 2023
* Kotlin 1.8.10 -> 1.8.20
* KSP 1.8.10-1.0.9 -> 1.8.20-1.0.10
* kotlinx.coroutines 1.6.4 -> 1.7.0-Beta
* AtomicFU 0.20.0 -> 0.20.2
* KotlinPoet 1.12.0 -> 1.13.0

Using typealiases for overriding the default Instant serializer wasn't
possible in #605 because of
Kotlin/kotlinx.serialization#1895.
Since this Bug was fixed in Kotlin 1.8.20, the typealiases
dev.kord.common.serialization.InstantInEpochMilliseconds and
dev.kord.common.serialization.InstantInEpochSeconds can now be used.

The changes in the public API are probably because of changes in the
serialization and AtomicFU plugins with Kotlin 1.8.20. However, they
are unlikely to affect anyone since only generated symbols that aren't
supposed to be accessed directly were touched.
lukellmann added a commit to kordlib/kord that referenced this issue Apr 19, 2023
* Kotlin 1.8.10 -> 1.8.20
* KSP 1.8.10-1.0.9 -> 1.8.20-1.0.11
* kotlinx.coroutines 1.6.4 -> 1.7.0-RC
* AtomicFU 0.20.0 -> 0.20.2
* Binary compatibility validator 0.13.0 -> 0.13.1
* KotlinPoet 1.12.0 -> 1.13.0
* MockK 1.13.4 -> 1.13.5

Using typealiases for overriding the default Instant serializer wasn't
possible in #605 because of
Kotlin/kotlinx.serialization#1895.
Since this Bug was fixed in Kotlin 1.8.20, the typealiases
dev.kord.common.serialization.InstantInEpochMilliseconds and
dev.kord.common.serialization.InstantInEpochSeconds can now be used.

The changes in the public API are probably because of changes in the
serialization and AtomicFU plugins with Kotlin 1.8.20. However, they
are unlikely to affect anyone since only generated symbols that aren't
supposed to be accessed directly were touched.
lukellmann added a commit to kordlib/kord that referenced this issue Apr 19, 2023
* Kotlin 1.8.10 -> 1.8.20
* KSP 1.8.10-1.0.9 -> 1.8.20-1.0.11
* Ktor 2.2.4 -> 2.3.0
* kotlinx.coroutines 1.6.4 -> 1.7.0-RC
* AtomicFU 0.20.0 -> 0.20.2
* Binary compatibility validator 0.13.0 -> 0.13.1
* KotlinPoet 1.12.0 -> 1.13.0
* MockK 1.13.4 -> 1.13.5

Using typealiases for overriding the default Instant serializer wasn't
possible in #605 because of
Kotlin/kotlinx.serialization#1895.
Since this Bug was fixed in Kotlin 1.8.20, the typealiases
dev.kord.common.serialization.InstantInEpochMilliseconds and
dev.kord.common.serialization.InstantInEpochSeconds can now be used.

The changes in the public API are probably because of changes in the
serialization and AtomicFU plugins with Kotlin 1.8.20. However, they
are unlikely to affect anyone since only generated symbols that aren't
supposed to be accessed directly were touched.
lukellmann added a commit to kordlib/kord that referenced this issue Apr 25, 2023
* Kotlin 1.8.10 -> 1.8.21
* Ktor 2.2.4 -> 2.3.0
* kotlinx.coroutines 1.6.4 -> 1.7.0-RC
* kotlin-node 18.14.0-pre.502 -> 18.16.0-pre.543
* KSP 1.8.10-1.0.9 -> 1.8.20-1.0.11
* KotlinPoet 1.12.0 -> 1.13.0
* MockK 1.13.4 -> 1.13.5
* AtomicFU 0.20.0 -> 0.20.2
* Binary compatibility validator 0.13.0 -> 0.13.1
* gradle-buildconfig-plugin 3.1.0 -> 4.0.2

Using typealiases for overriding the default Instant serializer wasn't
possible in #605 because of
Kotlin/kotlinx.serialization#1895.
Since this Bug was fixed in Kotlin 1.8.21, the typealiases
dev.kord.common.serialization.InstantInEpochMilliseconds and
dev.kord.common.serialization.InstantInEpochSeconds can now be used.

The changes in the public API are probably because of changes in the
serialization and AtomicFU plugins with Kotlin 1.8.21. However, they
are unlikely to affect anyone since only generated symbols that aren't
supposed to be accessed directly were touched.
lukellmann added a commit to kordlib/kord that referenced this issue Apr 27, 2023
* Kotlin 1.8.10 -> 1.8.21
* Ktor 2.2.4 -> 2.3.0
* kotlinx.coroutines 1.6.4 -> 1.7.0-RC
* kotlin-node 18.14.0-pre.502 -> 18.16.0-pre.543
* KSP 1.8.10-1.0.9 -> 1.8.21-1.0.11
* KotlinPoet 1.12.0 -> 1.13.0
* JUnit 5 5.9.2 -> 5.9.3
* MockK 1.13.4 -> 1.13.5
* AtomicFU 0.20.0 -> 0.20.2
* Binary compatibility validator 0.13.0 -> 0.13.1
* gradle-buildconfig-plugin 3.1.0 -> 4.0.2

Using typealiases for overriding the default Instant serializer wasn't
possible in #605 because of
Kotlin/kotlinx.serialization#1895.
Since this Bug was fixed in Kotlin 1.8.21, the typealiases
dev.kord.common.serialization.InstantInEpochMilliseconds and
dev.kord.common.serialization.InstantInEpochSeconds can now be used.

The changes in the public API are probably because of changes in the
serialization and AtomicFU plugins with Kotlin 1.8.21. However, they
are unlikely to affect anyone since only generated symbols that aren't
supposed to be accessed directly were touched.
lukellmann added a commit to kordlib/kord that referenced this issue Apr 29, 2023
* Kotlin 1.8.10 -> 1.8.21
* Ktor 2.2.4 -> 2.3.0
* kotlinx.coroutines 1.6.4 -> 1.7.0-RC
* kotlin-node 18.14.0-pre.502 -> 18.16.0-pre.543
* KSP 1.8.10-1.0.9 -> 1.8.21-1.0.11
* KotlinPoet 1.12.0 -> 1.13.1
* JUnit 5 5.9.2 -> 5.9.3
* MockK 1.13.4 -> 1.13.5
* AtomicFU 0.20.0 -> 0.20.2
* Binary compatibility validator 0.13.0 -> 0.13.1
* gradle-buildconfig-plugin 3.1.0 -> 4.0.2

Using typealiases for overriding the default Instant serializer wasn't
possible in #605 because of
Kotlin/kotlinx.serialization#1895.
Since this Bug was fixed in Kotlin 1.8.21, the typealiases
dev.kord.common.serialization.InstantInEpochMilliseconds and
dev.kord.common.serialization.InstantInEpochSeconds can now be used.

The changes in the public API are probably because of changes in the
serialization and AtomicFU plugins with Kotlin 1.8.21. However, they
are unlikely to affect anyone since only generated symbols that aren't
supposed to be accessed directly were touched.
lukellmann added a commit to kordlib/kord that referenced this issue Apr 29, 2023
* Kotlin 1.8.10 -> 1.8.21
* Ktor 2.2.4 -> 2.3.0
* kotlinx.coroutines 1.6.4 -> 1.7.0-RC
* kotlin-node 18.14.0-pre.502 -> 18.16.0-pre.543
* KSP 1.8.10-1.0.9 -> 1.8.21-1.0.11
* KotlinPoet 1.12.0 -> 1.13.1
* JUnit 5 5.9.2 -> 5.9.3
* MockK 1.13.4 -> 1.13.5
* AtomicFU 0.20.0 -> 0.20.2
* Binary compatibility validator 0.13.0 -> 0.13.1
* gradle-buildconfig-plugin 3.1.0 -> 4.0.2

Using typealiases for overriding the default Instant serializer wasn't
possible in #605 because of
Kotlin/kotlinx.serialization#1895.
Since this Bug was fixed in Kotlin 1.8.21, the typealiases
dev.kord.common.serialization.InstantInEpochMilliseconds and
dev.kord.common.serialization.InstantInEpochSeconds can now be used.

The changes in the public API are probably because of changes in the
serialization and AtomicFU plugins with Kotlin 1.8.21. However, they
are unlikely to affect anyone since only generated symbols that aren't
supposed to be accessed directly were touched.
lukellmann added a commit to kordlib/kord that referenced this issue May 2, 2023
* Kotlin 1.8.10 -> 1.8.21
* Ktor 2.2.4 -> 2.3.0
* kotlinx.coroutines 1.6.4 -> 1.7.0-RC
* kotlin-node 18.14.0-pre.502 -> 18.16.3-pre.546
* KSP 1.8.10-1.0.9 -> 1.8.21-1.0.11
* KotlinPoet 1.12.0 -> 1.13.1
* JUnit 5 5.9.2 -> 5.9.3
* MockK 1.13.4 -> 1.13.5
* AtomicFU 0.20.0 -> 0.20.2
* Binary compatibility validator 0.13.0 -> 0.13.1
* gradle-buildconfig-plugin 3.1.0 -> 4.0.4

Using typealiases for overriding the default Instant serializer wasn't
possible in #605 because of
Kotlin/kotlinx.serialization#1895.
Since this Bug was fixed in Kotlin 1.8.21, the typealiases
dev.kord.common.serialization.InstantInEpochMilliseconds and
dev.kord.common.serialization.InstantInEpochSeconds can now be used.

The changes in the public API are probably because of changes in the
serialization and AtomicFU plugins with Kotlin 1.8.21. However, they
are unlikely to affect anyone since only generated symbols that aren't
supposed to be accessed directly were touched.
lukellmann added a commit to kordlib/kord that referenced this issue May 5, 2023
* Kotlin 1.8.10 -> 1.8.21
* Ktor 2.2.4 -> 2.3.0
* kotlinx.coroutines 1.6.4 -> 1.7.0
* kotlin-node 18.14.0-pre.502 -> 18.16.3-pre.546
* KSP 1.8.10-1.0.9 -> 1.8.21-1.0.11
* KotlinPoet 1.12.0 -> 1.13.2
* JUnit 5 5.9.2 -> 5.9.3
* MockK 1.13.4 -> 1.13.5
* AtomicFU 0.20.0 -> 0.20.2
* Binary compatibility validator 0.13.0 -> 0.13.1
* gradle-buildconfig-plugin 3.1.0 -> 4.0.4

Warnings about duplicate library name with AtomicFU are no longer
present with kotlinx.coroutines 1.7.0 and AtomicFU 0.20.2, so -Werror
can be turned on again.

Using typealiases for overriding the default Instant serializer wasn't
possible in #605 because of
Kotlin/kotlinx.serialization#1895.
Since this Bug was fixed in Kotlin 1.8.21, the typealiases
dev.kord.common.serialization.InstantInEpochMilliseconds and
dev.kord.common.serialization.InstantInEpochSeconds can now be used.

The changes in the public API are probably because of changes in the
serialization and AtomicFU plugins with Kotlin 1.8.21. However, they
are unlikely to affect anyone since only generated symbols that aren't
supposed to be accessed directly were touched.
lukellmann added a commit to kordlib/kord that referenced this issue May 13, 2023
* Kotlin 1.8.10 -> 1.8.21
* Ktor 2.2.4 -> 2.3.0
* kotlinx.coroutines 1.6.4 -> 1.7.1
* kotlinx.serialization 1.5.0 -> 1.5.1
* kotlin-node 18.14.0-pre.502 -> 18.16.3-pre.546
* KSP 1.8.10-1.0.9 -> 1.8.21-1.0.11
* KotlinPoet 1.12.0 -> 1.13.2
* JUnit 5 5.9.2 -> 5.9.3
* MockK 1.13.4 -> 1.13.5
* AtomicFU 0.20.0 -> 0.20.2
* Binary compatibility validator 0.13.0 -> 0.13.1
* gradle-buildconfig-plugin 3.1.0 -> 4.0.4

Warnings about duplicate library name with AtomicFU are no longer
present with kotlinx.coroutines 1.7.0 and AtomicFU 0.20.2, so -Werror
can be turned on again.

Using typealiases for overriding the default Instant serializer wasn't
possible in #605 because of
Kotlin/kotlinx.serialization#1895.
Since this Bug was fixed in Kotlin 1.8.21, the typealiases
dev.kord.common.serialization.InstantInEpochMilliseconds and
dev.kord.common.serialization.InstantInEpochSeconds can now be used.

The changes in the public API are probably because of changes in the
serialization and AtomicFU plugins with Kotlin 1.8.21. However, they
are unlikely to affect anyone since only generated symbols that aren't
supposed to be accessed directly were touched.
lukellmann added a commit to kordlib/kord that referenced this issue May 21, 2023
* Kotlin 1.8.10 -> 1.8.21
* Ktor 2.2.4 -> 2.3.0
* kotlinx.coroutines 1.6.4 -> 1.7.1
* kotlinx.serialization 1.5.0 -> 1.5.1
* kotlin-node 18.14.0-pre.502 -> 18.16.3-pre.546
* KSP 1.8.10-1.0.9 -> 1.8.21-1.0.11
* KotlinPoet 1.12.0 -> 1.13.2
* JUnit 5 5.9.2 -> 5.9.3
* MockK 1.13.4 -> 1.13.5
* AtomicFU 0.20.0 -> 0.20.2
* Binary compatibility validator 0.13.0 -> 0.13.1
* gradle-buildconfig-plugin 3.1.0 -> 4.0.4

Warnings about duplicate library name with AtomicFU are no longer
present with kotlinx.coroutines 1.7.1 and AtomicFU 0.20.2, so -Werror
can be turned on again.

Using typealiases for overriding the default Instant serializer wasn't
possible in #605 because of
Kotlin/kotlinx.serialization#1895.
Since this Bug was fixed in Kotlin 1.8.21, the typealiases
dev.kord.common.serialization.InstantInEpochMilliseconds and
dev.kord.common.serialization.InstantInEpochSeconds can now be used.

The changes in the public API are probably because of changes in the
serialization and AtomicFU plugins with Kotlin 1.8.21. However, they
are unlikely to affect anyone since only generated symbols that aren't
supposed to be accessed directly were touched.
lukellmann added a commit to kordlib/kord that referenced this issue May 21, 2023
* Kotlin 1.8.10 -> 1.8.21
* Ktor 2.2.4 -> 2.3.0
* kotlinx.coroutines 1.6.4 -> 1.7.1
* kotlinx.serialization 1.5.0 -> 1.5.1
* kotlin-node 18.14.0-pre.502 -> 18.16.3-pre.546
* KSP 1.8.10-1.0.9 -> 1.8.21-1.0.11
* KotlinPoet 1.12.0 -> 1.13.2
* JUnit 5 5.9.2 -> 5.9.3
* MockK 1.13.4 -> 1.13.5
* AtomicFU 0.20.0 -> 0.20.2
* Binary compatibility validator 0.13.0 -> 0.13.1
* gradle-buildconfig-plugin 3.1.0 -> 4.0.4

Warnings about duplicate library name with AtomicFU are no longer
present with kotlinx.coroutines 1.7.1 and AtomicFU 0.20.2, so -Werror
can be turned on again.

Using typealiases for overriding the default Instant serializer wasn't
possible in #605 because of
Kotlin/kotlinx.serialization#1895.
Since this Bug was fixed in Kotlin 1.8.21, the typealiases
dev.kord.common.serialization.InstantInEpochMilliseconds and
dev.kord.common.serialization.InstantInEpochSeconds can now be used.

The changes in the public API are probably because of changes in the
serialization and AtomicFU plugins with Kotlin 1.8.21. However, they
are unlikely to affect anyone since only generated symbols that aren't
supposed to be accessed directly were touched.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants