hey :slightly_smiling_face: as a newbee in KMP and...
# kotlinx-rpc
c
hey 🙂 as a newbee in KMP and RPC i just tried to reproduce this krpc webapp example here in my repository https://github.com/christian-draeger/Korpus but running into the problem that i can not import dependencies in the commonMain sources (see screenshot). even though gradle build is passing - what am i doing wrong? Furthermore i noticed following in the krpc ktor-web-app samples readme the following hint "Warning: the code is broken due to https://youtrack.jetbrains.com/issue/KT-71757/ No workarounds for now" --> but regarding the ticket its saying "issue was fixed by updating Kotlin from 2.0.10 to 2.0.20." - is the hint in the readme thereby obsolete? really hope someone can help. my current bread and butter stack is typescript nextjs with trpc and kotlin spring boot for pure backends. and i really would love to do some fullstack web apps in kotlin to get rid of the typescript stuff 😄 krpc would be one essential step to do so 🙂
a
Hey! Thank you for noticing obsolete readme, I'll fix it! About the issue you having, if it is still relevant, I'll take a look a little later today and will update you on this
gratitude thank you 1
Hate to say it, but works on my machine
c
hey, first of all, really thankful for investigating. i just changes this yesterday to fix the compilation errors, but not sure if it has any impact since its not using
commonMainApi
to declare dependencies, as in the krpc example, anymore. but this change allowed me, and probably you, to compile. but: when i run the app with
./gradlew run
or
./gradlew runApp
i get following exception:
Copy code
Exception in thread "main" io.ktor.server.engine.internal.ReloadingException: Module function cannot be found for the fully qualified name 'ApplicationKt.module'
        at io.ktor.server.engine.internal.CallableUtilsKt.executeModuleFunction(CallableUtils.kt:27)
        at io.ktor.server.engine.EmbeddedServer.launchModuleByName$lambda$26(EmbeddedServerJvm.kt:354)
        at io.ktor.server.engine.EmbeddedServer.avoidingDoubleStartupFor(EmbeddedServerJvm.kt:378)
        at io.ktor.server.engine.EmbeddedServer.launchModuleByName(EmbeddedServerJvm.kt:353)
        at io.ktor.server.engine.EmbeddedServer.instantiateAndConfigureApplication$lambda$25(EmbeddedServerJvm.kt:334)
        at io.ktor.server.engine.EmbeddedServer.avoidingDoubleStartup(EmbeddedServerJvm.kt:360)
        at io.ktor.server.engine.EmbeddedServer.instantiateAndConfigureApplication(EmbeddedServerJvm.kt:332)
        at io.ktor.server.engine.EmbeddedServer.createApplication(EmbeddedServerJvm.kt:142)
        at io.ktor.server.engine.EmbeddedServer.start(EmbeddedServerJvm.kt:271)
        at io.ktor.server.cio.EngineMain.main(EngineMain.kt:25)
        at codes.draeger.korpus.ApplicationKt.main(Application.kt:13)
a
Oh, this is old config in the sample project, the main class FQ name is obsolete. I'll change it with the README thing, thanks!
🎉 1