-
Couldn't load subscription status.
- Fork 1.4k
Add support for polymorphic service types to mockable macro (#4717) #4718
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
Conversation
59301a0 to
9002068
Compare
|
@ollyw Thanks for your work on this! Looks like the build has stalled. Can you force a rebuild by committing something benign? |
9002068 to
6a92b87
Compare
6a92b87 to
246f6f3
Compare
5ba81b3 to
f331271
Compare
|
@jdegoes the build has past now. I think it had to do with the fact that CircleCI didn't have permissions on my github account |
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.
Thank you!
|
Hi all. I know that it's already resolved, but I have some issues with the current implementation. trait Service[R, E, A] {
val static: ZIO[R, E, A]
def zeroParams: ZIO[R, E, A]
def zeroParamsWithParens(): ZIO[R, E, A]
def singleParam(a: Int): ZIO[R, E, A]
def manyParams(a: Int, b: String, c: Long): ZIO[R, E, A]
def manyParamLists(a: Int)(b: R)(c: Long): ZIO[R, E, A]
}As you see, not found: type R
case object ManyParamLists extends Effect[(Int, R, Long), Throwable, Double] Is it a known limitation or simply was not taken into account? |
|
@aalbul the mockable macro has lots of more advanced cases that aren't currently supported. I have experimental version of the macro that I haven't upstreamed that supports a wider range of use cases. If I get some time this week I'll see if it supports your use case, and what effort it will take to upstream |
|
Cool! It would be great! |
|
Sorry @aalbul, I didn't have time to look at this and am unlikely to get a chance to look again any time soon |
Implementation for #4718
This implementation seems to work, but am keen for advice on how to improve it. Perhaps there are some corner cases missed?