From 2a653157bc79ddacabd790febfa256f84bde4100 Mon Sep 17 00:00:00 2001 From: Luca Kellermann Date: Mon, 2 Sep 2024 14:21:06 +0200 Subject: [PATCH 1/5] Update Kotlin to 2.0.20 (#975) 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] https://github.com/Kotlin/KEEP/issues/367 [2] https://github.com/JetBrains/kotlin/commit/56ba701b3d05738d70a4f906859bbb066c9531a0 --- common/api/common.klib.api | 138 --------------- common/build.gradle.kts | 5 +- core/api/core.klib.api | 25 +-- gateway/api/gateway.klib.api | 10 -- gateway/build.gradle.kts | 5 +- gradle.properties | 4 + gradle/libs.versions.toml | 4 +- kotlin-js-store/yarn.lock | 158 ++++++++---------- ksp-annotations/build.gradle.kts | 4 +- .../generation/bitflags/BitFlagsGeneration.kt | 2 + .../kotlin/generation/bitflags/Builder.kt | 2 + .../bitflags/ContainsPlusMinusCopy.kt | 2 + .../bitflags/DeprecatedNewCompanion.kt | 2 + .../generation/bitflags/Documentation.kt | 2 + .../generation/bitflags/FactoryFunctions.kt | 2 + .../kotlin/generation/bitflags/Serializer.kt | 2 + .../kotlin/generation/kordenum/Serializer.kt | 2 + .../shared/EqualsHashCodeToString.kt | 2 + .../shared/FileSpecForGenerationEntity.kt | 2 + .../main/kotlin/generation/shared/OptIns.kt | 2 + .../kotlin/generation/shared/SharedContent.kt | 2 + rest/api/rest.klib.api | 38 ----- 22 files changed, 113 insertions(+), 302 deletions(-) diff --git a/common/api/common.klib.api b/common/api/common.klib.api index 9308b8f8f82..fe35937c226 100644 --- a/common/api/common.klib.api +++ b/common/api/common.klib.api @@ -6341,8 +6341,6 @@ final class dev.kord.common/Locale { // dev.kord.common/Locale|null[0] } sealed class <#A: kotlin/Any?> dev.kord.common.entity/AuditLogChangeKey { // dev.kord.common.entity/AuditLogChangeKey|null[0] - constructor (kotlin/String, kotlinx.serialization/KSerializer<#A>) // dev.kord.common.entity/AuditLogChangeKey.|(kotlin.String;kotlinx.serialization.KSerializer<1:0>){}[0] - final val name // dev.kord.common.entity/AuditLogChangeKey.name|{}name[0] final fun (): kotlin/String // dev.kord.common.entity/AuditLogChangeKey.name.|(){}[0] final val serializer // dev.kord.common.entity/AuditLogChangeKey.serializer|{}serializer[0] @@ -6479,8 +6477,6 @@ sealed class <#A: kotlin/Any?> dev.kord.common.entity/AuditLogChangeKey { // dev } sealed class <#A: out kotlin/Any?> dev.kord.common.entity.optional/Optional { // dev.kord.common.entity.optional/Optional|null[0] - constructor () // dev.kord.common.entity.optional/Optional.|(){}[0] - open val value // dev.kord.common.entity.optional/Optional.value|{}value[0] open fun (): #A? // dev.kord.common.entity.optional/Optional.value.|(){}[0] @@ -6533,8 +6529,6 @@ sealed class <#A: out kotlin/Any?> dev.kord.common.entity.optional/Optional { // } sealed class <#A: out kotlin/Any?> dev.kord.common.entity/CommandArgument : dev.kord.common.entity/Option { // dev.kord.common.entity/CommandArgument|null[0] - constructor () // dev.kord.common.entity/CommandArgument.|(){}[0] - abstract val focused // dev.kord.common.entity/CommandArgument.focused|{}focused[0] abstract fun (): dev.kord.common.entity.optional/OptionalBoolean // dev.kord.common.entity/CommandArgument.focused.|(){}[0] abstract val value // dev.kord.common.entity/CommandArgument.value|{}value[0] @@ -6758,8 +6752,6 @@ sealed class <#A: out kotlin/Any?> dev.kord.common.entity/CommandArgument : dev. } sealed class dev.kord.common.entity.optional/OptionalBoolean { // dev.kord.common.entity.optional/OptionalBoolean|null[0] - constructor () // dev.kord.common.entity.optional/OptionalBoolean.|(){}[0] - final val asNullable // dev.kord.common.entity.optional/OptionalBoolean.asNullable|{}asNullable[0] final fun (): kotlin/Boolean? // dev.kord.common.entity.optional/OptionalBoolean.asNullable.|(){}[0] final val asOptional // dev.kord.common.entity.optional/OptionalBoolean.asOptional|{}asOptional[0] @@ -6792,8 +6784,6 @@ sealed class dev.kord.common.entity.optional/OptionalBoolean { // dev.kord.commo } sealed class dev.kord.common.entity.optional/OptionalInt { // dev.kord.common.entity.optional/OptionalInt|null[0] - constructor () // dev.kord.common.entity.optional/OptionalInt.|(){}[0] - final val asNullable // dev.kord.common.entity.optional/OptionalInt.asNullable|{}asNullable[0] final fun (): kotlin/Int? // dev.kord.common.entity.optional/OptionalInt.asNullable.|(){}[0] final val asOptional // dev.kord.common.entity.optional/OptionalInt.asOptional|{}asOptional[0] @@ -6823,8 +6813,6 @@ sealed class dev.kord.common.entity.optional/OptionalInt { // dev.kord.common.en } sealed class dev.kord.common.entity.optional/OptionalLong { // dev.kord.common.entity.optional/OptionalLong|null[0] - constructor () // dev.kord.common.entity.optional/OptionalLong.|(){}[0] - final val asNullable // dev.kord.common.entity.optional/OptionalLong.asNullable|{}asNullable[0] final fun (): kotlin/Long? // dev.kord.common.entity.optional/OptionalLong.asNullable.|(){}[0] final val asOptional // dev.kord.common.entity.optional/OptionalLong.asOptional|{}asOptional[0] @@ -6854,8 +6842,6 @@ sealed class dev.kord.common.entity.optional/OptionalLong { // dev.kord.common.e } sealed class dev.kord.common.entity.optional/OptionalSnowflake { // dev.kord.common.entity.optional/OptionalSnowflake|null[0] - constructor () // dev.kord.common.entity.optional/OptionalSnowflake.|(){}[0] - final val asOptional // dev.kord.common.entity.optional/OptionalSnowflake.asOptional|{}asOptional[0] final fun (): dev.kord.common.entity.optional/Optional // dev.kord.common.entity.optional/OptionalSnowflake.asOptional.|(){}[0] open val value // dev.kord.common.entity.optional/OptionalSnowflake.value|{}value[0] @@ -6886,8 +6872,6 @@ sealed class dev.kord.common.entity.optional/OptionalSnowflake { // dev.kord.com } sealed class dev.kord.common.entity/ActivityFlag { // dev.kord.common.entity/ActivityFlag|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ActivityFlag.|(kotlin.Int){}[0] - final val shift // dev.kord.common.entity/ActivityFlag.shift|{}shift[0] final fun (): kotlin/Int // dev.kord.common.entity/ActivityFlag.shift.|(){}[0] final val value // dev.kord.common.entity/ActivityFlag.value|{}value[0] @@ -6928,8 +6912,6 @@ sealed class dev.kord.common.entity/ActivityFlag { // dev.kord.common.entity/Act } sealed class dev.kord.common.entity/ActivityType { // dev.kord.common.entity/ActivityType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ActivityType.|(kotlin.Int){}[0] - final val code // dev.kord.common.entity/ActivityType.code|{}code[0] final fun (): kotlin/Int // dev.kord.common.entity/ActivityType.code.|(){}[0] @@ -6961,8 +6943,6 @@ sealed class dev.kord.common.entity/ActivityType { // dev.kord.common.entity/Act } sealed class dev.kord.common.entity/AllowedMentionType { // dev.kord.common.entity/AllowedMentionType|null[0] - constructor (kotlin/String) // dev.kord.common.entity/AllowedMentionType.|(kotlin.String){}[0] - final val value // dev.kord.common.entity/AllowedMentionType.value|{}value[0] final fun (): kotlin/String // dev.kord.common.entity/AllowedMentionType.value.|(){}[0] @@ -6988,8 +6968,6 @@ sealed class dev.kord.common.entity/AllowedMentionType { // dev.kord.common.enti } sealed class dev.kord.common.entity/ApplicationCommandOptionType { // dev.kord.common.entity/ApplicationCommandOptionType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ApplicationCommandOptionType.|(kotlin.Int){}[0] - final val type // dev.kord.common.entity/ApplicationCommandOptionType.type|{}type[0] final fun (): kotlin/Int // dev.kord.common.entity/ApplicationCommandOptionType.type.|(){}[0] @@ -7031,8 +7009,6 @@ sealed class dev.kord.common.entity/ApplicationCommandOptionType { // dev.kord.c } sealed class dev.kord.common.entity/ApplicationCommandPermissionType { // dev.kord.common.entity/ApplicationCommandPermissionType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ApplicationCommandPermissionType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/ApplicationCommandPermissionType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/ApplicationCommandPermissionType.value.|(){}[0] @@ -7058,8 +7034,6 @@ sealed class dev.kord.common.entity/ApplicationCommandPermissionType { // dev.ko } sealed class dev.kord.common.entity/ApplicationCommandType { // dev.kord.common.entity/ApplicationCommandType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ApplicationCommandType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/ApplicationCommandType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/ApplicationCommandType.value.|(){}[0] @@ -7085,8 +7059,6 @@ sealed class dev.kord.common.entity/ApplicationCommandType { // dev.kord.common. } sealed class dev.kord.common.entity/ApplicationFlag { // dev.kord.common.entity/ApplicationFlag|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ApplicationFlag.|(kotlin.Int){}[0] - final val code // dev.kord.common.entity/ApplicationFlag.code|{}code[0] final fun (): kotlin/Int // dev.kord.common.entity/ApplicationFlag.code.|(){}[0] final val shift // dev.kord.common.entity/ApplicationFlag.shift|{}shift[0] @@ -7129,8 +7101,6 @@ sealed class dev.kord.common.entity/ApplicationFlag { // dev.kord.common.entity/ } sealed class dev.kord.common.entity/ApplicationRoleConnectionMetadataType { // dev.kord.common.entity/ApplicationRoleConnectionMetadataType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ApplicationRoleConnectionMetadataType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/ApplicationRoleConnectionMetadataType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/ApplicationRoleConnectionMetadataType.value.|(){}[0] @@ -7166,8 +7136,6 @@ sealed class dev.kord.common.entity/ApplicationRoleConnectionMetadataType { // d } sealed class dev.kord.common.entity/ArchiveDuration { // dev.kord.common.entity/ArchiveDuration|null[0] - constructor (kotlin.time/Duration) // dev.kord.common.entity/ArchiveDuration.|(kotlin.time.Duration){}[0] - final val duration // dev.kord.common.entity/ArchiveDuration.duration|{}duration[0] final fun (): kotlin.time/Duration // dev.kord.common.entity/ArchiveDuration.duration.|(){}[0] @@ -7197,8 +7165,6 @@ sealed class dev.kord.common.entity/ArchiveDuration { // dev.kord.common.entity/ } sealed class dev.kord.common.entity/AttachmentFlag { // dev.kord.common.entity/AttachmentFlag|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/AttachmentFlag.|(kotlin.Int){}[0] - final val shift // dev.kord.common.entity/AttachmentFlag.shift|{}shift[0] final fun (): kotlin/Int // dev.kord.common.entity/AttachmentFlag.shift.|(){}[0] final val value // dev.kord.common.entity/AttachmentFlag.value|{}value[0] @@ -7223,8 +7189,6 @@ sealed class dev.kord.common.entity/AttachmentFlag { // dev.kord.common.entity/A } sealed class dev.kord.common.entity/AuditLogEvent { // dev.kord.common.entity/AuditLogEvent|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/AuditLogEvent.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/AuditLogEvent.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/AuditLogEvent.value.|(){}[0] @@ -7356,8 +7320,6 @@ sealed class dev.kord.common.entity/AuditLogEvent { // dev.kord.common.entity/Au } sealed class dev.kord.common.entity/AutoModerationActionType { // dev.kord.common.entity/AutoModerationActionType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/AutoModerationActionType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/AutoModerationActionType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/AutoModerationActionType.value.|(){}[0] @@ -7383,8 +7345,6 @@ sealed class dev.kord.common.entity/AutoModerationActionType { // dev.kord.commo } sealed class dev.kord.common.entity/AutoModerationRuleEventType { // dev.kord.common.entity/AutoModerationRuleEventType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/AutoModerationRuleEventType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/AutoModerationRuleEventType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/AutoModerationRuleEventType.value.|(){}[0] @@ -7406,8 +7366,6 @@ sealed class dev.kord.common.entity/AutoModerationRuleEventType { // dev.kord.co } sealed class dev.kord.common.entity/AutoModerationRuleKeywordPresetType { // dev.kord.common.entity/AutoModerationRuleKeywordPresetType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/AutoModerationRuleKeywordPresetType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/AutoModerationRuleKeywordPresetType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/AutoModerationRuleKeywordPresetType.value.|(){}[0] @@ -7433,8 +7391,6 @@ sealed class dev.kord.common.entity/AutoModerationRuleKeywordPresetType { // dev } sealed class dev.kord.common.entity/AutoModerationRuleTriggerType { // dev.kord.common.entity/AutoModerationRuleTriggerType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/AutoModerationRuleTriggerType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/AutoModerationRuleTriggerType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/AutoModerationRuleTriggerType.value.|(){}[0] @@ -7462,8 +7418,6 @@ sealed class dev.kord.common.entity/AutoModerationRuleTriggerType { // dev.kord. } sealed class dev.kord.common.entity/ButtonStyle { // dev.kord.common.entity/ButtonStyle|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ButtonStyle.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/ButtonStyle.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/ButtonStyle.value.|(){}[0] @@ -7493,8 +7447,6 @@ sealed class dev.kord.common.entity/ButtonStyle { // dev.kord.common.entity/Butt } sealed class dev.kord.common.entity/ChannelFlag { // dev.kord.common.entity/ChannelFlag|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ChannelFlag.|(kotlin.Int){}[0] - final val code // dev.kord.common.entity/ChannelFlag.code|{}code[0] final fun (): kotlin/Int // dev.kord.common.entity/ChannelFlag.code.|(){}[0] final val shift // dev.kord.common.entity/ChannelFlag.shift|{}shift[0] @@ -7523,8 +7475,6 @@ sealed class dev.kord.common.entity/ChannelFlag { // dev.kord.common.entity/Chan } sealed class dev.kord.common.entity/ChannelType { // dev.kord.common.entity/ChannelType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ChannelType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/ChannelType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/ChannelType.value.|(){}[0] @@ -7570,8 +7520,6 @@ sealed class dev.kord.common.entity/ChannelType { // dev.kord.common.entity/Chan } sealed class dev.kord.common.entity/Choice { // dev.kord.common.entity/Choice|null[0] - constructor () // dev.kord.common.entity/Choice.|(){}[0] - abstract val name // dev.kord.common.entity/Choice.name|{}name[0] abstract fun (): kotlin/String // dev.kord.common.entity/Choice.name.|(){}[0] abstract val nameLocalizations // dev.kord.common.entity/Choice.nameLocalizations|{}nameLocalizations[0] @@ -7642,8 +7590,6 @@ sealed class dev.kord.common.entity/Choice { // dev.kord.common.entity/Choice|nu } sealed class dev.kord.common.entity/ComponentType { // dev.kord.common.entity/ComponentType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ComponentType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/ComponentType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/ComponentType.value.|(){}[0] @@ -7679,8 +7625,6 @@ sealed class dev.kord.common.entity/ComponentType { // dev.kord.common.entity/Co } sealed class dev.kord.common.entity/DefaultMessageNotificationLevel { // dev.kord.common.entity/DefaultMessageNotificationLevel|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/DefaultMessageNotificationLevel.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/DefaultMessageNotificationLevel.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/DefaultMessageNotificationLevel.value.|(){}[0] @@ -7704,8 +7648,6 @@ sealed class dev.kord.common.entity/DefaultMessageNotificationLevel { // dev.kor } sealed class dev.kord.common.entity/DiscordComponent { // dev.kord.common.entity/DiscordComponent|null[0] - constructor () // dev.kord.common.entity/DiscordComponent.|(){}[0] - abstract val channelTypes // dev.kord.common.entity/DiscordComponent.channelTypes|{}channelTypes[0] abstract fun (): dev.kord.common.entity.optional/Optional> // dev.kord.common.entity/DiscordComponent.channelTypes.|(){}[0] abstract val components // dev.kord.common.entity/DiscordComponent.components|{}components[0] @@ -7747,8 +7689,6 @@ sealed class dev.kord.common.entity/DiscordComponent { // dev.kord.common.entity } sealed class dev.kord.common.entity/DiscordConnectionVisibility { // dev.kord.common.entity/DiscordConnectionVisibility|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/DiscordConnectionVisibility.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/DiscordConnectionVisibility.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/DiscordConnectionVisibility.value.|(){}[0] @@ -7772,8 +7712,6 @@ sealed class dev.kord.common.entity/DiscordConnectionVisibility { // dev.kord.co } sealed class dev.kord.common.entity/EmbedType { // dev.kord.common.entity/EmbedType|null[0] - constructor (kotlin/String) // dev.kord.common.entity/EmbedType.|(kotlin.String){}[0] - final val value // dev.kord.common.entity/EmbedType.value|{}value[0] final fun (): kotlin/String // dev.kord.common.entity/EmbedType.value.|(){}[0] @@ -7805,8 +7743,6 @@ sealed class dev.kord.common.entity/EmbedType { // dev.kord.common.entity/EmbedT } sealed class dev.kord.common.entity/ExplicitContentFilter { // dev.kord.common.entity/ExplicitContentFilter|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ExplicitContentFilter.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/ExplicitContentFilter.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/ExplicitContentFilter.value.|(){}[0] @@ -7832,8 +7768,6 @@ sealed class dev.kord.common.entity/ExplicitContentFilter { // dev.kord.common.e } sealed class dev.kord.common.entity/ForumLayoutType { // dev.kord.common.entity/ForumLayoutType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ForumLayoutType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/ForumLayoutType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/ForumLayoutType.value.|(){}[0] @@ -7859,8 +7793,6 @@ sealed class dev.kord.common.entity/ForumLayoutType { // dev.kord.common.entity/ } sealed class dev.kord.common.entity/GuildFeature { // dev.kord.common.entity/GuildFeature|null[0] - constructor (kotlin/String) // dev.kord.common.entity/GuildFeature.|(kotlin.String){}[0] - final val value // dev.kord.common.entity/GuildFeature.value|{}value[0] final fun (): kotlin/String // dev.kord.common.entity/GuildFeature.value.|(){}[0] @@ -7934,8 +7866,6 @@ sealed class dev.kord.common.entity/GuildFeature { // dev.kord.common.entity/Gui } sealed class dev.kord.common.entity/GuildMemberFlag { // dev.kord.common.entity/GuildMemberFlag|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/GuildMemberFlag.|(kotlin.Int){}[0] - final val code // dev.kord.common.entity/GuildMemberFlag.code|{}code[0] final fun (): kotlin/Int // dev.kord.common.entity/GuildMemberFlag.code.|(){}[0] final val shift // dev.kord.common.entity/GuildMemberFlag.shift|{}shift[0] @@ -7966,8 +7896,6 @@ sealed class dev.kord.common.entity/GuildMemberFlag { // dev.kord.common.entity/ } sealed class dev.kord.common.entity/GuildScheduledEventPrivacyLevel { // dev.kord.common.entity/GuildScheduledEventPrivacyLevel|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/GuildScheduledEventPrivacyLevel.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/GuildScheduledEventPrivacyLevel.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/GuildScheduledEventPrivacyLevel.value.|(){}[0] @@ -7989,8 +7917,6 @@ sealed class dev.kord.common.entity/GuildScheduledEventPrivacyLevel { // dev.kor } sealed class dev.kord.common.entity/GuildScheduledEventStatus { // dev.kord.common.entity/GuildScheduledEventStatus|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/GuildScheduledEventStatus.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/GuildScheduledEventStatus.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/GuildScheduledEventStatus.value.|(){}[0] @@ -8018,8 +7944,6 @@ sealed class dev.kord.common.entity/GuildScheduledEventStatus { // dev.kord.comm } sealed class dev.kord.common.entity/IntegrationExpireBehavior { // dev.kord.common.entity/IntegrationExpireBehavior|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/IntegrationExpireBehavior.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/IntegrationExpireBehavior.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/IntegrationExpireBehavior.value.|(){}[0] @@ -8043,8 +7967,6 @@ sealed class dev.kord.common.entity/IntegrationExpireBehavior { // dev.kord.comm } sealed class dev.kord.common.entity/InteractionResponseType { // dev.kord.common.entity/InteractionResponseType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/InteractionResponseType.|(kotlin.Int){}[0] - final val type // dev.kord.common.entity/InteractionResponseType.type|{}type[0] final fun (): kotlin/Int // dev.kord.common.entity/InteractionResponseType.type.|(){}[0] @@ -8078,8 +8000,6 @@ sealed class dev.kord.common.entity/InteractionResponseType { // dev.kord.common } sealed class dev.kord.common.entity/InteractionType { // dev.kord.common.entity/InteractionType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/InteractionType.|(kotlin.Int){}[0] - final val type // dev.kord.common.entity/InteractionType.type|{}type[0] final fun (): kotlin/Int // dev.kord.common.entity/InteractionType.type.|(){}[0] @@ -8109,8 +8029,6 @@ sealed class dev.kord.common.entity/InteractionType { // dev.kord.common.entity/ } sealed class dev.kord.common.entity/InviteTargetType { // dev.kord.common.entity/InviteTargetType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/InviteTargetType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/InviteTargetType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/InviteTargetType.value.|(){}[0] @@ -8134,8 +8052,6 @@ sealed class dev.kord.common.entity/InviteTargetType { // dev.kord.common.entity } sealed class dev.kord.common.entity/MFALevel { // dev.kord.common.entity/MFALevel|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/MFALevel.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/MFALevel.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/MFALevel.value.|(){}[0] @@ -8159,8 +8075,6 @@ sealed class dev.kord.common.entity/MFALevel { // dev.kord.common.entity/MFALeve } sealed class dev.kord.common.entity/MessageActivityType { // dev.kord.common.entity/MessageActivityType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/MessageActivityType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/MessageActivityType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/MessageActivityType.value.|(){}[0] @@ -8188,8 +8102,6 @@ sealed class dev.kord.common.entity/MessageActivityType { // dev.kord.common.ent } sealed class dev.kord.common.entity/MessageFlag { // dev.kord.common.entity/MessageFlag|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/MessageFlag.|(kotlin.Int){}[0] - final val code // dev.kord.common.entity/MessageFlag.code|{}code[0] final fun (): kotlin/Int // dev.kord.common.entity/MessageFlag.code.|(){}[0] final val shift // dev.kord.common.entity/MessageFlag.shift|{}shift[0] @@ -8234,8 +8146,6 @@ sealed class dev.kord.common.entity/MessageFlag { // dev.kord.common.entity/Mess } sealed class dev.kord.common.entity/MessageStickerType { // dev.kord.common.entity/MessageStickerType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/MessageStickerType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/MessageStickerType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/MessageStickerType.value.|(){}[0] @@ -8263,8 +8173,6 @@ sealed class dev.kord.common.entity/MessageStickerType { // dev.kord.common.enti } sealed class dev.kord.common.entity/MessageType { // dev.kord.common.entity/MessageType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/MessageType.|(kotlin.Int){}[0] - final val code // dev.kord.common.entity/MessageType.code|{}code[0] final fun (): kotlin/Int // dev.kord.common.entity/MessageType.code.|(){}[0] @@ -8346,8 +8254,6 @@ sealed class dev.kord.common.entity/MessageType { // dev.kord.common.entity/Mess } sealed class dev.kord.common.entity/NsfwLevel { // dev.kord.common.entity/NsfwLevel|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/NsfwLevel.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/NsfwLevel.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/NsfwLevel.value.|(){}[0] @@ -8375,8 +8281,6 @@ sealed class dev.kord.common.entity/NsfwLevel { // dev.kord.common.entity/NsfwLe } sealed class dev.kord.common.entity/OnboardingMode { // dev.kord.common.entity/OnboardingMode|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/OnboardingMode.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/OnboardingMode.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/OnboardingMode.value.|(){}[0] @@ -8400,8 +8304,6 @@ sealed class dev.kord.common.entity/OnboardingMode { // dev.kord.common.entity/O } sealed class dev.kord.common.entity/OnboardingPromptType { // dev.kord.common.entity/OnboardingPromptType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/OnboardingPromptType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/OnboardingPromptType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/OnboardingPromptType.value.|(){}[0] @@ -8425,8 +8327,6 @@ sealed class dev.kord.common.entity/OnboardingPromptType { // dev.kord.common.en } sealed class dev.kord.common.entity/Option { // dev.kord.common.entity/Option|null[0] - constructor () // dev.kord.common.entity/Option.|(){}[0] - abstract val name // dev.kord.common.entity/Option.name|{}name[0] abstract fun (): kotlin/String // dev.kord.common.entity/Option.name.|(){}[0] abstract val type // dev.kord.common.entity/Option.type|{}type[0] @@ -8438,8 +8338,6 @@ sealed class dev.kord.common.entity/Option { // dev.kord.common.entity/Option|nu } sealed class dev.kord.common.entity/OverwriteType { // dev.kord.common.entity/OverwriteType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/OverwriteType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/OverwriteType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/OverwriteType.value.|(){}[0] @@ -8463,8 +8361,6 @@ sealed class dev.kord.common.entity/OverwriteType { // dev.kord.common.entity/Ov } sealed class dev.kord.common.entity/Permission { // dev.kord.common.entity/Permission|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/Permission.|(kotlin.Int){}[0] - final val code // dev.kord.common.entity/Permission.code|{}code[0] final fun (): dev.kord.common/DiscordBitSet // dev.kord.common.entity/Permission.code.|(){}[0] final val shift // dev.kord.common.entity/Permission.shift|{}shift[0] @@ -8581,8 +8477,6 @@ sealed class dev.kord.common.entity/Permission { // dev.kord.common.entity/Permi } sealed class dev.kord.common.entity/PremiumTier { // dev.kord.common.entity/PremiumTier|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/PremiumTier.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/PremiumTier.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/PremiumTier.value.|(){}[0] @@ -8610,8 +8504,6 @@ sealed class dev.kord.common.entity/PremiumTier { // dev.kord.common.entity/Prem } sealed class dev.kord.common.entity/PresenceStatus { // dev.kord.common.entity/PresenceStatus|null[0] - constructor (kotlin/String) // dev.kord.common.entity/PresenceStatus.|(kotlin.String){}[0] - final val value // dev.kord.common.entity/PresenceStatus.value|{}value[0] final fun (): kotlin/String // dev.kord.common.entity/PresenceStatus.value.|(){}[0] @@ -8641,8 +8533,6 @@ sealed class dev.kord.common.entity/PresenceStatus { // dev.kord.common.entity/P } sealed class dev.kord.common.entity/RoleFlag { // dev.kord.common.entity/RoleFlag|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/RoleFlag.|(kotlin.Int){}[0] - final val shift // dev.kord.common.entity/RoleFlag.shift|{}shift[0] final fun (): kotlin/Int // dev.kord.common.entity/RoleFlag.shift.|(){}[0] final val value // dev.kord.common.entity/RoleFlag.value|{}value[0] @@ -8667,8 +8557,6 @@ sealed class dev.kord.common.entity/RoleFlag { // dev.kord.common.entity/RoleFla } sealed class dev.kord.common.entity/ScheduledEntityType { // dev.kord.common.entity/ScheduledEntityType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/ScheduledEntityType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/ScheduledEntityType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/ScheduledEntityType.value.|(){}[0] @@ -8694,8 +8582,6 @@ sealed class dev.kord.common.entity/ScheduledEntityType { // dev.kord.common.ent } sealed class dev.kord.common.entity/SelectDefaultValueType { // dev.kord.common.entity/SelectDefaultValueType|null[0] - constructor (kotlin/String) // dev.kord.common.entity/SelectDefaultValueType.|(kotlin.String){}[0] - final val value // dev.kord.common.entity/SelectDefaultValueType.value|{}value[0] final fun (): kotlin/String // dev.kord.common.entity/SelectDefaultValueType.value.|(){}[0] @@ -8721,8 +8607,6 @@ sealed class dev.kord.common.entity/SelectDefaultValueType { // dev.kord.common. } sealed class dev.kord.common.entity/SortOrderType { // dev.kord.common.entity/SortOrderType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/SortOrderType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/SortOrderType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/SortOrderType.value.|(){}[0] @@ -8746,8 +8630,6 @@ sealed class dev.kord.common.entity/SortOrderType { // dev.kord.common.entity/So } sealed class dev.kord.common.entity/StageInstancePrivacyLevel { // dev.kord.common.entity/StageInstancePrivacyLevel|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/StageInstancePrivacyLevel.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/StageInstancePrivacyLevel.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/StageInstancePrivacyLevel.value.|(){}[0] @@ -8771,8 +8653,6 @@ sealed class dev.kord.common.entity/StageInstancePrivacyLevel { // dev.kord.comm } sealed class dev.kord.common.entity/SystemChannelFlag { // dev.kord.common.entity/SystemChannelFlag|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/SystemChannelFlag.|(kotlin.Int){}[0] - final val code // dev.kord.common.entity/SystemChannelFlag.code|{}code[0] final fun (): kotlin/Int // dev.kord.common.entity/SystemChannelFlag.code.|(){}[0] final val shift // dev.kord.common.entity/SystemChannelFlag.shift|{}shift[0] @@ -8807,8 +8687,6 @@ sealed class dev.kord.common.entity/SystemChannelFlag { // dev.kord.common.entit } sealed class dev.kord.common.entity/TeamMemberRole { // dev.kord.common.entity/TeamMemberRole|null[0] - constructor (kotlin/String) // dev.kord.common.entity/TeamMemberRole.|(kotlin.String){}[0] - final val value // dev.kord.common.entity/TeamMemberRole.value|{}value[0] final fun (): kotlin/String // dev.kord.common.entity/TeamMemberRole.value.|(){}[0] @@ -8834,8 +8712,6 @@ sealed class dev.kord.common.entity/TeamMemberRole { // dev.kord.common.entity/T } sealed class dev.kord.common.entity/TeamMembershipState { // dev.kord.common.entity/TeamMembershipState|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/TeamMembershipState.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/TeamMembershipState.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/TeamMembershipState.value.|(){}[0] @@ -8859,8 +8735,6 @@ sealed class dev.kord.common.entity/TeamMembershipState { // dev.kord.common.ent } sealed class dev.kord.common.entity/TextInputStyle { // dev.kord.common.entity/TextInputStyle|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/TextInputStyle.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/TextInputStyle.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/TextInputStyle.value.|(){}[0] @@ -8884,8 +8758,6 @@ sealed class dev.kord.common.entity/TextInputStyle { // dev.kord.common.entity/T } sealed class dev.kord.common.entity/UserFlag { // dev.kord.common.entity/UserFlag|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/UserFlag.|(kotlin.Int){}[0] - final val code // dev.kord.common.entity/UserFlag.code|{}code[0] final fun (): kotlin/Int // dev.kord.common.entity/UserFlag.code.|(){}[0] final val shift // dev.kord.common.entity/UserFlag.shift|{}shift[0] @@ -8938,8 +8810,6 @@ sealed class dev.kord.common.entity/UserFlag { // dev.kord.common.entity/UserFla } sealed class dev.kord.common.entity/UserPremium { // dev.kord.common.entity/UserPremium|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/UserPremium.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/UserPremium.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/UserPremium.value.|(){}[0] @@ -8967,8 +8837,6 @@ sealed class dev.kord.common.entity/UserPremium { // dev.kord.common.entity/User } sealed class dev.kord.common.entity/VerificationLevel { // dev.kord.common.entity/VerificationLevel|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/VerificationLevel.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/VerificationLevel.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/VerificationLevel.value.|(){}[0] @@ -8998,8 +8866,6 @@ sealed class dev.kord.common.entity/VerificationLevel { // dev.kord.common.entit } sealed class dev.kord.common.entity/VideoQualityMode { // dev.kord.common.entity/VideoQualityMode|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/VideoQualityMode.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/VideoQualityMode.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/VideoQualityMode.value.|(){}[0] @@ -9023,8 +8889,6 @@ sealed class dev.kord.common.entity/VideoQualityMode { // dev.kord.common.entity } sealed class dev.kord.common.entity/WebhookType { // dev.kord.common.entity/WebhookType|null[0] - constructor (kotlin/Int) // dev.kord.common.entity/WebhookType.|(kotlin.Int){}[0] - final val value // dev.kord.common.entity/WebhookType.value|{}value[0] final fun (): kotlin/Int // dev.kord.common.entity/WebhookType.value.|(){}[0] @@ -9050,8 +8914,6 @@ sealed class dev.kord.common.entity/WebhookType { // dev.kord.common.entity/Webh } sealed class dev.kord.common.serialization/DurationAsLongSerializer : kotlinx.serialization/KSerializer { // dev.kord.common.serialization/DurationAsLongSerializer|null[0] - constructor (kotlin.time/DurationUnit, kotlin/String) // dev.kord.common.serialization/DurationAsLongSerializer.|(kotlin.time.DurationUnit;kotlin.String){}[0] - final val descriptor // dev.kord.common.serialization/DurationAsLongSerializer.descriptor|{}descriptor[0] final fun (): kotlinx.serialization.descriptors/SerialDescriptor // dev.kord.common.serialization/DurationAsLongSerializer.descriptor.|(){}[0] final val unit // dev.kord.common.serialization/DurationAsLongSerializer.unit|{}unit[0] diff --git a/common/build.gradle.kts b/common/build.gradle.kts index f7a83f890df..0c6a177a319 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -32,8 +32,9 @@ kotlin { dependencies { api(libs.ktor.client.js) - // workaround for https://youtrack.jetbrains.com/issue/KT-43500 - // (intended to be compileOnly in commonMain only) + // workaround for https://youtrack.jetbrains.com/issue/KT-43500 / + // 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) } } diff --git a/core/api/core.klib.api b/core/api/core.klib.api index 1d39196ab5f..31bc5ef8fe3 100644 --- a/core/api/core.klib.api +++ b/core/api/core.klib.api @@ -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 (dev.kord.common.entity/PresenceStatus) // dev.kord.core.entity/ClientStatus.Client.|(dev.kord.common.entity.PresenceStatus){}[0] - final val status // dev.kord.core.entity/ClientStatus.Client.status|{}status[0] final fun (): dev.kord.common.entity/PresenceStatus // dev.kord.core.entity/ClientStatus.Client.status.|(){}[0] @@ -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 () // dev.kord.core.cache.data/ComponentData.|(){}[0] - constructor (kotlin/Int, kotlinx.serialization.internal/SerializationConstructorMarker?) // dev.kord.core.cache.data/ComponentData.|(kotlin.Int;kotlinx.serialization.internal.SerializationConstructorMarker?){}[0] - abstract val channelTypes // dev.kord.core.cache.data/ComponentData.channelTypes|{}channelTypes[0] abstract fun (): dev.kord.common.entity.optional/Optional> // dev.kord.core.cache.data/ComponentData.channelTypes.|(){}[0] abstract val components // dev.kord.core.cache.data/ComponentData.components|{}components[0] @@ -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 (dev.kord.core.cache.data/AutoModerationActionData, dev.kord.core/Kord, dev.kord.common.entity/AutoModerationActionType?) // dev.kord.core.entity.automoderation/AutoModerationAction.|(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 (): dev.kord.common.entity/AutoModerationActionType // dev.kord.core.entity.automoderation/AutoModerationAction.type.|(){}[0] final val data // dev.kord.core.entity.automoderation/AutoModerationAction.data|{}data[0] @@ -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 (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.|(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 (): kotlin.collections/List // dev.kord.core.entity.automoderation/AutoModerationRule.actions.|(){}[0] final val creator // dev.kord.core.entity.automoderation/AutoModerationRule.creator|{}creator[0] @@ -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 (dev.kord.core.cache.data/ComponentData) // dev.kord.core.entity.component/SelectMenuComponent.|(dev.kord.core.cache.data.ComponentData){}[0] - final val customId // dev.kord.core.entity.component/SelectMenuComponent.customId|{}customId[0] final fun (): kotlin/String // dev.kord.core.entity.component/SelectMenuComponent.customId.|(){}[0] final val disabled // dev.kord.core.entity.component/SelectMenuComponent.disabled|{}disabled[0] @@ -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 (dev.kord.core.entity/Message) // dev.kord.core.entity.interaction.followup/FollowupMessage.|(dev.kord.core.entity.Message){}[0] - final val message // dev.kord.core.entity.interaction.followup/FollowupMessage.message|{}message[0] final fun (): dev.kord.core.entity/Message // dev.kord.core.entity.interaction.followup/FollowupMessage.message.|(){}[0] open val channelId // dev.kord.core.entity.interaction.followup/FollowupMessage.channelId|{}channelId[0] @@ -11707,8 +11694,6 @@ 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 (dev.kord.core.entity/Message) // dev.kord.core.entity.interaction.response/MessageInteractionResponse.|(dev.kord.core.entity.Message){}[0] - final val message // dev.kord.core.entity.interaction.response/MessageInteractionResponse.message|{}message[0] final fun (): dev.kord.core.entity/Message // dev.kord.core.entity.interaction.response/MessageInteractionResponse.message.|(){}[0] @@ -11716,8 +11701,6 @@ sealed class dev.kord.core.entity.interaction.response/MessageInteractionRespons } 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 (dev.kord.core/Kord, dev.kord.core.supplier/EntitySupplier = ...) // dev.kord.core.entity/BaseApplication.|(dev.kord.core.Kord;dev.kord.core.supplier.EntitySupplier){}[0] - abstract val data // dev.kord.core.entity/BaseApplication.data|{}data[0] abstract fun (): dev.kord.core.cache.data/BaseApplicationData // dev.kord.core.entity/BaseApplication.data.|(){}[0] final val coverImage // dev.kord.core.entity/BaseApplication.coverImage|{}coverImage[0] @@ -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 () // dev.kord.core.entity/ReactionEmoji.|(){}[0] - abstract val mention // dev.kord.core.entity/ReactionEmoji.mention|{}mention[0] abstract fun (): kotlin/String // dev.kord.core.entity/ReactionEmoji.mention.|(){}[0] abstract val name // dev.kord.core.entity/ReactionEmoji.name|{}name[0] @@ -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 () // dev.kord.core.event.gateway/DisconnectEvent.|(){}[0] - final class DetachEvent : dev.kord.core.event.gateway/DisconnectEvent { // dev.kord.core.event.gateway/DisconnectEvent.DetachEvent|null[0] constructor (dev.kord.core/Kord, kotlin/Int, kotlin/Any?) // dev.kord.core.event.gateway/DisconnectEvent.DetachEvent.|(dev.kord.core.Kord;kotlin.Int;kotlin.Any?){}[0] @@ -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 () // dev.kord.core.event.gateway/GatewayEvent.|(){}[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 { // dev.kord.core.cache.data/NotSerializable|null[0] final val descriptor // dev.kord.core.cache.data/NotSerializable.descriptor|{}descriptor[0] diff --git a/gateway/api/gateway.klib.api b/gateway/api/gateway.klib.api index a3a0da74c31..41a57dd2dc7 100644 --- a/gateway/api/gateway.klib.api +++ b/gateway/api/gateway.klib.api @@ -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 () // dev.kord.gateway/Close.|(){}[0] - final class DiscordClose : dev.kord.gateway/Close { // dev.kord.gateway/Close.DiscordClose|null[0] constructor (dev.kord.gateway/GatewayCloseCode, kotlin/Boolean) // dev.kord.gateway/Close.DiscordClose.|(dev.kord.gateway.GatewayCloseCode;kotlin.Boolean){}[0] @@ -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 () // dev.kord.gateway/Command.|(){}[0] - final class Heartbeat : dev.kord.gateway/Command { // dev.kord.gateway/Command.Heartbeat|null[0] constructor (kotlin/Int?) // dev.kord.gateway/Command.Heartbeat.|(kotlin.Int?){}[0] @@ -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 () // dev.kord.gateway/DispatchEvent.|(){}[0] - abstract val sequence // dev.kord.gateway/DispatchEvent.sequence|{}sequence[0] abstract fun (): kotlin/Int? // dev.kord.gateway/DispatchEvent.sequence.|(){}[0] } sealed class dev.kord.gateway/Event { // dev.kord.gateway/Event|null[0] - constructor () // dev.kord.gateway/Event.|(){}[0] - final object DeserializationStrategy : kotlinx.serialization/DeserializationStrategy { // dev.kord.gateway/Event.DeserializationStrategy|null[0] final val descriptor // dev.kord.gateway/Event.DeserializationStrategy.descriptor|{}descriptor[0] final fun (): kotlinx.serialization.descriptors/SerialDescriptor // dev.kord.gateway/Event.DeserializationStrategy.descriptor.|(){}[0] @@ -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 (kotlin/Int) // dev.kord.gateway/Intent.|(kotlin.Int){}[0] - final val code // dev.kord.gateway/Intent.code|{}code[0] final fun (): dev.kord.common/DiscordBitSet // dev.kord.gateway/Intent.code.|(){}[0] final val shift // dev.kord.gateway/Intent.shift|{}shift[0] diff --git a/gateway/build.gradle.kts b/gateway/build.gradle.kts index c1479ace37b..81cedadaca2 100644 --- a/gateway/build.gradle.kts +++ b/gateway/build.gradle.kts @@ -30,8 +30,9 @@ kotlin { implementation(libs.kotlin.node) implementation(npm("fast-zlib", libs.versions.fastZlib.get())) - // workaround for https://youtrack.jetbrains.com/issue/KT-43500 - // (intended to be compileOnly in commonMain only) + // workaround for https://youtrack.jetbrains.com/issue/KT-43500 / + // 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) } } diff --git a/gradle.properties b/gradle.properties index 07ccbd8972b..79197226527 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,6 +8,10 @@ org.gradle.warning.mode=all org.gradle.kotlin.dsl.allWarningsAsErrors=true kotlin.code.style=official +# https://github.com/Kotlin/kotlinx-atomicfu/issues/448 +# https://youtrack.jetbrains.com/issue/KT-64109#focus=Comments-27-10064206.0-0 +kotlin.suppressGradlePluginWarnings=IncorrectCompileOnlyDependencyWarning + # https://github.com/Kotlin/kotlinx-atomicfu#atomicfu-compiler-plugin kotlinx.atomicfu.enableJvmIrTransformation=true kotlinx.atomicfu.enableJsIrTransformation=true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9010d4761a6..3d4637bd0a9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] # api dependencies -kotlin = "2.0.0" # https://github.com/JetBrains/kotlin +kotlin = "2.0.20" # 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 @@ -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.0-1.0.23" # https://github.com/google/ksp +ksp = "2.0.20-1.0.24" # https://github.com/google/ksp kotlinpoet = "1.18.1" # https://github.com/square/kotlinpoet # tests diff --git a/kotlin-js-store/yarn.lock b/kotlin-js-store/yarn.lock index 70a1723488f..493392acc4e 100644 --- a/kotlin-js-store/yarn.lock +++ b/kotlin-js-store/yarn.lock @@ -14,10 +14,10 @@ abort-controller@3.0.0: dependencies: event-target-shim "^5.0.0" -ansi-colors@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== +ansi-colors@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== ansi-regex@^5.0.1: version "5.0.1" @@ -68,7 +68,7 @@ braces@~3.0.2: dependencies: fill-range "^7.0.1" -browser-stdout@1.3.1: +browser-stdout@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== @@ -91,10 +91,10 @@ chalk@^4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chokidar@3.5.3: - version "3.5.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== +chokidar@^3.5.3: + version "3.6.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" + integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== dependencies: anymatch "~3.1.2" braces "~3.0.2" @@ -127,10 +127,10 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -debug@4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== +debug@^4.3.5: + version "4.3.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" + integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== dependencies: ms "2.1.2" @@ -139,10 +139,10 @@ decamelize@^4.0.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== -diff@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" - integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== +diff@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.2.0.tgz#26ded047cd1179b78b9537d5ef725503ce1ae531" + integrity sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A== emoji-regex@^8.0.0: version "8.0.0" @@ -154,7 +154,7 @@ escalade@^3.1.1: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== -escape-string-regexp@4.0.0: +escape-string-regexp@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== @@ -176,7 +176,7 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -find-up@5.0.0: +find-up@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== @@ -216,7 +216,7 @@ glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" -glob@8.1.0: +glob@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== @@ -232,7 +232,7 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -he@1.2.0: +he@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== @@ -289,7 +289,7 @@ is-unicode-supported@^0.1.0: resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== -js-yaml@4.1.0: +js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== @@ -303,7 +303,7 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" -log-symbols@4.1.0: +log-symbols@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== @@ -311,52 +311,45 @@ log-symbols@4.1.0: chalk "^4.1.0" is-unicode-supported "^0.1.0" -minimatch@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" - integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== - dependencies: - brace-expansion "^2.0.1" - -minimatch@^5.0.1: +minimatch@^5.0.1, minimatch@^5.1.6: version "5.1.6" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== dependencies: brace-expansion "^2.0.1" -mocha@10.3.0: - version "10.3.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.3.0.tgz#0e185c49e6dccf582035c05fa91084a4ff6e3fe9" - integrity sha512-uF2XJs+7xSLsrmIvn37i/wnc91nw7XjOQB8ccyx5aEgdnohr7n+rEiZP23WkCYHjilR6+EboEnbq/ZQDz4LSbg== - dependencies: - ansi-colors "4.1.1" - browser-stdout "1.3.1" - chokidar "3.5.3" - debug "4.3.4" - diff "5.0.0" - escape-string-regexp "4.0.0" - find-up "5.0.0" - glob "8.1.0" - he "1.2.0" - js-yaml "4.1.0" - log-symbols "4.1.0" - minimatch "5.0.1" - ms "2.1.3" - serialize-javascript "6.0.0" - strip-json-comments "3.1.1" - supports-color "8.1.1" - workerpool "6.2.1" - yargs "16.2.0" - yargs-parser "20.2.4" - yargs-unparser "2.0.0" +mocha@10.7.0: + version "10.7.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.7.0.tgz#9e5cbed8fa9b37537a25bd1f7fb4f6fc45458b9a" + integrity sha512-v8/rBWr2VO5YkspYINnvu81inSz2y3ODJrhO175/Exzor1RcEZZkizgE2A+w/CAXXoESS8Kys5E62dOHGHzULA== + dependencies: + ansi-colors "^4.1.3" + browser-stdout "^1.3.1" + chokidar "^3.5.3" + debug "^4.3.5" + diff "^5.2.0" + escape-string-regexp "^4.0.0" + find-up "^5.0.0" + glob "^8.1.0" + he "^1.2.0" + js-yaml "^4.1.0" + log-symbols "^4.1.0" + minimatch "^5.1.6" + ms "^2.1.3" + serialize-javascript "^6.0.2" + strip-json-comments "^3.1.1" + supports-color "^8.1.1" + workerpool "^6.5.1" + yargs "^16.2.0" + yargs-parser "^20.2.9" + yargs-unparser "^2.0.0" ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3: +ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -428,10 +421,10 @@ safe-buffer@^5.1.0: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -serialize-javascript@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" - integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== +serialize-javascript@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" + integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== dependencies: randombytes "^2.1.0" @@ -464,18 +457,11 @@ strip-ansi@^6.0.0, strip-ansi@^6.0.1: dependencies: ansi-regex "^5.0.1" -strip-json-comments@3.1.1: +strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -supports-color@8.1.1: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" @@ -483,6 +469,13 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" +supports-color@^8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" @@ -495,10 +488,10 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== -typescript@5.4.3: - version "5.4.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.3.tgz#5c6fedd4c87bee01cd7a528a30145521f8e0feff" - integrity sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg== +typescript@5.5.4: + version "5.5.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba" + integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== webidl-conversions@^3.0.0: version "3.0.1" @@ -513,10 +506,10 @@ whatwg-url@^5.0.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" -workerpool@6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" - integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== +workerpool@^6.5.1: + version "6.5.1" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544" + integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA== wrap-ansi@^7.0.0: version "7.0.0" @@ -542,17 +535,12 @@ y18n@^5.0.5: resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== -yargs-parser@20.2.4: - version "20.2.4" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" - integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== - -yargs-parser@^20.2.2: +yargs-parser@^20.2.2, yargs-parser@^20.2.9: version "20.2.9" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== -yargs-unparser@2.0.0: +yargs-unparser@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== @@ -562,7 +550,7 @@ yargs-unparser@2.0.0: flat "^5.0.2" is-plain-obj "^2.1.0" -yargs@16.2.0: +yargs@^16.2.0: version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== diff --git a/ksp-annotations/build.gradle.kts b/ksp-annotations/build.gradle.kts index 0c68a988730..ab5cd1ad016 100644 --- a/ksp-annotations/build.gradle.kts +++ b/ksp-annotations/build.gradle.kts @@ -3,7 +3,9 @@ import org.jetbrains.dokka.gradle.AbstractDokkaLeafTask plugins { `kord-internal-multiplatform-module` - // workaround for https://youtrack.jetbrains.com/issue/KT-43500 (not intended to be published) + // workaround for https://youtrack.jetbrains.com/issue/KT-43500 / + // 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` } diff --git a/ksp-processors/src/main/kotlin/generation/bitflags/BitFlagsGeneration.kt b/ksp-processors/src/main/kotlin/generation/bitflags/BitFlagsGeneration.kt index 10ae5f009c2..72697797fc1 100644 --- a/ksp-processors/src/main/kotlin/generation/bitflags/BitFlagsGeneration.kt +++ b/ksp-processors/src/main/kotlin/generation/bitflags/BitFlagsGeneration.kt @@ -1,3 +1,5 @@ +@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED") + package dev.kord.ksp.generation.bitflags import com.google.devtools.ksp.symbol.KSFile diff --git a/ksp-processors/src/main/kotlin/generation/bitflags/Builder.kt b/ksp-processors/src/main/kotlin/generation/bitflags/Builder.kt index 5bccf4fe2b3..ca0ad0acbba 100644 --- a/ksp-processors/src/main/kotlin/generation/bitflags/Builder.kt +++ b/ksp-processors/src/main/kotlin/generation/bitflags/Builder.kt @@ -1,3 +1,5 @@ +@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED") + package dev.kord.ksp.generation.bitflags import com.squareup.kotlinpoet.ClassName diff --git a/ksp-processors/src/main/kotlin/generation/bitflags/ContainsPlusMinusCopy.kt b/ksp-processors/src/main/kotlin/generation/bitflags/ContainsPlusMinusCopy.kt index 629fc6ae5db..f32bf1d10ab 100644 --- a/ksp-processors/src/main/kotlin/generation/bitflags/ContainsPlusMinusCopy.kt +++ b/ksp-processors/src/main/kotlin/generation/bitflags/ContainsPlusMinusCopy.kt @@ -1,3 +1,5 @@ +@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED") + package dev.kord.ksp.generation.bitflags import com.squareup.kotlinpoet.* diff --git a/ksp-processors/src/main/kotlin/generation/bitflags/DeprecatedNewCompanion.kt b/ksp-processors/src/main/kotlin/generation/bitflags/DeprecatedNewCompanion.kt index 9751b2e0187..ffb0973676c 100644 --- a/ksp-processors/src/main/kotlin/generation/bitflags/DeprecatedNewCompanion.kt +++ b/ksp-processors/src/main/kotlin/generation/bitflags/DeprecatedNewCompanion.kt @@ -1,3 +1,5 @@ +@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED") + package dev.kord.ksp.generation.bitflags import com.squareup.kotlinpoet.DelicateKotlinPoetApi diff --git a/ksp-processors/src/main/kotlin/generation/bitflags/Documentation.kt b/ksp-processors/src/main/kotlin/generation/bitflags/Documentation.kt index 0445a7f46a2..b54275be9b7 100644 --- a/ksp-processors/src/main/kotlin/generation/bitflags/Documentation.kt +++ b/ksp-processors/src/main/kotlin/generation/bitflags/Documentation.kt @@ -1,3 +1,5 @@ +@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED") + package dev.kord.ksp.generation.bitflags import com.squareup.kotlinpoet.CodeBlock diff --git a/ksp-processors/src/main/kotlin/generation/bitflags/FactoryFunctions.kt b/ksp-processors/src/main/kotlin/generation/bitflags/FactoryFunctions.kt index 8d62c4af4e1..5658590aeeb 100644 --- a/ksp-processors/src/main/kotlin/generation/bitflags/FactoryFunctions.kt +++ b/ksp-processors/src/main/kotlin/generation/bitflags/FactoryFunctions.kt @@ -1,3 +1,5 @@ +@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED") + package dev.kord.ksp.generation.bitflags import com.squareup.kotlinpoet.* diff --git a/ksp-processors/src/main/kotlin/generation/bitflags/Serializer.kt b/ksp-processors/src/main/kotlin/generation/bitflags/Serializer.kt index 1da43eefe47..130c08dd9fc 100644 --- a/ksp-processors/src/main/kotlin/generation/bitflags/Serializer.kt +++ b/ksp-processors/src/main/kotlin/generation/bitflags/Serializer.kt @@ -1,3 +1,5 @@ +@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED") + package dev.kord.ksp.generation.bitflags import com.squareup.kotlinpoet.KModifier.OVERRIDE diff --git a/ksp-processors/src/main/kotlin/generation/kordenum/Serializer.kt b/ksp-processors/src/main/kotlin/generation/kordenum/Serializer.kt index 91a13cd0493..864ed48e039 100644 --- a/ksp-processors/src/main/kotlin/generation/kordenum/Serializer.kt +++ b/ksp-processors/src/main/kotlin/generation/kordenum/Serializer.kt @@ -1,3 +1,5 @@ +@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED") + package dev.kord.ksp.generation.kordenum import com.squareup.kotlinpoet.KModifier.OVERRIDE diff --git a/ksp-processors/src/main/kotlin/generation/shared/EqualsHashCodeToString.kt b/ksp-processors/src/main/kotlin/generation/shared/EqualsHashCodeToString.kt index 79419e2fa17..b82c7031c88 100644 --- a/ksp-processors/src/main/kotlin/generation/shared/EqualsHashCodeToString.kt +++ b/ksp-processors/src/main/kotlin/generation/shared/EqualsHashCodeToString.kt @@ -1,3 +1,5 @@ +@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED") + package dev.kord.ksp.generation.shared import com.squareup.kotlinpoet.ClassName diff --git a/ksp-processors/src/main/kotlin/generation/shared/FileSpecForGenerationEntity.kt b/ksp-processors/src/main/kotlin/generation/shared/FileSpecForGenerationEntity.kt index e59208b219f..9021e12cdbc 100644 --- a/ksp-processors/src/main/kotlin/generation/shared/FileSpecForGenerationEntity.kt +++ b/ksp-processors/src/main/kotlin/generation/shared/FileSpecForGenerationEntity.kt @@ -1,3 +1,5 @@ +@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED") + package dev.kord.ksp.generation.shared import com.google.devtools.ksp.symbol.KSFile diff --git a/ksp-processors/src/main/kotlin/generation/shared/OptIns.kt b/ksp-processors/src/main/kotlin/generation/shared/OptIns.kt index 6231e76a2c4..23bdf44c843 100644 --- a/ksp-processors/src/main/kotlin/generation/shared/OptIns.kt +++ b/ksp-processors/src/main/kotlin/generation/shared/OptIns.kt @@ -1,3 +1,5 @@ +@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED") + package dev.kord.ksp.generation.shared import com.squareup.kotlinpoet.Annotatable diff --git a/ksp-processors/src/main/kotlin/generation/shared/SharedContent.kt b/ksp-processors/src/main/kotlin/generation/shared/SharedContent.kt index 5208a238370..7ec592410b4 100644 --- a/ksp-processors/src/main/kotlin/generation/shared/SharedContent.kt +++ b/ksp-processors/src/main/kotlin/generation/shared/SharedContent.kt @@ -1,3 +1,5 @@ +@file:Suppress("CONTEXT_RECEIVERS_DEPRECATED") + package dev.kord.ksp.generation.shared import com.squareup.kotlinpoet.* diff --git a/rest/api/rest.klib.api b/rest/api/rest.klib.api index 5a0bc4b8049..8735e4d1bb5 100644 --- a/rest/api/rest.klib.api +++ b/rest/api/rest.klib.api @@ -6877,9 +6877,6 @@ final class dev.kord.rest/Image { // dev.kord.rest/Image|null[0] } sealed class Format { // dev.kord.rest/Image.Format|null[0] - constructor (kotlin.collections/List) // dev.kord.rest/Image.Format.|(kotlin.collections.List){}[0] - constructor (kotlin/Array...) // dev.kord.rest/Image.Format.|(kotlin.Array...){}[0] - final val extension // dev.kord.rest/Image.Format.extension|{}extension[0] final fun (): kotlin/String // dev.kord.rest/Image.Format.extension.|(){}[0] final val extensions // dev.kord.rest/Image.Format.extensions|{}extensions[0] @@ -6970,8 +6967,6 @@ final value class dev.kord.rest.ratelimit/Total { // dev.kord.rest.ratelimit/Tot } sealed class <#A: kotlin/Any, #B: kotlin/Any?> dev.kord.rest.request/Request { // dev.kord.rest.request/Request|null[0] - constructor (kotlin/String = ...) // dev.kord.rest.request/Request.|(kotlin.String){}[0] - abstract val body // dev.kord.rest.request/Request.body|{}body[0] abstract fun (): dev.kord.rest.request/RequestBody<#A>? // dev.kord.rest.request/Request.body.|(){}[0] abstract val files // dev.kord.rest.request/Request.files|{}files[0] @@ -6991,8 +6986,6 @@ sealed class <#A: kotlin/Any, #B: kotlin/Any?> dev.kord.rest.request/Request { / } sealed class <#A: kotlin/Any?, #B: dev.kord.common.entity/Choice> dev.kord.rest.builder.interaction/BaseChoiceBuilder : dev.kord.rest.builder.interaction/OptionsBuilder { // dev.kord.rest.builder.interaction/BaseChoiceBuilder|null[0] - constructor (kotlin/String, kotlin/String, dev.kord.common.entity/ApplicationCommandOptionType) // dev.kord.rest.builder.interaction/BaseChoiceBuilder.|(kotlin.String;kotlin.String;dev.kord.common.entity.ApplicationCommandOptionType){}[0] - final var choices // dev.kord.rest.builder.interaction/BaseChoiceBuilder.choices|{}choices[0] final fun (): kotlin.collections/MutableList<#B>? // dev.kord.rest.builder.interaction/BaseChoiceBuilder.choices.|(){}[0] final fun (kotlin.collections/MutableList<#B>?) // dev.kord.rest.builder.interaction/BaseChoiceBuilder.choices.|(kotlin.collections.MutableList<1:1>?){}[0] @@ -7003,9 +6996,6 @@ sealed class <#A: kotlin/Any?, #B: dev.kord.common.entity/Choice> dev.kord.rest. } sealed class <#A: kotlin/Any?> dev.kord.rest.route/Route { // dev.kord.rest.route/Route|null[0] - constructor (io.ktor.http/HttpMethod, kotlin/String, dev.kord.rest.route/ResponseMapper<#A>, kotlin/Boolean = ...) // dev.kord.rest.route/Route.|(io.ktor.http.HttpMethod;kotlin.String;dev.kord.rest.route.ResponseMapper<1:0>;kotlin.Boolean){}[0] - constructor (io.ktor.http/HttpMethod, kotlin/String, kotlinx.serialization/DeserializationStrategy<#A>, kotlin/Boolean = ...) // dev.kord.rest.route/Route.|(io.ktor.http.HttpMethod;kotlin.String;kotlinx.serialization.DeserializationStrategy<1:0>;kotlin.Boolean){}[0] - final val mapper // dev.kord.rest.route/Route.mapper|{}mapper[0] final fun (): dev.kord.rest.route/ResponseMapper<#A> // dev.kord.rest.route/Route.mapper.|(){}[0] final val method // dev.kord.rest.route/Route.method|{}method[0] @@ -7419,8 +7409,6 @@ sealed class <#A: kotlin/Any?> dev.kord.rest.route/Route { // dev.kord.rest.rout } sealed class <#A: kotlin/Number, #B: dev.kord.common.entity/Choice> dev.kord.rest.builder.interaction/NumericOptionBuilder : dev.kord.rest.builder.interaction/BaseChoiceBuilder<#A, #B> { // dev.kord.rest.builder.interaction/NumericOptionBuilder|null[0] - constructor (kotlin/String, kotlin/String, dev.kord.common.entity/ApplicationCommandOptionType) // dev.kord.rest.builder.interaction/NumericOptionBuilder.|(kotlin.String;kotlin.String;dev.kord.common.entity.ApplicationCommandOptionType){}[0] - final var maxValue // dev.kord.rest.builder.interaction/NumericOptionBuilder.maxValue|{}maxValue[0] final fun (): #A? // dev.kord.rest.builder.interaction/NumericOptionBuilder.maxValue.|(){}[0] final fun (#A?) // dev.kord.rest.builder.interaction/NumericOptionBuilder.maxValue.|(1:0?){}[0] @@ -7432,8 +7420,6 @@ sealed class <#A: kotlin/Number, #B: dev.kord.common.entity/Choice> dev.kord.res } sealed class dev.kord.rest.builder.automoderation/AutoModerationActionBuilder : dev.kord.rest.builder/RequestBuilder { // dev.kord.rest.builder.automoderation/AutoModerationActionBuilder|null[0] - constructor () // dev.kord.rest.builder.automoderation/AutoModerationActionBuilder.|(){}[0] - abstract val type // dev.kord.rest.builder.automoderation/AutoModerationActionBuilder.type|{}type[0] abstract fun (): dev.kord.common.entity/AutoModerationActionType // dev.kord.rest.builder.automoderation/AutoModerationActionBuilder.type.|(){}[0] @@ -7442,8 +7428,6 @@ sealed class dev.kord.rest.builder.automoderation/AutoModerationActionBuilder : } sealed class dev.kord.rest.builder.automoderation/AutoModerationRuleCreateBuilder : dev.kord.rest.builder.automoderation/TypedAutoModerationRuleBuilder, dev.kord.rest.builder/AuditRequestBuilder { // dev.kord.rest.builder.automoderation/AutoModerationRuleCreateBuilder|null[0] - constructor (kotlin/String, dev.kord.common.entity/AutoModerationRuleEventType) // dev.kord.rest.builder.automoderation/AutoModerationRuleCreateBuilder.|(kotlin.String;dev.kord.common.entity.AutoModerationRuleEventType){}[0] - final var actions // dev.kord.rest.builder.automoderation/AutoModerationRuleCreateBuilder.actions|{}actions[0] final fun (): kotlin.collections/MutableList // dev.kord.rest.builder.automoderation/AutoModerationRuleCreateBuilder.actions.|(){}[0] final fun (kotlin.collections/MutableList) // dev.kord.rest.builder.automoderation/AutoModerationRuleCreateBuilder.actions.|(kotlin.collections.MutableList){}[0] @@ -7474,8 +7458,6 @@ sealed class dev.kord.rest.builder.automoderation/AutoModerationRuleCreateBuilde } sealed class dev.kord.rest.builder.automoderation/AutoModerationRuleModifyBuilder : dev.kord.rest.builder.automoderation/AutoModerationRuleBuilder, dev.kord.rest.builder/AuditRequestBuilder { // dev.kord.rest.builder.automoderation/AutoModerationRuleModifyBuilder|null[0] - constructor () // dev.kord.rest.builder.automoderation/AutoModerationRuleModifyBuilder.|(){}[0] - final var actions // dev.kord.rest.builder.automoderation/AutoModerationRuleModifyBuilder.actions|{}actions[0] final fun (): kotlin.collections/MutableList? // dev.kord.rest.builder.automoderation/AutoModerationRuleModifyBuilder.actions.|(){}[0] final fun (kotlin.collections/MutableList?) // dev.kord.rest.builder.automoderation/AutoModerationRuleModifyBuilder.actions.|(kotlin.collections.MutableList?){}[0] @@ -7506,8 +7488,6 @@ sealed class dev.kord.rest.builder.automoderation/AutoModerationRuleModifyBuilde } sealed class dev.kord.rest.builder.component/ActionRowComponentBuilder : dev.kord.rest.builder.component/ComponentBuilder { // dev.kord.rest.builder.component/ActionRowComponentBuilder|null[0] - constructor () // dev.kord.rest.builder.component/ActionRowComponentBuilder.|(){}[0] - final var _disabled // dev.kord.rest.builder.component/ActionRowComponentBuilder._disabled|{}_disabled[0] final fun (): dev.kord.common.entity.optional/OptionalBoolean // dev.kord.rest.builder.component/ActionRowComponentBuilder._disabled.|(){}[0] final var disabled // dev.kord.rest.builder.component/ActionRowComponentBuilder.disabled|{}disabled[0] @@ -7516,8 +7496,6 @@ sealed class dev.kord.rest.builder.component/ActionRowComponentBuilder : dev.kor } sealed class dev.kord.rest.builder.component/ButtonBuilder : dev.kord.rest.builder.component/ActionRowComponentBuilder { // dev.kord.rest.builder.component/ButtonBuilder|null[0] - constructor () // dev.kord.rest.builder.component/ButtonBuilder.|(){}[0] - final var _emoji // dev.kord.rest.builder.component/ButtonBuilder._emoji|{}_emoji[0] final fun (): dev.kord.common.entity.optional/Optional // dev.kord.rest.builder.component/ButtonBuilder._emoji.|(){}[0] final var _label // dev.kord.rest.builder.component/ButtonBuilder._label|{}_label[0] @@ -7556,8 +7534,6 @@ sealed class dev.kord.rest.builder.component/ButtonBuilder : dev.kord.rest.build } sealed class dev.kord.rest.builder.component/SelectMenuBuilder : dev.kord.rest.builder.component/ActionRowComponentBuilder { // dev.kord.rest.builder.component/SelectMenuBuilder|null[0] - constructor (kotlin/String) // dev.kord.rest.builder.component/SelectMenuBuilder.|(kotlin.String){}[0] - abstract val type // dev.kord.rest.builder.component/SelectMenuBuilder.type|{}type[0] abstract fun (): dev.kord.common.entity/ComponentType // dev.kord.rest.builder.component/SelectMenuBuilder.type.|(){}[0] @@ -7578,8 +7554,6 @@ sealed class dev.kord.rest.builder.component/SelectMenuBuilder : dev.kord.rest.b } sealed class dev.kord.rest.builder.interaction/BaseCommandOptionBuilder : dev.kord.rest.builder.interaction/OptionsBuilder { // dev.kord.rest.builder.interaction/BaseCommandOptionBuilder|null[0] - constructor (kotlin/String, kotlin/String, dev.kord.common.entity/ApplicationCommandOptionType) // dev.kord.rest.builder.interaction/BaseCommandOptionBuilder.|(kotlin.String;kotlin.String;dev.kord.common.entity.ApplicationCommandOptionType){}[0] - final var options // dev.kord.rest.builder.interaction/BaseCommandOptionBuilder.options|{}options[0] final fun (): kotlin.collections/MutableList? // dev.kord.rest.builder.interaction/BaseCommandOptionBuilder.options.|(){}[0] final fun (kotlin.collections/MutableList?) // dev.kord.rest.builder.interaction/BaseCommandOptionBuilder.options.|(kotlin.collections.MutableList?){}[0] @@ -7588,8 +7562,6 @@ sealed class dev.kord.rest.builder.interaction/BaseCommandOptionBuilder : dev.ko } sealed class dev.kord.rest.builder.interaction/MultiApplicationCommandBuilder { // dev.kord.rest.builder.interaction/MultiApplicationCommandBuilder|null[0] - constructor () // dev.kord.rest.builder.interaction/MultiApplicationCommandBuilder.|(){}[0] - final val commands // dev.kord.rest.builder.interaction/MultiApplicationCommandBuilder.commands|{}commands[0] final fun (): kotlin.collections/MutableList // dev.kord.rest.builder.interaction/MultiApplicationCommandBuilder.commands.|(){}[0] @@ -7597,8 +7569,6 @@ sealed class dev.kord.rest.builder.interaction/MultiApplicationCommandBuilder { } sealed class dev.kord.rest.builder.interaction/OptionsBuilder : dev.kord.rest.builder.interaction/LocalizedDescriptionCreateBuilder, dev.kord.rest.builder.interaction/LocalizedNameCreateBuilder, dev.kord.rest.builder/RequestBuilder { // dev.kord.rest.builder.interaction/OptionsBuilder|null[0] - constructor (kotlin/String, kotlin/String, dev.kord.common.entity/ApplicationCommandOptionType) // dev.kord.rest.builder.interaction/OptionsBuilder.|(kotlin.String;kotlin.String;dev.kord.common.entity.ApplicationCommandOptionType){}[0] - final val type // dev.kord.rest.builder.interaction/OptionsBuilder.type|{}type[0] final fun (): dev.kord.common.entity/ApplicationCommandOptionType // dev.kord.rest.builder.interaction/OptionsBuilder.type.|(){}[0] @@ -7628,8 +7598,6 @@ sealed class dev.kord.rest.builder.interaction/OptionsBuilder : dev.kord.rest.bu } sealed class dev.kord.rest.builder.message.create/AbstractMessageCreateBuilder : dev.kord.rest.builder.message.create/MessageCreateBuilder { // dev.kord.rest.builder.message.create/AbstractMessageCreateBuilder|null[0] - constructor () // dev.kord.rest.builder.message.create/AbstractMessageCreateBuilder.|(){}[0] - final val files // dev.kord.rest.builder.message.create/AbstractMessageCreateBuilder.files|{}files[0] final fun (): kotlin.collections/MutableList // dev.kord.rest.builder.message.create/AbstractMessageCreateBuilder.files.|(){}[0] @@ -7663,8 +7631,6 @@ sealed class dev.kord.rest.builder.message.create/AbstractMessageCreateBuilder : } sealed class dev.kord.rest.builder.message.modify/AbstractMessageModifyBuilder : dev.kord.rest.builder.message.modify/MessageModifyBuilder { // dev.kord.rest.builder.message.modify/AbstractMessageModifyBuilder|null[0] - constructor () // dev.kord.rest.builder.message.modify/AbstractMessageModifyBuilder.|(){}[0] - final val files // dev.kord.rest.builder.message.modify/AbstractMessageModifyBuilder.files|{}files[0] final fun (): kotlin.collections/MutableList // dev.kord.rest.builder.message.modify/AbstractMessageModifyBuilder.files.|(){}[0] @@ -7692,8 +7658,6 @@ sealed class dev.kord.rest.builder.message.modify/AbstractMessageModifyBuilder : } sealed class dev.kord.rest.ratelimit/RequestResponse { // dev.kord.rest.ratelimit/RequestResponse|null[0] - constructor () // dev.kord.rest.ratelimit/RequestResponse.|(){}[0] - abstract val bucketKey // dev.kord.rest.ratelimit/RequestResponse.bucketKey|{}bucketKey[0] abstract fun (): dev.kord.rest.ratelimit/BucketKey? // dev.kord.rest.ratelimit/RequestResponse.bucketKey.|(){}[0] abstract val rateLimit // dev.kord.rest.ratelimit/RequestResponse.rateLimit|{}rateLimit[0] @@ -7771,8 +7735,6 @@ sealed class dev.kord.rest.ratelimit/RequestResponse { // dev.kord.rest.ratelimi } sealed class dev.kord.rest.request/RequestIdentifier { // dev.kord.rest.request/RequestIdentifier|null[0] - constructor () // dev.kord.rest.request/RequestIdentifier.|(){}[0] - final class MajorParamIdentifier : dev.kord.rest.request/RequestIdentifier { // dev.kord.rest.request/RequestIdentifier.MajorParamIdentifier|null[0] constructor (dev.kord.rest.route/Route<*>, kotlin/String) // dev.kord.rest.request/RequestIdentifier.MajorParamIdentifier.|(dev.kord.rest.route.Route<*>;kotlin.String){}[0] From a10ad200d513f1ca3b076995d44bd5733d88db92 Mon Sep 17 00:00:00 2001 From: Luca Kellermann Date: Tue, 3 Sep 2024 14:48:32 +0200 Subject: [PATCH 2/5] Update dependencies (#976) * Gradle 8.9 -> 8.10 * kotlinx.serialization 1.7.1 -> 1.7.2 * kotlinx-datetime 0.6.0 -> 0.6.1 * SLF4J 2.0.13 -> 2.0.16 * kotlin-node 20.14.10-pre.773 -> 20.14.10-pre.800 * Stately 2.0.7 -> 2.1.0 * JUnit Jupiter 5.10.3 -> 5.11.0 * JUnit Platform 1.10.3 -> 1.11.0 * MockK 1.13.11 -> 1.13.12 * Binary compatibility validator 0.15.1 -> 0.16.3 * gradle/actions/setup-gradle v3 -> v4 Running Gradle on JVMs with a version below 17 is deprecated since Gradle 8.10 [1], so the setup-java action is now configured to use Java 21. The setup-gradle action now also validates the Gradle wrapper [2], so the separate workflow is no longer necessary. [1] https://docs.gradle.org/8.10/release-notes.html#preemptive-warnings-for-outdated-jvm-versions-in-gradle-9.0 https://docs.gradle.org/8.10/userguide/upgrading_version_8.html#minimum_daemon_jvm_version [2] https://github.com/gradle/actions/releases/tag/v4.0.0 --- .github/workflows/deployment-ci.yml | 8 ++++---- .github/workflows/docs-ci.yml | 4 ++-- .../workflows/gradle-wrapper-validation.yml | 14 -------------- gradle/libs.versions.toml | 18 +++++++++--------- gradle/wrapper/gradle-wrapper.jar | Bin 43504 -> 43583 bytes gradle/wrapper/gradle-wrapper.properties | 4 ++-- 6 files changed, 17 insertions(+), 31 deletions(-) delete mode 100644 .github/workflows/gradle-wrapper-validation.yml diff --git a/.github/workflows/deployment-ci.yml b/.github/workflows/deployment-ci.yml index 12e5d765085..904edc4dacf 100644 --- a/.github/workflows/deployment-ci.yml +++ b/.github/workflows/deployment-ci.yml @@ -27,9 +27,9 @@ jobs: uses: actions/setup-java@v4 with: distribution: temurin - java-version: 11 + java-version: 21 - name: Set up Gradle - uses: gradle/actions/setup-gradle@v3 + uses: gradle/actions/setup-gradle@v4 - name: Build with Gradle run: ./gradlew --stacktrace --info build release: @@ -54,9 +54,9 @@ jobs: uses: actions/setup-java@v4 with: distribution: temurin - java-version: 11 + java-version: 21 - name: Set up Gradle - uses: gradle/actions/setup-gradle@v3 + uses: gradle/actions/setup-gradle@v4 - name: Build with Gradle run: ./gradlew --stacktrace --info build - name: Publish with Gradle diff --git a/.github/workflows/docs-ci.yml b/.github/workflows/docs-ci.yml index 473ab855651..7db9fe35624 100644 --- a/.github/workflows/docs-ci.yml +++ b/.github/workflows/docs-ci.yml @@ -23,9 +23,9 @@ jobs: uses: actions/setup-java@v4 with: distribution: temurin - java-version: 11 + java-version: 21 - name: Set up Gradle - uses: gradle/actions/setup-gradle@v3 + uses: gradle/actions/setup-gradle@v4 - name: Build docs with Gradle run: ./gradlew --stacktrace --info dokkaHtmlMultiModule - name: Deploy docs to GitHub Pages diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml deleted file mode 100644 index 816ec52fbbc..00000000000 --- a/.github/workflows/gradle-wrapper-validation.yml +++ /dev/null @@ -1,14 +0,0 @@ -# This workflow will validate the checksums of Gradle Wrapper JAR files - -name: Gradle Wrapper Validation - -on: [ push, pull_request ] - -jobs: - validation: - name: Validate Gradle Wrapper - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Validate Gradle Wrapper - uses: gradle/actions/wrapper-validation@v3 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3d4637bd0a9..a26d68c9293 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -4,17 +4,17 @@ kotlin = "2.0.20" # 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 -kotlinx-datetime = "0.6.0" # https://github.com/Kotlin/kotlinx-datetime +kotlinx-serialization = "1.7.2" # https://github.com/Kotlin/kotlinx.serialization +kotlinx-datetime = "0.6.1" # https://github.com/Kotlin/kotlinx-datetime kord-cache = "0.5.4" # https://github.com/kordlib/cache # implementation dependencies kotlin-logging = "7.0.0" # https://github.com/oshai/kotlin-logging kotlin-logging-old = "3.0.5" # TODO remove after dependency is removed in rest, gateway, voice and core -slf4j = "2.0.13" # https://www.slf4j.org -kotlin-node = "20.14.10-pre.773" # https://github.com/JetBrains/kotlin-wrappers +slf4j = "2.0.16" # https://www.slf4j.org +kotlin-node = "20.14.10-pre.800" # https://github.com/JetBrains/kotlin-wrappers bignum = "0.3.10" # https://github.com/ionspin/kotlin-multiplatform-bignum -stately = "2.0.7" # https://github.com/touchlab/Stately +stately = "2.1.0" # https://github.com/touchlab/Stately fastZlib = "2.0.1" # https://github.com/timotejroiko/fast-zlib # code generation @@ -22,15 +22,15 @@ ksp = "2.0.20-1.0.24" # https://github.com/google/ksp kotlinpoet = "1.18.1" # https://github.com/square/kotlinpoet # tests -junit-jupiter = "5.10.3" # https://github.com/junit-team/junit5 -junit-platform = "1.10.3" -mockk = "1.13.11" # https://github.com/mockk/mockk +junit-jupiter = "5.11.0" # https://github.com/junit-team/junit5 +junit-platform = "1.11.0" +mockk = "1.13.12" # https://github.com/mockk/mockk kbson = "0.4.0" # https://github.com/mongodb/kbson # plugins dokka = "1.9.20" # https://github.com/Kotlin/dokka kotlinx-atomicfu = "0.25.0" # https://github.com/Kotlin/kotlinx-atomicfu -binary-compatibility-validator = "0.15.1" # https://github.com/Kotlin/binary-compatibility-validator +binary-compatibility-validator = "0.16.3" # https://github.com/Kotlin/binary-compatibility-validator buildconfig = "5.4.0" # https://github.com/gmazzo/gradle-buildconfig-plugin diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 2c3521197d7c4586c843d1d3e9090525f1898cde..a4b76b9530d66f5e68d973ea569d8e19de379189 100644 GIT binary patch delta 3990 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 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 68e8816d71c..2b189974c29 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip +distributionSha256Sum=5b9c5eb3f9fc2c94abaea57d90bd78747ca117ddbbf96c859d3741181a12bf2a +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME From 75caf0646e1034838a0d1c9c40b17c7cbf989557 Mon Sep 17 00:00:00 2001 From: Luca Kellermann Date: Tue, 3 Sep 2024 21:20:04 +0200 Subject: [PATCH 3/5] Link to JDK 22 in Dokka output (#977) Javadoc of recent JDK versions is nicer to use (mobile-friendly, searchable, etc.). --- buildSrc/src/main/kotlin/Documentation.kt | 2 +- common/src/commonMain/kotlin/entity/Snowflake.kt | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/buildSrc/src/main/kotlin/Documentation.kt b/buildSrc/src/main/kotlin/Documentation.kt index 92eb73e751c..a896e54f552 100644 --- a/buildSrc/src/main/kotlin/Documentation.kt +++ b/buildSrc/src/main/kotlin/Documentation.kt @@ -10,7 +10,7 @@ fun AbstractDokkaLeafTask.applyKordDokkaOptions() { dokkaSourceSets.configureEach { - jdkVersion = Jvm.target + jdkVersion = 22 suppressGeneratedFiles = false diff --git a/common/src/commonMain/kotlin/entity/Snowflake.kt b/common/src/commonMain/kotlin/entity/Snowflake.kt index 07a1f2a06ab..6a63097fcc4 100644 --- a/common/src/commonMain/kotlin/entity/Snowflake.kt +++ b/common/src/commonMain/kotlin/entity/Snowflake.kt @@ -138,7 +138,7 @@ public class Snowflake : Comparable { * * The comparison is based first on the value of the [timestamp], then on the value of the [workerId], then on the * value of the [processId] and finally on the value of the [increment]. It is *consistent with equals*, as defined - * by [Comparable](https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html). + * by [Comparable](https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/lang/Comparable.html). */ override fun compareTo(other: Snowflake): Int { // the layout of Snowflake values from MSB to LSB is timestamp, workerId, processId, increment, @@ -175,12 +175,13 @@ public class Snowflake : Comparable { * [processId] and [increment] are not taken into account. * * Note: this comparator imposes an ordering that is *inconsistent with equals*, as defined by - * [Comparator](https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html). It therefore shouldn't be - * used to order a [SortedSet](https://docs.oracle.com/javase/8/docs/api/java/util/SortedSet.html) or - * [SortedMap](https://docs.oracle.com/javase/8/docs/api/java/util/SortedMap.html). This is because - * `TimestampComparator` only compares the first 42 bits of the ULong [value] (comparing the timestamp), whereas - * [equals][Snowflake.equals] compares all the bits of the [value]. `TimestampComparator` can return `0` even if - * [equals][Snowflake.equals] returns `false`, but [equals][Snowflake.equals] only returns `true` if + * [Comparator](https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/util/Comparator.html). It + * therefore shouldn't be used to order a + * [SortedSet](https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/util/SortedSet.html) or + * [SortedMap](https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/util/SortedMap.html). This is + * because `TimestampComparator` only compares the first 42 bits of the ULong [value] (comparing the timestamp), + * whereas [equals][Snowflake.equals] compares all the bits of the [value]. `TimestampComparator` can return `0` + * even if [equals][Snowflake.equals] returns `false`, but [equals][Snowflake.equals] only returns `true` if * `TimestampComparator` returns `0`. */ public val TimestampComparator: Comparator = Comparator { s1, s2 -> From 8e01b394c3fc369bfa2ae760244951c77237302e Mon Sep 17 00:00:00 2001 From: Luca Kellermann Date: Tue, 10 Sep 2024 22:02:37 +0200 Subject: [PATCH 4/5] Replace Gradle toolchain with -Xjdk-release (#978) See https://jakewharton.com/gradle-toolchains-are-rarely-a-good-idea/, https://github.com/kordlib/gradle-tools/pull/3 and https://kotlinlang.org/docs/compiler-reference.html#xjdk-release-version --- buildSrc/src/main/kotlin/Compiler.kt | 16 +++++++++++----- .../kotlin/kord-internal-module.gradle.kts | 9 +++++++-- ...rd-internal-multiplatform-module.gradle.kts | 17 ++++++++++------- .../src/main/kotlin/kord-module.gradle.kts | 9 +++++---- .../kord-multiplatform-module.gradle.kts | 18 ++++++++++-------- settings.gradle.kts | 5 ----- 6 files changed, 43 insertions(+), 31 deletions(-) diff --git a/buildSrc/src/main/kotlin/Compiler.kt b/buildSrc/src/main/kotlin/Compiler.kt index 00b3f31b5b6..6caa6484fc3 100644 --- a/buildSrc/src/main/kotlin/Compiler.kt +++ b/buildSrc/src/main/kotlin/Compiler.kt @@ -1,6 +1,8 @@ import org.gradle.api.NamedDomainObjectSet import org.gradle.kotlin.dsl.assign +import org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8 import org.jetbrains.kotlin.gradle.dsl.KotlinCommonCompilerOptions +import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompilerOptions import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet val kordOptIns = listOf( @@ -12,16 +14,20 @@ val kordOptIns = listOf( "dev.kord.common.annotation.KordVoice", ) -object Jvm { - const val target = 8 -} - -fun KotlinCommonCompilerOptions.applyKordCompilerOptions() { +internal fun KotlinCommonCompilerOptions.applyKordCommonCompilerOptions() { allWarningsAsErrors = true progressiveMode = true freeCompilerArgs.add("-Xexpect-actual-classes") } +internal const val KORD_JVM_TARGET = 8 + +internal fun KotlinJvmCompilerOptions.applyKordJvmCompilerOptions() { + applyKordCommonCompilerOptions() + jvmTarget = JVM_1_8 + freeCompilerArgs.add("-Xjdk-release=1.8") +} + internal fun NamedDomainObjectSet.applyKordTestOptIns() { named { it.contains("test", ignoreCase = true) }.configureEach { // allow `ExperimentalCoroutinesApi` for `TestScope.currentTime` diff --git a/buildSrc/src/main/kotlin/kord-internal-module.gradle.kts b/buildSrc/src/main/kotlin/kord-internal-module.gradle.kts index 102f730ea2e..ad9b04bb4d1 100644 --- a/buildSrc/src/main/kotlin/kord-internal-module.gradle.kts +++ b/buildSrc/src/main/kotlin/kord-internal-module.gradle.kts @@ -7,8 +7,13 @@ repositories { } kotlin { - jvmToolchain(Jvm.target) compilerOptions { - applyKordCompilerOptions() + applyKordJvmCompilerOptions() + } +} + +tasks { + withType().configureEach { + options.release = KORD_JVM_TARGET } } diff --git a/buildSrc/src/main/kotlin/kord-internal-multiplatform-module.gradle.kts b/buildSrc/src/main/kotlin/kord-internal-multiplatform-module.gradle.kts index 236b1027f1c..076b387f80e 100644 --- a/buildSrc/src/main/kotlin/kord-internal-multiplatform-module.gradle.kts +++ b/buildSrc/src/main/kotlin/kord-internal-multiplatform-module.gradle.kts @@ -8,18 +8,21 @@ repositories { mavenCentral() } +@OptIn(ExperimentalKotlinGradlePluginApi::class) kotlin { - jvm() + compilerOptions { + applyKordCommonCompilerOptions() + } + + jvm { + compilerOptions { + applyKordJvmCompilerOptions() + } + } js { nodejs() useCommonJs() } - jvmToolchain(Jvm.target) - - @OptIn(ExperimentalKotlinGradlePluginApi::class) - compilerOptions { - applyKordCompilerOptions() - } } tasks { diff --git a/buildSrc/src/main/kotlin/kord-module.gradle.kts b/buildSrc/src/main/kotlin/kord-module.gradle.kts index f46703c0f73..19322086bd4 100644 --- a/buildSrc/src/main/kotlin/kord-module.gradle.kts +++ b/buildSrc/src/main/kotlin/kord-module.gradle.kts @@ -24,11 +24,8 @@ apiValidation { kotlin { explicitApi() - - jvmToolchain(Jvm.target) - compilerOptions { - applyKordCompilerOptions() + applyKordJvmCompilerOptions() optIn.addAll(kordOptIns) } @@ -45,6 +42,10 @@ tasks { withType().configureEach { applyKordDokkaOptions() } + + withType().configureEach { + options.release = KORD_JVM_TARGET + } } publishing { diff --git a/buildSrc/src/main/kotlin/kord-multiplatform-module.gradle.kts b/buildSrc/src/main/kotlin/kord-multiplatform-module.gradle.kts index 77ec746acbd..5a28f04dd8c 100644 --- a/buildSrc/src/main/kotlin/kord-multiplatform-module.gradle.kts +++ b/buildSrc/src/main/kotlin/kord-multiplatform-module.gradle.kts @@ -23,10 +23,19 @@ apiValidation { applyKordBCVOptions() } +@OptIn(ExperimentalKotlinGradlePluginApi::class) kotlin { explicitApi() + compilerOptions { + applyKordCommonCompilerOptions() + optIn.addAll(kordOptIns) + } - jvm() + jvm { + compilerOptions { + applyKordJvmCompilerOptions() + } + } js { nodejs { testTask { @@ -39,13 +48,6 @@ kotlin { } useCommonJs() } - jvmToolchain(Jvm.target) - - @OptIn(ExperimentalKotlinGradlePluginApi::class) - compilerOptions { - applyKordCompilerOptions() - optIn.addAll(kordOptIns) - } applyDefaultHierarchyTemplate() diff --git a/settings.gradle.kts b/settings.gradle.kts index d0ab04959b0..2a6e06084e9 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,8 +1,3 @@ -plugins { - // https://github.com/gradle/foojay-toolchains - id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" -} - rootProject.name = "kord" include( From 4f6712f32192b4e6a1bb03c47f66feddfc53fbeb Mon Sep 17 00:00:00 2001 From: Luca Kellermann Date: Tue, 10 Sep 2024 22:26:25 +0200 Subject: [PATCH 5/5] Update Auto Moderation builders (#979) * KeywordPresetAutoModerationRuleCreateBuilder.presets can be omitted * AutoModerationRuleCreateBuilder.buildTriggerMetadata doesn't need covariant overrides --- rest/api/rest.api | 4 +--- rest/api/rest.klib.api | 10 ++++---- .../AutoModerationRuleBuilder.kt | 10 ++++++-- .../AutoModerationRuleCreateBuilder.kt | 23 ++++++++++++------- .../AutoModerationRuleModifyBuilder.kt | 8 ++++++- 5 files changed, 37 insertions(+), 18 deletions(-) diff --git a/rest/api/rest.api b/rest/api/rest.api index 1b0fc4f685c..2b117ebf1a5 100644 --- a/rest/api/rest.api +++ b/rest/api/rest.api @@ -247,7 +247,6 @@ public final class dev/kord/rest/builder/automoderation/KeywordAutoModerationRul public final class dev/kord/rest/builder/automoderation/KeywordAutoModerationRuleCreateBuilder : dev/kord/rest/builder/automoderation/AutoModerationRuleCreateBuilder, dev/kord/rest/builder/automoderation/KeywordAutoModerationRuleBuilder { public fun (Ljava/lang/String;Ldev/kord/common/entity/AutoModerationRuleEventType;)V - public synthetic fun buildTriggerMetadata ()Ldev/kord/common/entity/optional/Optional; public fun getAllowedKeywords ()Ljava/util/List; public fun getKeywords ()Ljava/util/List; public fun getRegexPatterns ()Ljava/util/List; @@ -274,6 +273,7 @@ public abstract interface class dev/kord/rest/builder/automoderation/KeywordPres public abstract fun assignPresets (Ljava/util/List;)V public abstract fun getPresets ()Ljava/util/List; public abstract fun getTriggerType ()Ldev/kord/common/entity/AutoModerationRuleTriggerType$KeywordPreset; + public abstract fun setPresets (Ljava/util/List;)V } public final class dev/kord/rest/builder/automoderation/KeywordPresetAutoModerationRuleBuilder$DefaultImpls { @@ -283,7 +283,6 @@ public final class dev/kord/rest/builder/automoderation/KeywordPresetAutoModerat public final class dev/kord/rest/builder/automoderation/KeywordPresetAutoModerationRuleCreateBuilder : dev/kord/rest/builder/automoderation/AutoModerationRuleCreateBuilder, dev/kord/rest/builder/automoderation/KeywordPresetAutoModerationRuleBuilder { public fun (Ljava/lang/String;Ldev/kord/common/entity/AutoModerationRuleEventType;)V public fun assignPresets (Ljava/util/List;)V - public synthetic fun buildTriggerMetadata ()Ldev/kord/common/entity/optional/Optional; public fun getAllowedKeywords ()Ljava/util/List; public fun getPresets ()Ljava/util/List; public fun getTriggerType ()Ldev/kord/common/entity/AutoModerationRuleTriggerType$KeywordPreset; @@ -317,7 +316,6 @@ public final class dev/kord/rest/builder/automoderation/MentionSpamAutoModeratio public final class dev/kord/rest/builder/automoderation/MentionSpamAutoModerationRuleCreateBuilder : dev/kord/rest/builder/automoderation/AutoModerationRuleCreateBuilder, dev/kord/rest/builder/automoderation/MentionSpamAutoModerationRuleBuilder { public fun (Ljava/lang/String;Ldev/kord/common/entity/AutoModerationRuleEventType;)V - public synthetic fun buildTriggerMetadata ()Ldev/kord/common/entity/optional/Optional; public fun getMentionLimit ()Ljava/lang/Integer; public fun getMentionRaidProtectionEnabled ()Ljava/lang/Boolean; public fun getTriggerType ()Ldev/kord/common/entity/AutoModerationRuleTriggerType$MentionSpam; diff --git a/rest/api/rest.klib.api b/rest/api/rest.klib.api index 8735e4d1bb5..d7343b2bdfa 100644 --- a/rest/api/rest.klib.api +++ b/rest/api/rest.klib.api @@ -460,11 +460,13 @@ sealed interface dev.kord.rest.builder.automoderation/KeywordAutoModerationRuleB } sealed interface dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleBuilder : dev.kord.rest.builder.automoderation/AllowedKeywordsAutoModerationRuleBuilder { // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleBuilder|null[0] - abstract val presets // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleBuilder.presets|{}presets[0] - abstract fun (): kotlin.collections/MutableList? // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleBuilder.presets.|(){}[0] open val triggerType // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleBuilder.triggerType|{}triggerType[0] open fun (): dev.kord.common.entity/AutoModerationRuleTriggerType.KeywordPreset // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleBuilder.triggerType.|(){}[0] + abstract var presets // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleBuilder.presets|{}presets[0] + abstract fun (): kotlin.collections/MutableList? // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleBuilder.presets.|(){}[0] + abstract fun (kotlin.collections/MutableList?) // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleBuilder.presets.|(kotlin.collections.MutableList?){}[0] + abstract fun assignPresets(kotlin.collections/MutableList) // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleBuilder.assignPresets|assignPresets(kotlin.collections.MutableList){}[0] } @@ -765,8 +767,8 @@ final class dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRule final fun (): kotlin.collections/MutableList? // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleCreateBuilder.allowedKeywords.|(){}[0] final fun (kotlin.collections/MutableList?) // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleCreateBuilder.allowedKeywords.|(kotlin.collections.MutableList?){}[0] final var presets // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleCreateBuilder.presets|{}presets[0] - final fun (): kotlin.collections/MutableList // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleCreateBuilder.presets.|(){}[0] - final fun (kotlin.collections/MutableList) // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleCreateBuilder.presets.|(kotlin.collections.MutableList){}[0] + final fun (): kotlin.collections/MutableList? // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleCreateBuilder.presets.|(){}[0] + final fun (kotlin.collections/MutableList?) // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleCreateBuilder.presets.|(kotlin.collections.MutableList?){}[0] final fun assignPresets(kotlin.collections/MutableList) // dev.kord.rest.builder.automoderation/KeywordPresetAutoModerationRuleCreateBuilder.assignPresets|assignPresets(kotlin.collections.MutableList){}[0] } diff --git a/rest/src/commonMain/kotlin/builder/automoderation/AutoModerationRuleBuilder.kt b/rest/src/commonMain/kotlin/builder/automoderation/AutoModerationRuleBuilder.kt index b9bd19072b9..8b91fd43bce 100644 --- a/rest/src/commonMain/kotlin/builder/automoderation/AutoModerationRuleBuilder.kt +++ b/rest/src/commonMain/kotlin/builder/automoderation/AutoModerationRuleBuilder.kt @@ -282,18 +282,24 @@ public sealed interface KeywordPresetAutoModerationRuleBuilder : AllowedKeywords override val triggerType: KeywordPreset get() = KeywordPreset /** The internally pre-defined wordsets which will be searched for in content. */ - public val presets: MutableList? + public var presets: MutableList? /** * Use this to set [presets][KeywordPresetAutoModerationRuleBuilder.presets] for * [KeywordPresetAutoModerationRuleBuilder]. */ + @Deprecated( + "This can be replaced with 'presets', it is now a 'var'. The deprecation level will be raised to ERROR in " + + "0.16.0, to HIDDEN in 0.17.0, and this declaration will be removed in 0.18.0.", + ReplaceWith("this.run { this@run.presets = presets }", imports = ["kotlin.run"]), + DeprecationLevel.WARNING, + ) public fun assignPresets(presets: MutableList) } /** Add a [preset] to [presets][KeywordPresetAutoModerationRuleBuilder.presets]. */ public fun KeywordPresetAutoModerationRuleBuilder.preset(preset: AutoModerationRuleKeywordPresetType) { - presets?.add(preset) ?: assignPresets(mutableListOf(preset)) + presets?.add(preset) ?: run { presets = mutableListOf(preset) } } diff --git a/rest/src/commonMain/kotlin/builder/automoderation/AutoModerationRuleCreateBuilder.kt b/rest/src/commonMain/kotlin/builder/automoderation/AutoModerationRuleCreateBuilder.kt index 82acfabeb75..2a90eaee32f 100644 --- a/rest/src/commonMain/kotlin/builder/automoderation/AutoModerationRuleCreateBuilder.kt +++ b/rest/src/commonMain/kotlin/builder/automoderation/AutoModerationRuleCreateBuilder.kt @@ -74,8 +74,8 @@ public class KeywordAutoModerationRuleCreateBuilder( private var _allowedKeywords: Optional> = Optional.Missing() override var allowedKeywords: MutableList? by ::_allowedKeywords.delegate() - // one of keywords or regexPatterns is required, don't bother to send missing trigger metadata if both are missing - override fun buildTriggerMetadata(): Optional.Value = + // triggerMetadata is required for Keyword rules + override fun buildTriggerMetadata(): Optional = DiscordAutoModerationRuleTriggerMetadata( keywordFilter = _keywords.mapCopy(), regexPatterns = _regexPatterns.mapCopy(), @@ -97,9 +97,16 @@ public class KeywordPresetAutoModerationRuleCreateBuilder( eventType: AutoModerationRuleEventType, ) : AutoModerationRuleCreateBuilder(name, eventType), KeywordPresetAutoModerationRuleBuilder { - override var presets: MutableList = mutableListOf() + private var _presets: Optional> = Optional.Missing() + override var presets: MutableList? by ::_presets.delegate() /** @suppress Use `this.presets = presets` instead. */ + @Deprecated( + "Use 'this.presets = presets' instead. The deprecation level will be raised to ERROR in 0.16.0, to HIDDEN in " + + "0.17.0, and this declaration will be removed in 0.18.0.", + ReplaceWith("this.run { this@run.presets = presets }", imports = ["kotlin.run"]), + DeprecationLevel.WARNING, + ) override fun assignPresets(presets: MutableList) { this.presets = presets } @@ -107,9 +114,10 @@ public class KeywordPresetAutoModerationRuleCreateBuilder( private var _allowedKeywords: Optional> = Optional.Missing() override var allowedKeywords: MutableList? by ::_allowedKeywords.delegate() - override fun buildTriggerMetadata(): Optional.Value = + // triggerMetadata is required for KeywordPreset rules + override fun buildTriggerMetadata(): Optional = DiscordAutoModerationRuleTriggerMetadata( - presets = presets.toList().optional(), + presets = _presets.mapCopy(), allowList = _allowedKeywords.mapCopy(), ).optional() } @@ -127,9 +135,8 @@ public class MentionSpamAutoModerationRuleCreateBuilder( private var _mentionRaidProtectionEnabled: OptionalBoolean = OptionalBoolean.Missing override var mentionRaidProtectionEnabled: Boolean? by ::_mentionRaidProtectionEnabled.delegate() - // one of mentionTotalLimit or mentionRaidProtectionEnabled is required, don't bother to send missing trigger - // metadata if both are missing - override fun buildTriggerMetadata(): Optional.Value = + // triggerMetadata is required for MentionSpam rules + override fun buildTriggerMetadata(): Optional = DiscordAutoModerationRuleTriggerMetadata( mentionTotalLimit = _mentionLimit, mentionRaidProtectionEnabled = _mentionRaidProtectionEnabled, diff --git a/rest/src/commonMain/kotlin/builder/automoderation/AutoModerationRuleModifyBuilder.kt b/rest/src/commonMain/kotlin/builder/automoderation/AutoModerationRuleModifyBuilder.kt index 0bbeb537c30..133595999e9 100644 --- a/rest/src/commonMain/kotlin/builder/automoderation/AutoModerationRuleModifyBuilder.kt +++ b/rest/src/commonMain/kotlin/builder/automoderation/AutoModerationRuleModifyBuilder.kt @@ -103,7 +103,7 @@ public class KeywordAutoModerationRuleModifyBuilder : } /** A [SpamAutoModerationRuleBuilder] for building [AutoModerationRuleModifyRequest]s. */ -@Suppress("CanSealedSubClassBeObject") // has state in super class +@Suppress("CanSealedSubClassBeObject") // superclass is mutable @KordDsl public class SpamAutoModerationRuleModifyBuilder : AutoModerationRuleModifyBuilder(), @@ -119,6 +119,12 @@ public class KeywordPresetAutoModerationRuleModifyBuilder : override var presets: MutableList? by ::_presets.delegate() /** @suppress Use `this.presets = presets` instead. */ + @Deprecated( + "Use 'this.presets = presets' instead. The deprecation level will be raised to ERROR in 0.16.0, to HIDDEN in " + + "0.17.0, and this declaration will be removed in 0.18.0.", + ReplaceWith("this.run { this@run.presets = presets }", imports = ["kotlin.run"]), + DeprecationLevel.WARNING, + ) override fun assignPresets(presets: MutableList) { this.presets = presets }