https://kotlinlang.org logo
#compose-web
Title
# compose-web
o

Oleksandr Karpovich [JB]

06/01/2021, 7:30 PM
Hey everyone! We've published a new version 0.0.0-web-dev-14 - https://github.com/JetBrains/compose-jb/releases/tag/0.0.0-web-dev-14 It's using kotlin 1.5.10 and also adds some API changes (even breaking ones). We are sorry for inconvenience. Let us know how your migration goes if you give it a chance :) Thanks a lot!
K 4
💪 1
🎉 23
j

John O'Reilly

06/01/2021, 10:52 PM
Am getting following after updating to this version (and making updates based in breaking changes mentioned)....am using Kotlin 1.5.10
Copy code
java.lang.IllegalStateException: could not convert sym to ClassifierSymbol
	at org.jetbrains.kotlin.backend.common.serialization.IrFileDeserializer.deserializeSimpleType(IrFileDeserializer.kt:171)
	at org.jetbrains.kotlin.backend.common.serialization.IrFileDeserializer.deserializeIrTypeData(IrFileDeserializer.kt:214)
full stack trace
h

hfhbd

06/02/2021, 12:05 AM
j

John O'Reilly

06/02/2021, 6:52 AM
thanks @hfhbd, that look like it's the issue then
o

Oleksandr Karpovich [JB]

06/02/2021, 7:12 AM
I'll look into this today
👍 1
🚀 1
s

Sam

06/02/2021, 8:46 AM
Upgrading from dev-11 to dev-14. I'm having Webpack problem:
Copy code
Failed to compile.

Module not found: Error: Can't resolve 'crypto' in '{project path}'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
	- add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }'
	- install 'crypto-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
	resolve.fallback: { "crypto": false }
I've been using
webpack.config.d
directory to customize Webpack config, but the error remains even after removing this directory. If I run
./gradlew assemble
it fails with the error ☝️. Running
jsBrowserRun
task throws the same error in runtime right after the app loads in browser.
o

Oleksandr Karpovich [JB]

06/02/2021, 9:00 AM
Hi @Sam! Does this error occur using dev-13? If you don't mind trying it
👀 1
s

Sam

06/02/2021, 9:11 AM
@Oleksandr Karpovich [JB] Everything works fine on dev-13
🙏 1
h

hfhbd

06/02/2021, 9:19 AM
@Sam Which libraries do you use? If Ktor <= 1.5.4-> https://youtrack.jetbrains.com/issue/KT-46082
🙏 1
s

Sam

06/02/2021, 9:23 AM
I'm using
io.ktor:ktor-client-js
and
io.ktor:ktor-client-serialization
version 1.5.4. I'll try the patch, thanks! EDIT: webpack patch works fine 👍
🙏 1
🔥 1
o

Oleksandr Karpovich [JB]

06/02/2021, 10:59 AM
there is a little update: we've published another build
Copy code
0.0.0-web-dev-14.1
that overrides coroutines version - 1.5.0 (although androidx doesn't have it yet - https://android-review.googlesource.com/c/platform/frameworks/support/+/1717755) There're no other changes. dev-14.1 should resolve this issue https://github.com/JetBrains/compose-jb/issues/734 Also tested with "People in Space" project. To make it run, I had to update ktor version
ktor = "1.6.0"
(not sure if it aligns with the plans):
Copy code
const val kotlin = "1.5.10"
    const val kotlinCoroutines = "1.5.0"
    const val ktor = "1.6.0"
✔️ 1
🙏 1
j

John O'Reilly

06/02/2021, 11:56 AM
@Oleksandr Karpovich [JB] just did quick test here and it's working now with that 14.1 version
👍 1
🙏 1
btw if people are trying it out, the 1.5 related changes to PeopleInSpace are in kotlin_1_5 branch until all various dependencies line up (that's what I was testing with)
d

darkmoon_uk

06/03/2021, 7:23 AM
...is it right that multiplatform widgets in the package
org.jetbrains.compose.common.*
are currently provided via the web-named dependencies `compose.web.core`/`compose.web.widgets`? It doesn't feel right to say 'web' from a common source-set 🤔 Is there an agnostically-named artifact that I'm missing?
t

Tomáš Hubálek

06/03/2021, 1:59 PM
After updating to
0.0.0-web-dev-14.1
(followed https://github.com/JetBrains/compose-jb/releases/tag/0.0.0-web-dev-14) my app stopped working with following error:
Copy code
Impulse-serverApp.js?2635:94764 Uncaught RangeError: Maximum call stack size exceeded
    at start (Impulse-serverApp.js?2635:94764)
    at ComposerImpl.startRestartGroup_0 (Impulse-serverApp.js?2635:96609)
    at Text$composable_0 (Impulse-serverApp.js?2635:124639)
    at _no_name_provided__609.invoke_1091 (Impulse-serverApp.js?2635:124746)
    at eval (Impulse-serverApp.js?2635:124839)
    at ComposableLambdaImpl.invoke_667 (Impulse-serverApp.js?2635:111790)
    at _no_name_provided__608.invoke_1089 (Impulse-serverApp.js?2635:124728)
    at eval (Impulse-serverApp.js?2635:124846)
    at TagElement$composable (Impulse-serverApp.js?2635:118083)
    at Span$composable (Impulse-serverApp.js?2635:118875)
It looks like stack overflow error. Any idea how to find root cause?
Never mind, it was my fault. I called recursively the same composable.
jetpack compose 1
3 Views