Browse Source

CfW/js: Reproduce runtime crash with kotlin.incremental.js.ir=true

repr_ic_kjs_runtime_crash
oleksandr.karpovich 1 year ago
parent
commit
2ab43e280f
  1. 1
      examples/falling-balls/build.gradle.kts
  2. 5
      examples/falling-balls/gradle.properties
  3. 6
      examples/falling-balls/jsApp/build.gradle.kts
  4. 9
      examples/falling-balls/jsApp/src/jsMain/kotlin/main.js.kt
  5. 2
      examples/falling-balls/jsApp/src/jsMain/resources/index.html
  6. 2
      examples/falling-balls/jsApp/webpack.config.d/nosourcemaps.js
  7. 5
      examples/falling-balls/settings.gradle.kts
  8. 9
      examples/falling-balls/shared/build.gradle.kts

1
examples/falling-balls/build.gradle.kts

@ -14,5 +14,6 @@ allprojects {
google()
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev/")
}
}

5
examples/falling-balls/gradle.properties

@ -11,6 +11,7 @@ kotlin.native.useEmbeddableCompilerJar=true
kotlin.mpp.androidSourceSetLayoutVersion=2
# Enable kotlin/native experimental memory model
kotlin.native.binary.memoryModel=experimental
kotlin.version=1.8.20
kotlin.version=1.9.20-dev-6473
agp.version=7.1.3
compose.version=1.4.1
compose.version=1.5.0-dev1114
#kotlin.incremental.js.ir=false

6
examples/falling-balls/jsApp/build.gradle.kts

@ -12,6 +12,9 @@ kotlin {
val jsMain by getting {
dependencies {
implementation(project(":shared"))
implementation(compose.runtime)
implementation(compose.ui)
implementation(compose.material)
}
}
}
@ -21,3 +24,6 @@ compose.experimental {
web.application {}
}
compose {
kotlinCompilerPlugin.set("0.0.0-1.9.20-dev-6336")
}

9
examples/falling-balls/jsApp/src/jsMain/kotlin/main.js.kt

@ -3,13 +3,18 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE.txt file.
*/
import androidx.compose.material.TextField
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.window.CanvasBasedWindow
import androidx.compose.ui.window.Window
import org.jetbrains.skiko.wasm.onWasmReady
@OptIn(ExperimentalComposeUiApi::class)
fun main() {
onWasmReady {
Window("Falling Balls") {
MainView()
CanvasBasedWindow("Compose/JS sample", canvasElementId = "canvas1") {
TextField("Abc", {})
// MainView()
}
}
}

2
examples/falling-balls/jsApp/src/jsMain/resources/index.html

@ -25,7 +25,7 @@
<body>
<h1>compose multiplatform web demo</h1>
<div>
<canvas id="ComposeTarget" width="800" height="600"></canvas>
<canvas id="canvas1" width="800" height="600"></canvas>
</div>
<script src="jsApp.js"> </script>
</body>

2
examples/falling-balls/jsApp/webpack.config.d/nosourcemaps.js

@ -0,0 +1,2 @@
// config.devtool = undefined; // default is `eval-source-map`
// config.mode = 'none'; // default is `development` (for jsBrowserRun).

5
examples/falling-balls/settings.gradle.kts

@ -2,6 +2,7 @@ pluginManagement {
repositories {
gradlePluginPortal()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev/")
google()
}
@ -22,7 +23,7 @@ pluginManagement {
rootProject.name = "falling-balls-mpp"
include(":androidApp")
//include(":androidApp")
include(":shared")
include(":desktopApp")
//include(":desktopApp")
include(":jsApp")

9
examples/falling-balls/shared/build.gradle.kts

@ -55,8 +55,9 @@ kotlin {
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material)
@OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
implementation(compose.components.resources)
// @OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
// implementation(compose.components.resources)
// 1.6.4
}
}
val androidMain by getting {
@ -99,3 +100,7 @@ android {
targetCompatibility = JavaVersion.VERSION_11
}
}
compose {
kotlinCompilerPlugin.set("0.0.0-1.9.20-dev-6336")
}
Loading…
Cancel
Save