Skip to content

Commit 4ece4ea

Browse files
committed
Workaround change in reflection resolution in 2.1.0. Fixed in 2.1.20
1 parent ccef914 commit 4ece4ea

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/test/kotlin/io/bazel/kotlin/builder/tasks/jvm/KotlinBuilderJvmJdepsTest.kt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package io.bazel.kotlin.builder.tasks.jvm;
1818

1919
import com.google.common.truth.Truth.assertThat
2020
import com.google.devtools.build.lib.view.proto.Deps
21-
import io.bazel.kotlin.builder.Deps.*
21+
import io.bazel.kotlin.builder.Deps.Dep
2222
import io.bazel.kotlin.builder.KotlinJvmTestBuilder
2323
import org.junit.Test
2424
import org.junit.runner.RunWith
@@ -455,8 +455,14 @@ class KotlinBuilderJvmJdepsTest(private val enableK2Compiler: Boolean) {
455455
.setRuleLabel(dependingTarget.label())
456456
.setSuccess(true)
457457
.addExplicitDep(connectionNotFoundExceptionDep.singleCompileJar())
458-
.addExplicitDep(KOTLIN_STDLIB_DEP.singleCompileJar())
459-
.buildSorted()
458+
.apply {
459+
if (!enableK2Compiler) {
460+
// TODO(https://github.com/bazelbuild/rules_kotlin/issues/1246): Uncomment for 2.1.20.
461+
// See https://youtrack.jetbrains.com/issue/KTIJ-25347/K2-IDE.-Different-resolve-of-types-from-type-aliases-of-stdlib-jvm-comparing-to-K1
462+
addExplicitDep(KOTLIN_STDLIB_DEP.singleCompileJar())
463+
}
464+
}.buildSorted()
465+
460466
assertThat(jdeps).isEqualTo(expected)
461467
}
462468

0 commit comments

Comments
 (0)