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

Missing sttp.monad.MonadError#blocking overriding for cats-effect #1991

Closed
flipp5b opened this issue Nov 7, 2023 · 0 comments · Fixed by #1993
Closed

Missing sttp.monad.MonadError#blocking overriding for cats-effect #1991

flipp5b opened this issue Nov 7, 2023 · 0 comments · Fixed by #1993

Comments

@flipp5b
Copy link
Contributor

flipp5b commented Nov 7, 2023

Follow-up to a thread at Discourse.

For now, CatsMonadAsyncError uses the default implementation of blocking (see sttp.monad.MonadError#blocking):

def blocking[T](t: => T): F[T] = eval(t)

eval is implemented as follows (see sttp.client3.impl.cats.CatsMonadError#eval):

override def eval[T](t: => T): F[T] = F.delay(t)

As a result, Sync[F].delay is used for blocking actions. That seems to be wrong.

flipp5b added a commit to flipp5b/sttp that referenced this issue Nov 7, 2023
flipp5b added a commit to flipp5b/sttp that referenced this issue Nov 7, 2023
adamw pushed a commit to flipp5b/sttp that referenced this issue Nov 7, 2023
flipp5b added a commit to flipp5b/sttp that referenced this issue Nov 7, 2023
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 a pull request may close this issue.

1 participant