Skip to content

Commit

Permalink
chore: add hints for oracle/graal#7089
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkAtra committed Jul 2, 2024
1 parent ececab6 commit 5d7bfd4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main/kotlin/de/darkatra/vrising/discord/BotRuntimeHints.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import dev.kord.core.cache.data.UserData
import dev.kord.core.cache.data.VoiceStateData
import dev.kord.core.cache.data.WebhookData
import io.ktor.utils.io.pool.DefaultPool
import kotlinx.serialization.json.JsonArray
import kotlinx.serialization.json.JsonObject
import org.dizitart.no2.collection.Document
import org.dizitart.no2.collection.NitriteId
import org.dizitart.no2.common.meta.Attributes
Expand Down Expand Up @@ -77,15 +79,19 @@ class BotRuntimeHints : RuntimeHintsRegistrar {
UserData::class.java,
VoiceStateData::class.java,
WebhookData::class.java,
Optional.Null.Companion::class.java,
Optional.Missing.Companion::class.java
)

hints.reflection()
// required by kord (remove once https://github.com/kordlib/kord/issues/786 is merged)
.registerType(GuildApplicationCommandPermissionsData::class.java)
.registerType(StickerPackData::class.java)
.registerType(Optional.Missing.Companion::class.java)
.registerType(Optional.Null.Companion::class.java)
// required by ktor (dependency of kord)
.registerType(DefaultPool::class.java, MemberCategory.DECLARED_FIELDS)
.registerType(StickerPackData::class.java)
// required for kotlinx serialization (dependency of kord)
.registerType(JsonArray.Companion::class.java)
.registerType(JsonObject.Companion::class.java)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ package de.darkatra.vrising.discord
import dev.kord.core.entity.interaction.InteractionCommand
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.condition.DisabledInNativeImage
import org.mockito.kotlin.mock
import org.mockito.kotlin.whenever

@DisabledInNativeImage
class KordExtensionsKtTest {

@Test
Expand Down

0 comments on commit 5d7bfd4

Please sign in to comment.