Disclaimer: I am somethat new to Kotlin and Ktor, so I am not entirely sure this is actually a bug. Maybe I am making a mistake myself. However I have been trying to precisely follow the Readme and I am running into a problem when trying to install RFC7807Problems.
This is my Application.kt:
package com.example
import com.example.plugins.configureDependencyInjection
import com.example.plugins.configureRouting
import com.example.plugins.configureSecurity
import com.example.plugins.configureSerialization
import com.tyntec.ktor.problem.RFC7807Problems
import io.ktor.http.*
import io.ktor.server.application.*
import io.ktor.server.engine.*
import io.ktor.server.netty.*
fun main() {
embeddedServer(Netty, port = 8080, host = "0.0.0.0") {
configureRouting()
configureSerialization()
configureSecurity()
configureDependencyInjection()
install(RFC7807Problems) {}
}
.start(wait = true)
}
At install(RFC7807Problems) {} I get:
Type mismatch.
Required:
Plugin<TypeVariable(P), TypeVariable(B), TypeVariable(F)>
Found:
RFC7807Problems.Feature
I'm working on Kotlin version 1.7.10 and Ktor version 2.0.3.
Any chance there is a conflict resulting from the recent versions of Ktor and Kotlin?
Disclaimer: I am somethat new to Kotlin and Ktor, so I am not entirely sure this is actually a bug. Maybe I am making a mistake myself. However I have been trying to precisely follow the Readme and I am running into a problem when trying to install
RFC7807Problems.This is my
Application.kt:At
install(RFC7807Problems) {}I get:I'm working on Kotlin version
1.7.10and Ktor version2.0.3.Any chance there is a conflict resulting from the recent versions of Ktor and Kotlin?