Kotlin / kotlin-wasm-examples

Examples with Kotlin/Wasm
https://kotl.in/wasm
Apache License 2.0
527 stars 60 forks source link

Compose 1.5.1 dev wasm01 #25

Closed eymar closed 1 year ago

joreilly commented 1 year ago

Is there combination of versions/settings that should work with Kotlin 1.9.20-Beta? I'm struggling with project here but it's also complicated by use of wasm versions of ktor/serialisation etc.

eymar commented 1 year ago

@joreilly yes, compose compiler plugin 1.5.2.1-Beta should work here too.

It has to be set manually though for now

joreilly commented 1 year ago

I'm using that for projects that don't have wasm.....but for wasm ones I thought different version was needed right now?

eymar commented 1 year ago

compose { kotlinCompilerPlugin.set("1.5.2.1-Beta") kotlinCompilerPluginArgs.add("suppressKotlinVersionCompatibilityCheck=true") }

joreilly commented 1 year ago

I'm also getting tripped up on Could not find org.jetbrains.kotlin:kotlin-stdlib-wasm-js:1.9.0-Beta when using wasm ktor dependency

joreilly commented 1 year ago

anyway, I didn't mean to hijack this PR :) .....was wondering mostly if plan was to update it to Kotlin 1.9.20-Beta so I could at least use as reference

eymar commented 1 year ago

I'm also getting tripped up on Could not find org.jetbrains.kotlin:kotlin-stdlib-wasm-js:1.9.0-Beta when using wasm ktor dependency

Could it be older ktor that wants 1.9.0 stdlib?

Actually I don't see that ktor was published for k/wasm. Was it published for 1.9.0?

joreilly commented 1 year ago

Was using it in wasm branch of. BikeShare sample (https://github.com/joreilly/BikeShare/tree/wasm) ....using for example

                implementation("io.ktor:ktor-client-core:2.3.1-wasm0")
                implementation("io.ktor:ktor-serialization-kotlinx-json:2.3.1-wasm0")
                implementation("io.ktor:ktor-client-content-negotiation:2.3.1-wasm0")
                implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.0-RC-wasm0")
                implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.0-RC-wasm0")
                implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1-wasm0")
eymar commented 1 year ago

https://maven.pkg.jetbrains.space/kotlin/p/wasm/experimental/io/ktor/ktor/ 2.3.3-wasm0 could be a better one

eymar commented 1 year ago

Also for other libs just in case:

atomicfu 0.22.0-wasm0 coroutines 1.7.2-wasm1 datetime 0.4.0-wasm2 (without Native) serialization 1.6.0-wasm0

joreilly commented 1 year ago

I ended up having to do following etc

|implementation("io.ktor:ktor-client-core:2.3.3-wasm0") {
    exclude(group = "org.jetbrains.kotlin")
}

I'm not sure why the resolutionStrategy stuff didn't work....could be something still wrong in my setup