Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ioleo
Copy link
Member

@ioleo ioleo commented Aug 10, 2019

Fixes #1346

  • Deprecated all succeedLazy methods.
  • Delegated all deprecated methods to succeed.
  • Added missing succeed to ZSink, Sink and ZStreamChunk.
  • Removed succeedLazy test from RTSSpec
  • Replaced succeedLazy with effect or effectTotal where laziness was essential and with succeed where lazyness was not required
  • Updated docs

@ioleo ioleo force-pushed the deprecate-succeed-lazy branch from 93e1e2e to 8c696dd Compare August 10, 2019 15:02
@ioleo ioleo force-pushed the deprecate-succeed-lazy branch from 8c696dd to 1021af8 Compare August 10, 2019 15:08
@ioleo ioleo force-pushed the deprecate-succeed-lazy branch from 7aa40ef to 9d27e5d Compare August 10, 2019 16:52
@ioleo ioleo force-pushed the deprecate-succeed-lazy branch from 9d27e5d to e18cb07 Compare August 10, 2019 16:59
@ioleo ioleo force-pushed the deprecate-succeed-lazy branch 2 times, most recently from 03f88bb to 96e92f8 Compare August 10, 2019 18:48
@ioleo ioleo force-pushed the deprecate-succeed-lazy branch 2 times, most recently from 849ffd9 to dd24d0d Compare August 10, 2019 20:09
@ioleo ioleo force-pushed the deprecate-succeed-lazy branch from dd24d0d to c1792c1 Compare August 10, 2019 20:18
@ioleo
Copy link
Member Author

ioleo commented Aug 10, 2019

@shankarshastri Fixed docs.

@neko-kai
Copy link
Member

Delegated all deprecated methods to succeed.

I think we should delegate to effectTotal to not break existing usages and since effectTotal is now the only blessed way to delay evaluation.

Copy link
Member

@neko-kai neko-kai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the hard work! 🙏 Some comments, and I do think the deprecated methods should redirect to effectTotal (or possibly stay unmodified) to not break callers on upgrade.

@vasilmkd
Copy link
Contributor

What is the impact of this on ZStream, given that ZManaged.succeedLazy is used to implement effectful folding? /cc @iravid

@iravid
Copy link
Member

iravid commented Aug 11, 2019

ZManaged.succeedLazy(a) is just ZManaged.fromEffect(ZIO.effectTotal(a)) so we can name that ZManaged.effectTotal. Can be done in a separate PR as other data types have a succeedLazy too.

@ioleo ioleo force-pushed the deprecate-succeed-lazy branch 2 times, most recently from 4806bcf to 9836ca5 Compare August 11, 2019 20:32
@ioleo
Copy link
Member Author

ioleo commented Aug 11, 2019

@Kaishh
There is no effectTotal on Fiber, STM, Schedule, ZSchedule, Sink, ZSink, StreamPure, ZStream and ZStreamChunk. For all others I've switched to effectTotal as you sugested. For Managed / ZManaged I introduced effectTotal as @iravid suggested.

@ioleo ioleo force-pushed the deprecate-succeed-lazy branch from 9836ca5 to ba400c7 Compare August 11, 2019 23:00
@ioleo ioleo force-pushed the deprecate-succeed-lazy branch from ba400c7 to 72c2462 Compare August 12, 2019 06:56
@jdegoes
Copy link
Member

jdegoes commented Aug 13, 2019

@ioleo Excellent work, thank you for this! 🙏

@jdegoes jdegoes merged commit 062024e into zio:master Aug 13, 2019
@ioleo ioleo deleted the deprecate-succeed-lazy branch August 13, 2019 16:02
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.

Deprecate all succeedLazy

6 participants