-
Couldn't load subscription status.
- Fork 1.4k
Add ZIO.fromFunctionZIO #9782
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
Add ZIO.fromFunctionZIO #9782
Conversation
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.
Love it! Too bad we'll have overlap between ZIO.serviceWith and ZIO.fromFunction for the Function1 case but I think that should be OK
|
One more comment: Can we rename this method to |
0fb8d38 to
567c671
Compare
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.
Change overall LGTM - though it appears you had a faulty merge, including some other commits in your history.
This comment was marked as outdated.
This comment was marked as outdated.
8cee651 to
b81d3fd
Compare
This comment was marked as resolved.
This comment was marked as resolved.
b81d3fd to
3208b18
Compare
|
@adrian-2414745 can you run fmt? |
3208b18 to
7dc310e
Compare
This comment was marked as outdated.
This comment was marked as outdated.
7dc310e to
119841d
Compare
119841d to
2f44df3
Compare
2f44df3 to
5d6391e
Compare
|
|
||
| type WithOut[In, Out0] = ZIOFunctionConstructor[In] { type Out = Out0 } | ||
|
|
||
| implicit def function1Constructor[A: Tag, R, E, Z: Tag] |
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 think you missed my previous comment. The : Tag on Z is unnecessary as far as I can tell (in this and other methods)
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.
missed it. done
5d6391e to
0c9c13f
Compare
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! Looks like a great addition!
Just like ZLayer.fromFunction.
The main pain point which triggered me was that in ZIO test i had to access all services individually
now it is possible to get many services in one go