-
Notifications
You must be signed in to change notification settings - Fork 122
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
Adding helper function to instanciate caches within Cats Resource #220
Conversation
implicit val io: Mode[IO] = new Mode[IO] { | ||
val M: Async[IO] = asyncForCatsEffectAsync[IO] | ||
} | ||
object lowPrioModes { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused. Why do you need to split this into 2 objects? This would be a breaking change for anyone who is using cats-effect Async
but not IO
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yeah you're right. I was intending to make this a proper lowPrio trait but screwed it up. I had ambigous implicit issues for Async[IO]
due to both the explicit instance io
and the def async
matching. Why are those both in there and not just the async
one since that should cover cats IO
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah well now I have an odd diverging implicit expansion for type cats.effect.Async[F]
I'll takle this tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explanation of why both IO
and Async
are there: #173 (comment)
But the IO
one could probably be removed without anyone noticing, if it's causing you problems.
So even though all the tests are passing now I have a weird situation provoking "diverging implicits"
|
I fiddled around with the implicit resolution error but without success. So any help is welcome. I'll try to find a second pair of eyes to have a look at this. |
I couldn't figure out where and what sort of meaningful tests to add. so I'd be happy for any pointers.