0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

ZIO2.0.0でRenameされたAPI

Posted at

最近、ZIO2.0.0が正式リリースにされました。
かなりの数のAPIに変更があったようなのでRenameされたものを調べてみました。
以下のPRを確認しましたが他にも多数あるようですべては確認できていません。
#5226
#5229
#5330
#6055

主なもの

ZIO.effect → ZIO.attempt
ZIO.apply → ZIO.attempt
ZIO.effectTotal → ZIO.succeed
ZIO.effectSuspend → ZIO.suspend
ZIO.effectSuspendTotal → ZIO.suspendSucceed
ZIO#run → ZIO#exit
ZManaged.make → ZIO.acquireReleaseWith
ZIO#ensuring_ → ZIO.ensuring
putStrLn → printLine
getStrLn → readLine
access → environmentWith
accessM → environmentWithZIO
provideXXX → provideLayer or provideEnvironment

その他確認できたもの

&&& → zip
*** →
+++ →
<<< →
>>= → flatMap
>>>
>>> → |||
accessM → accessSTM
accessM → accessZIO
acquireReleaseExitWith → acquireReleaseExitWith
andThen →
asEC → asExecutionContext
asService → toLayer
bracket → acquireReleaseWith
bracketAuto → acquireReleaseWithAuto
bracketExit → acquireReleaseExitWith
bracketOnError → acquireReleaseOnErrorWith
bracket_ → acquireRelease
collectAllParN_ → collectAllParNDiscard
collectAllPar_ → collectAllParDiscard
collectAll_ → collectAllDiscard
collectM → collectManaged
collectM → collectSTM
collectM → collectZIO
contramapM → contramapZIO
dimapM → dimapZIO
effect → attempt
effectAsync → async
effectAsyncInterrupt → asyncInterrupt
effectAsyncM → asyncZIO
effectAsyncMaybe → asyncMaybe
effectBlocking → attemptBlocking
effectBlockingCancelable → attemptBlockingCancelable
effectBlockingIO → attemptBlockingIO
effectBlockingInterrupt → attemptBlockingInterrupt
effectSuspend → suspend
effectSuspendMaybeWith → suspendMaybeWith
effectSuspendTotal → suspendSucceed
effectSuspendTotalWith → `suspendSucceedWith``
effectSuspendTotalWith → suspendSucceedWith
effectSuspendWith → suspendWith
effectTotal → succeed
effectTotal → suceed
filterInputM → filterInputZIO
filterOrElse_ → filterOrElse
filterOutputM → filterOutputZIO
first →
flattenM → flattenZIO
foldCauseM → foldCauseManaged
foldCauseM → foldCauseZIO
foldM → foldManaged
foldM → foldSTM
foldM → foldZIO
foldTraceM → foldTraceZIO
foreachParN_ → foreachParNDiscard
foreachPar_ → foreachParDiscard
foreach_ → foreachDiscard
forkAll_ → forkAllDiscard
fromEffect → fromZIO
fromEffectUninterruptible → fromZIOUninterruptible
fromFiberM → fromFiberZIO
fromFunction → access
fromFunctionEither →
fromFunctionFuture →
fromFunctionM → accessManaged
fromFunctionM → accessSTM
fromFunctionM → accessZIO
fromFunctionM → fromFunctionManaged
fromFunctionM → fromFunctionSTM
fromFunctionM → fromFunctionZIO
fromFunctionManaged →
fromFunctionManyM → fromFunctionManyZIO
fromFunctionSTM → accessSTM
fromFunctionZIO → accessZIO
fromService → toLayer
fromServiceM → toLayer
fromServiceManaged → toLayer
fromServiceMany → toLayer
fromServiceManyM → toLayer
fromServiceManyManaged → toLayer
fromServices → toLayer
fromServicesM → toLayer
fromServicesManaged → toLayer
fromServicesMany → toLayer
fromServicesManyManaged → toLayer
get → some
identity →
ifM → ifZIO
ifM → ifZManaged
join →
left →
loop_ → loopDiscard
make → acquireReleaseWith
makeEffect → acquireReleaseAttemptWith
makeEffectTotal → acquireReleaseSucceedWith
makeEffectTotal_ → acquireReleaseSucceed
makeEffect_ → acquireReleaseAttempt
makeExit → bracketExit
makeReserve → fromReservationZIO
make_ → acquireRelease
mapEffect → mapAttempt
mapM → mapZIO
on → onExecutionContext
onFirst →
onLeft →
onRight →
onSecond →
partial → attempt
rejectM → rejectManaged
rejectM → rejectSTM
rejectM → rejectZIO
repeatUntilM → repeatUntilZIO
repeatWhileM → repeatWhileZIO
replicateM → replicateSTM
replicateM → replicateZIO
replicateM_ → replicateSTMDiscard
replicateM_ → replicateZIODiscard
require → someOrFail
retryUntilM → retryUntilZIO
retryWhileM → retryWhileZIO
right →
run → exit
second →
someOrElseM → someOrElseManaged
someOrElseM → someOrElseSTM
someOrElseM → someOrElseZIO
swap →
tapM → tapZIO
to → intoPromise
unlessM → unlessManaged
unlessM → unlessSTM
unlessM → unlessZIO
use_ → useDiscard
validatePar_ → validateParDiscard
validate_ → validateDiscard
whenCaseM → whenCaseManaged
whenCaseM → whenCaseSTM
whenCaseM → whenCaseZIO
whenM → whenManaged
whenM → whenSTM
whenM → whenZIO
||| →
(右側が空白のものは削除されているが代替先が確認できなかったもの)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?