Hi folks! Thought I'd spend some time exploring Ko...
# multiplatform
t
Hi folks! Thought I'd spend some time exploring Kotlin Multiplatform and started with the tutorial over here. Got rekt on the first code I wrote. 😞 IntelliJ (Ultimate) is complaining:
Cannot access class 'io.ktor.util.pipeline.PipelineContext'. Check your module classpath for missing or conflicting dependencies
On these lines:
Copy code
//file:Server.kt
fun main() {
    embeddedServer(Netty, 9090) {
        routing {
            get("/hello") {
                this // <- does not compile
//                call.respondText("Hello world") // <- does not compile either
            }
        }
    }.start(wait = true)
}
The Gradle build works fine. Seems like it's an issue where the modules have separate dependencies, but IntelliJ doesn't make the distinction (loads everything on to the classpath) which ends up in conflicting dependencies. I've got Java 11 as the Project SDK (but neither 8 nor 17 don't work either), and I've got the latest Kotlin version (currently 221-1.7.10-release-333-IJ5591.52)