cats-effect-testing
cats-effect-testing copied to clipboard
Make ScalaTest retrying effect generic
- Closes #471
Failing binary compatibility:
method ioRetrying()org.scalatest.enablers.Retrying in interface cats.effect.testing.scalatest.AsyncIOSpec does not have a correspondent in current version
So it's the naming - not sure whether to rename it ioRetrying
(it's not IO anymore) for binary compatibility or add ioRetrying
implemented with fRetrying
, which might cause ambiguous implicit resolution.
After some testing I think having an ioRetrying in terms of fRetrying is fine:
def foo[F[_]: Async, T](t: T): F[T] = Async[F].pure(t)
// resolves ioRetrying implicit
def eventuallyIO: IO[String] = {
eventually {
foo[IO, String]("hello")
}
}
// resolves fRetrying implicit
def eventuallyF[F[_]: Async]: F[String] = {
eventually {
foo[F, String]("hello")
}
}
@sh0hei I think you approved the last build, is it possible to approve again?
@sh0hei any chance you can run the build? Otherwise if this is deemed no longer necessary I can close it.