Closed eygraber closed 1 year ago
@eymar
Need to checkout branch wasm
.
One line command to reproduce:
git clone https://github.com/eygraber/compose-color-picker.git -b wasm && cd compose-color-picker && ./gradlew :sample:webApp:wasmRun
It's an issue in kotlin/wasm: https://youtrack.jetbrains.com/issue/KT-60113/K-Wasm-illegal-cast-when-using-1.9.20-dev
UPD: while the error message is the same, the issue described here could be different. Reopening for now to investigate.
@eygraber I'm not sure exactly what's going on, but I guess some gradle plugins you have applied in the project could override the compose compiiler version?
No runtime exception with this patch:
Index: sample/shared/build.gradle.kts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/sample/shared/build.gradle.kts b/sample/shared/build.gradle.kts
--- a/sample/shared/build.gradle.kts (revision 17b929343fc8c13799d7935408900648bbdce7c3)
+++ b/sample/shared/build.gradle.kts (date 1690965352680)
@@ -30,3 +30,5 @@
}
}
}
+
+compose.kotlinCompilerPlugin.set("1.4.0-dev-wasm09")
\ No newline at end of file
Index: sample/webApp/build.gradle.kts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/sample/webApp/build.gradle.kts b/sample/webApp/build.gradle.kts
--- a/sample/webApp/build.gradle.kts (revision 17b929343fc8c13799d7935408900648bbdce7c3)
+++ b/sample/webApp/build.gradle.kts (date 1690965288287)
@@ -41,4 +41,6 @@
web.application {}
}
+compose.kotlinCompilerPlugin.set("1.4.0-dev-wasm09")
+
rootProject.the<NodeJsRootExtension>().versions.webpack.version = "5.76.2"
Index: library/build.gradle.kts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/library/build.gradle.kts b/library/build.gradle.kts
--- a/library/build.gradle.kts (revision 17b929343fc8c13799d7935408900648bbdce7c3)
+++ b/library/build.gradle.kts (date 1690965288275)
@@ -38,3 +38,5 @@
// }
}
}
+
+compose.kotlinCompilerPlugin.set("1.4.0-dev-wasm09")
\ No newline at end of file
And the color picker is visible on the screen
Feel free to reopen if necessary.
Thank you, I forgot I made a change to how I override the compiler and didn't update that after merging it into my wasm branch. Sorry about that.
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
Describe the bug Getting a
RuntimeError: illegal cast
Affected platforms
Versions
To Reproduce Run
gradle :sample:webApp:wasmRun
from https://github.com/eygraber/compose-color-picker/tree/wasm