Skip to content

Conversation

ThomasCJY
Copy link
Contributor

Background
We found a regression on bazel kotlin rule where private typealias cannot be compiled correctly. This is the PR to repro the issue.

Repro Steps

cd examples/android; bazelisk build //libAndroid:Test

==========error message===========
exception: org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during IR lowering
File being compiled: /private/var/tmp/_bazel_jchen/804281e1574486d23f35a1e94292b21a/execroot/android_example/libAndroid/src/test/kotlin/examples/android/lib2/TestDataTest.kt
The root cause java.lang.AssertionError was thrown at: org.jetbrains.kotlin.ir.util.TypeTranslator.toIrTypeAbbreviation(TypeTranslator.kt:167)
        at org.jetbrains.kotlin.backend.common.CodegenUtil.reportBackendException(CodegenUtil.kt:239)
        at org.jetbrains.kotlin.backend.common.CodegenUtil.reportBackendException$default(CodegenUtil.kt:235)
        at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invoke(PhaseBuilders.kt:124)

Test on kotlin 1.4
If we keep the change on examples/android/bzl/BUILD.bazel to be 1.4 and don't bump up kotlin version. This issue will not happen, which proves that this is a regression on kotlin 1.5.10.

Test on jvm rules
Jvm rules works correctly with the same test case. According to that, it's most likely an issue in android rules.

bazelisk build //projects/core/impl:Test
pass

add toolchain

test case

fix

manifest value
@ThomasCJY ThomasCJY changed the title [Bug report][Example] Kolitn 1.5.10 compilation issue [Bug report][Example] Kolitn 1.5.10 compilation issue on private typealias Jun 7, 2021
@cgruber cgruber added this to the Candidate 1.5 milestone Jul 9, 2021
@restingbull restingbull self-assigned this Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants