Ktor: import io.ktor.util.pipeline.* doesn't resolve on Ktor 1.1.0

Created on 24 Dec 2018  路  4Comments  路  Source: ktorio/ktor

Ktor Version

1.1.0

Ktor Engine Used(client or server and name)

Netty

JVM Version, Operating System and Relevant Context

1.8.0_181, OSX, IDEA and Gradle

Feedback

Something weird happens when upgrading to 1.1.0, the PipelineContext disappears. I'm assuming it's not a transitive dependency anymore?

Is there something we need to do to migrate from 1.x to 1.1?

ux

Most helpful comment

For anyone looking how to manually fix this, "translating" the above comment to code, just put this in your build.gradle file:

    compile ("io.ktor:ktor-server-core:$ktor_version") {
        exclude group: 'io.ktor', module: 'ktor-utils-native'
        exclude group: 'io.ktor', module: 'ktor-http-native'
    }
    compile "io.ktor:ktor-utils-jvm:$ktor_version"
    compile "io.ktor:ktor-http-jvm:$ktor_version"

All 4 comments

ktor-server-core has some wrong dependencies, it should rely on ktor-utils-jvm and ktor-http-jvm.

Just exclude the ktor-utils-native and ktor-http-native from ktor-server-core. And add ktor-utils-jvm, ktor-http-jvm manually would fix this issue.

For anyone looking how to manually fix this, "translating" the above comment to code, just put this in your build.gradle file:

    compile ("io.ktor:ktor-server-core:$ktor_version") {
        exclude group: 'io.ktor', module: 'ktor-utils-native'
        exclude group: 'io.ktor', module: 'ktor-http-native'
    }
    compile "io.ktor:ktor-utils-jvm:$ktor_version"
    compile "io.ktor:ktor-http-jvm:$ktor_version"

Do you use a CI pipeline for your releases? This type of basic problem should be automatically detected in CI.

Looks like this was resolved in 1.1.1

Was this page helpful?
0 / 5 - 0 ratings