I'm running into ClassCastExceptions when using 4....
# apollo-kotlin
s
I'm running into ClassCastExceptions when using 4.0.0-beta.5 and onwards for Kotlin/Js (specifically creating a website with Kobweb)
Kotlin 1.9.23 since kobweb is still blocked for 2.0
image.png
I'm seeing a similar issue https://github.com/apollographql/apollo-kotlin/issues/5801 except that I don't have to call any build function, for me it crashes as soon as i have the dependency. is it certain that this is fixed for K2 already?
b
Exactly I was about to link this issue 😅. Unfortunately, with JS, AK 4 needs your project to use Kotlin 2.
s
alright, I see. beta.4 is still functional so I guess I can wait out a bit longer
b
(til kobweb)
s
it's building on top of compose html, so you get a proper dom and not a chunky canvas ^^
b
yeah - Do you know if kobweb can't update to Kotlin 2 or is it just that it's not done yet?
s
Users are asking us when K2 support is going to land, but we are currently blocked due to a pretty major incremental compilation issue. You can learn more here and here. We are keeping a close eye on it and will support K2 as soon as we can!
👀 1
b
it's building on top of compose html, so you get a proper dom and not a chunky canvas ^^
That sounds cool! I'm playing with K/JS a little bit these days, I'll probably have a look at Compose HTML too.
s
yeah Kobweb is definitely something to check out for web apps. I already have a project running it with the apollo client, in combination with mobile and desktop targets. prior beta.5 ofc but other than that it's working great
b
very cool! If it's a public thing don't hesitate to share a link, we're always curious to see the lib used in the wild 🙂
s
you can see the site here, but I haven't open sourced it yet 😅
❤️ 1
😮 1
b
very cool! 🤩
❤️ 1
plus one 1
m
> Kotlin 1.9.23 since kobweb is still blocked for 2.0 @S. Just curious: could you still use 2.0 in your build but use the kobweb dependencies compiled against 1.9? K/JS has backward binary compatibility now so it should work I think?
s
I don't think so. I would also need to bump compose to 1.6.10 or smth which is compatible with kotlin 2.0, however the last compose version compatible with kobweb is 1.6.2 :/
m
Ah I see!
Damn
s
as soon as you throw in compose there's a scary limbo between versions 😅 But I'll just wait it out, it's still fully functional
👍 1
m
Yep, didn’t think of the compiler plugins coupling there 😅