Skip to content

Commit

Permalink
Update Kotlin to 2.0.20-Beta2
Browse files Browse the repository at this point in the history
Context receivers will be replaced by [1] and are deprecated for now,
so the CONTEXT_RECEIVERS_DEPRECATED warning must be suppressed in the
ksp-processors project.

The changes in the KLib ABI dumps are due to [2], constructors of sealed
classes aren't public ABI.

[1] Kotlin/KEEP#367
[2] JetBrains/kotlin@56ba701
  • Loading branch information
lukellmann committed Jul 20, 2024
1 parent 89e18ac commit b866511
Show file tree
Hide file tree
Showing 20 changed files with 33 additions and 217 deletions.
138 changes: 0 additions & 138 deletions common/api/common.klib.api

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ kotlin {
api(libs.ktor.client.js)

// workaround for https://youtrack.jetbrains.com/issue/KT-43500 /
// https://youtrack.jetbrains.com/issue/KT-64109#focus=Comments-27-10064206.0-0
// (intended to be compileOnly in commonMain only)
// https://youtrack.jetbrains.com/issue/KT-64109#focus=Comments-27-10064206.0-0 /
// https://youtrack.jetbrains.com/issue/KT-61096 (intended to be compileOnly in commonMain only)
implementation(projects.kspAnnotations)
}
}
Expand Down
25 changes: 1 addition & 24 deletions core/api/core.klib.api
Original file line number Diff line number Diff line change
Expand Up @@ -7089,8 +7089,6 @@ final class dev.kord.core.entity/ClientStatus { // dev.kord.core.entity/ClientSt
final fun toString(): kotlin/String // dev.kord.core.entity/ClientStatus.toString|toString(){}[0]

sealed class Client { // dev.kord.core.entity/ClientStatus.Client|null[0]
constructor <init>(dev.kord.common.entity/PresenceStatus) // dev.kord.core.entity/ClientStatus.Client.<init>|<init>(dev.kord.common.entity.PresenceStatus){}[0]

final val status // dev.kord.core.entity/ClientStatus.Client.status|{}status[0]
final fun <get-status>(): dev.kord.common.entity/PresenceStatus // dev.kord.core.entity/ClientStatus.Client.status.<get-status>|<get-status>(){}[0]

Expand Down Expand Up @@ -11573,9 +11571,6 @@ open class dev.kord.core.entity/User : dev.kord.core.behavior/UserBehavior { //
}

sealed class dev.kord.core.cache.data/ComponentData { // dev.kord.core.cache.data/ComponentData|null[0]
constructor <init>() // dev.kord.core.cache.data/ComponentData.<init>|<init>(){}[0]
constructor <init>(kotlin/Int, kotlinx.serialization.internal/SerializationConstructorMarker?) // dev.kord.core.cache.data/ComponentData.<init>|<init>(kotlin.Int;kotlinx.serialization.internal.SerializationConstructorMarker?){}[0]

abstract val channelTypes // dev.kord.core.cache.data/ComponentData.channelTypes|{}channelTypes[0]
abstract fun <get-channelTypes>(): dev.kord.common.entity.optional/Optional<kotlin.collections/List<dev.kord.common.entity/ChannelType>> // dev.kord.core.cache.data/ComponentData.channelTypes.<get-channelTypes>|<get-channelTypes>(){}[0]
abstract val components // dev.kord.core.cache.data/ComponentData.components|{}components[0]
Expand Down Expand Up @@ -11619,8 +11614,6 @@ sealed class dev.kord.core.cache.data/ComponentData { // dev.kord.core.cache.dat
}

sealed class dev.kord.core.entity.automoderation/AutoModerationAction : dev.kord.core/KordObject { // dev.kord.core.entity.automoderation/AutoModerationAction|null[0]
constructor <init>(dev.kord.core.cache.data/AutoModerationActionData, dev.kord.core/Kord, dev.kord.common.entity/AutoModerationActionType?) // dev.kord.core.entity.automoderation/AutoModerationAction.<init>|<init>(dev.kord.core.cache.data.AutoModerationActionData;dev.kord.core.Kord;dev.kord.common.entity.AutoModerationActionType?){}[0]

abstract val type // dev.kord.core.entity.automoderation/AutoModerationAction.type|{}type[0]
abstract fun <get-type>(): dev.kord.common.entity/AutoModerationActionType // dev.kord.core.entity.automoderation/AutoModerationAction.type.<get-type>|<get-type>(){}[0]
final val data // dev.kord.core.entity.automoderation/AutoModerationAction.data|{}data[0]
Expand All @@ -11632,8 +11625,6 @@ sealed class dev.kord.core.entity.automoderation/AutoModerationAction : dev.kord
}

sealed class dev.kord.core.entity.automoderation/AutoModerationRule : dev.kord.core.behavior.automoderation/TypedAutoModerationRuleBehavior { // dev.kord.core.entity.automoderation/AutoModerationRule|null[0]
constructor <init>(dev.kord.core.cache.data/AutoModerationRuleData, dev.kord.core/Kord, dev.kord.core.supplier/EntitySupplier, dev.kord.common.entity/AutoModerationRuleTriggerType?) // dev.kord.core.entity.automoderation/AutoModerationRule.<init>|<init>(dev.kord.core.cache.data.AutoModerationRuleData;dev.kord.core.Kord;dev.kord.core.supplier.EntitySupplier;dev.kord.common.entity.AutoModerationRuleTriggerType?){}[0]

final val actions // dev.kord.core.entity.automoderation/AutoModerationRule.actions|{}actions[0]
final fun <get-actions>(): kotlin.collections/List<dev.kord.core.entity.automoderation/AutoModerationAction> // dev.kord.core.entity.automoderation/AutoModerationRule.actions.<get-actions>|<get-actions>(){}[0]
final val creator // dev.kord.core.entity.automoderation/AutoModerationRule.creator|{}creator[0]
Expand Down Expand Up @@ -11673,8 +11664,6 @@ sealed class dev.kord.core.entity.automoderation/AutoModerationRule : dev.kord.c
}

sealed class dev.kord.core.entity.component/SelectMenuComponent : dev.kord.core.entity.component/Component { // dev.kord.core.entity.component/SelectMenuComponent|null[0]
constructor <init>(dev.kord.core.cache.data/ComponentData) // dev.kord.core.entity.component/SelectMenuComponent.<init>|<init>(dev.kord.core.cache.data.ComponentData){}[0]

final val customId // dev.kord.core.entity.component/SelectMenuComponent.customId|{}customId[0]
final fun <get-customId>(): kotlin/String // dev.kord.core.entity.component/SelectMenuComponent.customId.<get-customId>|<get-customId>(){}[0]
final val disabled // dev.kord.core.entity.component/SelectMenuComponent.disabled|{}disabled[0]
Expand All @@ -11694,8 +11683,6 @@ sealed class dev.kord.core.entity.component/SelectMenuComponent : dev.kord.core.
}

sealed class dev.kord.core.entity.interaction.followup/FollowupMessage : dev.kord.core.behavior.interaction.followup/FollowupMessageBehavior { // dev.kord.core.entity.interaction.followup/FollowupMessage|null[0]
constructor <init>(dev.kord.core.entity/Message) // dev.kord.core.entity.interaction.followup/FollowupMessage.<init>|<init>(dev.kord.core.entity.Message){}[0]

final val message // dev.kord.core.entity.interaction.followup/FollowupMessage.message|{}message[0]
final fun <get-message>(): dev.kord.core.entity/Message // dev.kord.core.entity.interaction.followup/FollowupMessage.message.<get-message>|<get-message>(){}[0]
open val channelId // dev.kord.core.entity.interaction.followup/FollowupMessage.channelId|{}channelId[0]
Expand All @@ -11707,17 +11694,13 @@ sealed class dev.kord.core.entity.interaction.followup/FollowupMessage : dev.kor
}

sealed class dev.kord.core.entity.interaction.response/MessageInteractionResponse : dev.kord.core.behavior.interaction.response/MessageInteractionResponseBehavior { // dev.kord.core.entity.interaction.response/MessageInteractionResponse|null[0]
constructor <init>(dev.kord.core.entity/Message) // dev.kord.core.entity.interaction.response/MessageInteractionResponse.<init>|<init>(dev.kord.core.entity.Message){}[0]

final val message // dev.kord.core.entity.interaction.response/MessageInteractionResponse.message|{}message[0]
final fun <get-message>(): dev.kord.core.entity/Message // dev.kord.core.entity.interaction.response/MessageInteractionResponse.message.<get-message>|<get-message>(){}[0]

abstract fun withStrategy(dev.kord.core.supplier/EntitySupplyStrategy<*>): dev.kord.core.entity.interaction.response/MessageInteractionResponse // dev.kord.core.entity.interaction.response/MessageInteractionResponse.withStrategy|withStrategy(dev.kord.core.supplier.EntitySupplyStrategy<*>){}[0]
}

sealed class dev.kord.core.entity/BaseApplication : dev.kord.core.entity/KordEntity, dev.kord.core.entity/Strategizable { // dev.kord.core.entity/BaseApplication|null[0]
constructor <init>(dev.kord.core/Kord, dev.kord.core.supplier/EntitySupplier = ...) // dev.kord.core.entity/BaseApplication.<init>|<init>(dev.kord.core.Kord;dev.kord.core.supplier.EntitySupplier){}[0]

abstract val data // dev.kord.core.entity/BaseApplication.data|{}data[0]
abstract fun <get-data>(): dev.kord.core.cache.data/BaseApplicationData // dev.kord.core.entity/BaseApplication.data.<get-data>|<get-data>(){}[0]
final val coverImage // dev.kord.core.entity/BaseApplication.coverImage|{}coverImage[0]
Expand Down Expand Up @@ -11777,8 +11760,6 @@ sealed class dev.kord.core.entity/BaseApplication : dev.kord.core.entity/KordEnt
}

sealed class dev.kord.core.entity/ReactionEmoji { // dev.kord.core.entity/ReactionEmoji|null[0]
constructor <init>() // dev.kord.core.entity/ReactionEmoji.<init>|<init>(){}[0]

abstract val mention // dev.kord.core.entity/ReactionEmoji.mention|{}mention[0]
abstract fun <get-mention>(): kotlin/String // dev.kord.core.entity/ReactionEmoji.mention.<get-mention>|<get-mention>(){}[0]
abstract val name // dev.kord.core.entity/ReactionEmoji.name|{}name[0]
Expand Down Expand Up @@ -11833,8 +11814,6 @@ sealed class dev.kord.core.entity/ReactionEmoji { // dev.kord.core.entity/Reacti
}

sealed class dev.kord.core.event.gateway/DisconnectEvent : dev.kord.core.event.gateway/GatewayEvent { // dev.kord.core.event.gateway/DisconnectEvent|null[0]
constructor <init>() // dev.kord.core.event.gateway/DisconnectEvent.<init>|<init>(){}[0]

final class DetachEvent : dev.kord.core.event.gateway/DisconnectEvent { // dev.kord.core.event.gateway/DisconnectEvent.DetachEvent|null[0]
constructor <init>(dev.kord.core/Kord, kotlin/Int, kotlin/Any?) // dev.kord.core.event.gateway/DisconnectEvent.DetachEvent.<init>|<init>(dev.kord.core.Kord;kotlin.Int;kotlin.Any?){}[0]

Expand Down Expand Up @@ -11944,9 +11923,7 @@ sealed class dev.kord.core.event.gateway/DisconnectEvent : dev.kord.core.event.g
}
}

sealed class dev.kord.core.event.gateway/GatewayEvent : dev.kord.core.event/Event { // dev.kord.core.event.gateway/GatewayEvent|null[0]
constructor <init>() // dev.kord.core.event.gateway/GatewayEvent.<init>|<init>(){}[0]
}
sealed class dev.kord.core.event.gateway/GatewayEvent : dev.kord.core.event/Event // dev.kord.core.event.gateway/GatewayEvent|null[0]

final object dev.kord.core.cache.data/NotSerializable : kotlinx.serialization/KSerializer<kotlin/Any?> { // dev.kord.core.cache.data/NotSerializable|null[0]
final val descriptor // dev.kord.core.cache.data/NotSerializable.descriptor|{}descriptor[0]
Expand Down
10 changes: 0 additions & 10 deletions gateway/api/gateway.klib.api
Original file line number Diff line number Diff line change
Expand Up @@ -2115,8 +2115,6 @@ final class dev.kord.gateway/WebhooksUpdate : dev.kord.gateway/DispatchEvent { /
}

sealed class dev.kord.gateway/Close : dev.kord.gateway/Event { // dev.kord.gateway/Close|null[0]
constructor <init>() // dev.kord.gateway/Close.<init>|<init>(){}[0]

final class DiscordClose : dev.kord.gateway/Close { // dev.kord.gateway/Close.DiscordClose|null[0]
constructor <init>(dev.kord.gateway/GatewayCloseCode, kotlin/Boolean) // dev.kord.gateway/Close.DiscordClose.<init>|<init>(dev.kord.gateway.GatewayCloseCode;kotlin.Boolean){}[0]

Expand Down Expand Up @@ -2149,8 +2147,6 @@ sealed class dev.kord.gateway/Close : dev.kord.gateway/Event { // dev.kord.gatew
}

sealed class dev.kord.gateway/Command { // dev.kord.gateway/Command|null[0]
constructor <init>() // dev.kord.gateway/Command.<init>|<init>(){}[0]

final class Heartbeat : dev.kord.gateway/Command { // dev.kord.gateway/Command.Heartbeat|null[0]
constructor <init>(kotlin/Int?) // dev.kord.gateway/Command.Heartbeat.<init>|<init>(kotlin.Int?){}[0]

Expand All @@ -2173,15 +2169,11 @@ sealed class dev.kord.gateway/Command { // dev.kord.gateway/Command|null[0]
}

sealed class dev.kord.gateway/DispatchEvent : dev.kord.gateway/Event { // dev.kord.gateway/DispatchEvent|null[0]
constructor <init>() // dev.kord.gateway/DispatchEvent.<init>|<init>(){}[0]

abstract val sequence // dev.kord.gateway/DispatchEvent.sequence|{}sequence[0]
abstract fun <get-sequence>(): kotlin/Int? // dev.kord.gateway/DispatchEvent.sequence.<get-sequence>|<get-sequence>(){}[0]
}

sealed class dev.kord.gateway/Event { // dev.kord.gateway/Event|null[0]
constructor <init>() // dev.kord.gateway/Event.<init>|<init>(){}[0]

final object DeserializationStrategy : kotlinx.serialization/DeserializationStrategy<dev.kord.gateway/Event> { // dev.kord.gateway/Event.DeserializationStrategy|null[0]
final val descriptor // dev.kord.gateway/Event.DeserializationStrategy.descriptor|{}descriptor[0]
final fun <get-descriptor>(): kotlinx.serialization.descriptors/SerialDescriptor // dev.kord.gateway/Event.DeserializationStrategy.descriptor.<get-descriptor>|<get-descriptor>(){}[0]
Expand All @@ -2191,8 +2183,6 @@ sealed class dev.kord.gateway/Event { // dev.kord.gateway/Event|null[0]
}

sealed class dev.kord.gateway/Intent { // dev.kord.gateway/Intent|null[0]
constructor <init>(kotlin/Int) // dev.kord.gateway/Intent.<init>|<init>(kotlin.Int){}[0]

final val code // dev.kord.gateway/Intent.code|{}code[0]
final fun <get-code>(): dev.kord.common/DiscordBitSet // dev.kord.gateway/Intent.code.<get-code>|<get-code>(){}[0]
final val shift // dev.kord.gateway/Intent.shift|{}shift[0]
Expand Down
4 changes: 2 additions & 2 deletions gateway/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ kotlin {
implementation(npm("fast-zlib", libs.versions.fastZlib.get()))

// workaround for https://youtrack.jetbrains.com/issue/KT-43500 /
// https://youtrack.jetbrains.com/issue/KT-64109#focus=Comments-27-10064206.0-0
// (intended to be compileOnly in commonMain only)
// https://youtrack.jetbrains.com/issue/KT-64109#focus=Comments-27-10064206.0-0 /
// https://youtrack.jetbrains.com/issue/KT-61096 (intended to be compileOnly in commonMain only)
implementation(projects.kspAnnotations)
}
}
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]

# api dependencies
kotlin = "2.0.20-Beta1" # https://github.com/JetBrains/kotlin
kotlin = "2.0.20-Beta2" # https://github.com/JetBrains/kotlin
ktor = "2.3.12" # https://github.com/ktorio/ktor
kotlinx-coroutines = "1.8.1" # https://github.com/Kotlin/kotlinx.coroutines
kotlinx-serialization = "1.7.1" # https://github.com/Kotlin/kotlinx.serialization
Expand All @@ -18,7 +18,7 @@ stately = "2.0.7" # https://github.com/touchlab/Stately
fastZlib = "2.0.1" # https://github.com/timotejroiko/fast-zlib

# code generation
ksp = "2.0.20-Beta1-1.0.22" # https://github.com/google/ksp
ksp = "2.0.20-Beta2-1.0.23" # https://github.com/google/ksp
kotlinpoet = "1.18.1" # https://github.com/square/kotlinpoet

# tests
Expand Down
3 changes: 2 additions & 1 deletion ksp-annotations/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ plugins {
`kord-internal-multiplatform-module`

// workaround for https://youtrack.jetbrains.com/issue/KT-43500 /
// https://youtrack.jetbrains.com/issue/KT-64109#focus=Comments-27-10064206.0-0 (not intended to be published)
// https://youtrack.jetbrains.com/issue/KT-64109#focus=Comments-27-10064206.0-0 /
// https://youtrack.jetbrains.com/issue/KT-61096 (not intended to be published)
org.jetbrains.dokka
`kord-publishing`
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED")

package dev.kord.ksp.generation.bitflags

import com.google.devtools.ksp.symbol.KSFile
Expand Down
2 changes: 2 additions & 0 deletions ksp-processors/src/main/kotlin/generation/bitflags/Builder.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED")

package dev.kord.ksp.generation.bitflags

import com.squareup.kotlinpoet.ClassName
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED")

package dev.kord.ksp.generation.bitflags

import com.squareup.kotlinpoet.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED")

package dev.kord.ksp.generation.bitflags

import com.squareup.kotlinpoet.DelicateKotlinPoetApi
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED")

package dev.kord.ksp.generation.bitflags

import com.squareup.kotlinpoet.CodeBlock
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED")

package dev.kord.ksp.generation.bitflags

import com.squareup.kotlinpoet.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED")

package dev.kord.ksp.generation.bitflags

import com.squareup.kotlinpoet.KModifier.OVERRIDE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED")

package dev.kord.ksp.generation.kordenum

import com.squareup.kotlinpoet.KModifier.OVERRIDE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED")

package dev.kord.ksp.generation.shared

import com.squareup.kotlinpoet.ClassName
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED")

package dev.kord.ksp.generation.shared

import com.google.devtools.ksp.symbol.KSFile
Expand Down
2 changes: 2 additions & 0 deletions ksp-processors/src/main/kotlin/generation/shared/OptIns.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED")

package dev.kord.ksp.generation.shared

import com.squareup.kotlinpoet.Annotatable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED")

package dev.kord.ksp.generation.shared

import com.squareup.kotlinpoet.*
Expand Down
Loading

0 comments on commit b866511

Please sign in to comment.