From 1327268c1126bce6781c141f786e2fcbb925a13a Mon Sep 17 00:00:00 2001 From: "oleksandr.karpovich" Date: Thu, 27 Jul 2023 11:25:54 +0200 Subject: [PATCH] add a reproducer for unbound symbols with partial-linkage disabled fails with K1 and kotlin >= 1.9.0 ./gradlew :testcase-inheritance-composableInterface-main:cleanLinuxX64Test :testcase-inheritance-composableInterface-main:linuxX64Test --- .../integrations/composable-test-cases/build.gradle.kts | 6 ++++++ .../composable-test-cases/buildSrc/build.gradle.kts | 7 +++++++ .../integrations/composable-test-cases/gradle.properties | 6 +++--- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/compose/integrations/composable-test-cases/build.gradle.kts b/compose/integrations/composable-test-cases/build.gradle.kts index dbc094a3df..35403d1d97 100644 --- a/compose/integrations/composable-test-cases/build.gradle.kts +++ b/compose/integrations/composable-test-cases/build.gradle.kts @@ -1,3 +1,4 @@ +import org.jetbrains.kotlin.gradle.dsl.KotlinCompile import org.jetbrains.kotlin.gradle.dsl.KotlinJsCompile group "com.example" @@ -28,6 +29,11 @@ allprojects { "-Xklib-enable-signature-clash-checks=false", ) } + + // disable partial-linkage to test that k/native and k/js don't produce unused unbound symbols + tasks.withType>().configureEach { + kotlinOptions.freeCompilerArgs += "-Xpartial-linkage=disable" + } } disableYarnLockMismatchReport() } diff --git a/compose/integrations/composable-test-cases/buildSrc/build.gradle.kts b/compose/integrations/composable-test-cases/buildSrc/build.gradle.kts index 52ca588e76..e5227d0d48 100644 --- a/compose/integrations/composable-test-cases/buildSrc/build.gradle.kts +++ b/compose/integrations/composable-test-cases/buildSrc/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.gradle.dsl.KotlinVersion + repositories { mavenCentral() gradlePluginPortal() @@ -7,6 +9,11 @@ plugins { kotlin("jvm") } +kotlin { + compilerOptions { + languageVersion.set(KotlinVersion.KOTLIN_1_9) + } +} java { sourceCompatibility = JavaVersion.VERSION_1_8 diff --git a/compose/integrations/composable-test-cases/gradle.properties b/compose/integrations/composable-test-cases/gradle.properties index 062f87bc1e..1078d877f2 100644 --- a/compose/integrations/composable-test-cases/gradle.properties +++ b/compose/integrations/composable-test-cases/gradle.properties @@ -2,13 +2,13 @@ org.gradle.jvmargs=-Xmx2048M -XX:MaxMetaspaceSize=512m kotlin.code.style=official kotlin.native.enableDependencyPropagation=false android.useAndroidX=true -kotlin.version=1.8.20 +kotlin.version=1.9.0 agp.version=7.3.0 -compose.version=1.5.0-dev1063 +compose.version=1.5.0-dev1128 kotlin.native.cacheKind=none #empty by default - a default version will be used -compose.kotlinCompilerPluginVersion=1.4.2 +compose.kotlinCompilerPluginVersion=1.5.0 # default|failingJs - see enum class CasesToRun tests.casesToRun=default