Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ScalaTest retrying effect generic #472

Open
wants to merge 2 commits into
base: series/1.x
Choose a base branch
from

Conversation

bcarter97
Copy link

@bcarter97
Copy link
Author

bcarter97 commented Jul 1, 2023

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")
  }
}

@bcarter97
Copy link
Author

@sh0hei I think you approved the last build, is it possible to approve again?

@bcarter97
Copy link
Author

@sh0hei any chance you can run the build? Otherwise if this is deemed no longer necessary I can close it.

@sh0hei sh0hei self-requested a review December 24, 2023 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement ScalaTest ioRetrying with a generic effect type
1 participant