I have the following ZIO project
object MinimalCounterexample extends ZIOAppDefault {
val fetch = {
for {
result <- Client.request("http://localhost:9123/whatever")
data <- result.body.asString
_ <- zio.Console.printLine(data)
} yield ()
}
override def run = fetch.provide(
EventLoopGroup.auto(),
ChannelFactory.auto,
)
}
When I compile this I get this error:
io.netty.channel.ChannelFactory[io.netty.channel.Channel] does not conform to bound <: AnyKind
What gives? How do I fix this?
The problem is due to passing
-Yno-kind-polymorphism
to the scala compiler.Removing this flag from
scalacOptions
inbuild.sbt
fixes the problem.