Hi, while trying to upgrade 1.7.10 to 1.7.20, our ...
# android
e
Hi, while trying to upgrade 1.7.10 to 1.7.20, our pipeline catches an APK size regression in our app. Upon comparing the APKs, we found out that there's a difference between these two versions compiling a lambda In 1.7.20, we notice it produces extra
kotlin/jvm/internal/Lambda
classes, for example, this code
Copy code
private fun observeCardDrag() {
  disposable.add(stream.observe().subscribe({
     transition.onCardDragged(it)
  }, {
     throw it
  }))
}
Will produce
NameOfClass$observeCardDrag$1
and
NameOfClass$observeCardDrag$2
This is also reflected in the smali file, I attach the comparison between smali in 1.7.10 (left) and 1.7.20 (right). The confusing part is, that if we check the Kotlin bytecode from the IDE feature, both have these extra lambda classes, so it might not be from the Kotlin compiler itself. Does anyone have any idea what's going on? Thanks in advance.
☝️ 1
We got the issue, this regression was introduced by extra check around lambda by invoke dynamic Here's the bug report.