cashapp / zipline

Run Kotlin/JS libraries in Kotlin/JVM and Kotlin/Native programs
Apache License 2.0
2.08k stars 159 forks source link

Crashes with es2015 target #1366

Closed JakeWharton closed 4 months ago

JakeWharton commented 4 months ago

Adding

js {
  browser {
    compilerOptions {
      target = 'es2015'
    }
  }
}

to a module with the Zipline plugin causes

Caused by: java.util.NoSuchElementException: List is empty.
        at kotlin.collections.CollectionsKt___CollectionsKt.last(_Collections.kt:418)
        at app.cash.zipline.ZiplineManifest$Companion.create(ZiplineManifest.kt:254)
        at app.cash.zipline.ZiplineManifest$Companion.create$default(ZiplineManifest.kt:229)
        at app.cash.zipline.gradle.ZiplineCompiler.writeManifest(ZiplineCompiler.kt:149)
        at app.cash.zipline.gradle.ZiplineCompiler.compile(ZiplineCompiler.kt:57)
        at app.cash.zipline.gradle.ZiplineCompileTask.task(ZiplineCompileTask.kt:154)
JakeWharton commented 4 months ago

This is probably just #988 finally rearing its head and our lack of support for it.