Skip to content

Upgrading to doobie 1.0.0-RC1 (and Cats-Effect 3)#31

Merged
gaelrenoux merged 6 commits intomasterfrom
Doobie-1-Cats-3
Sep 10, 2021
Merged

Upgrading to doobie 1.0.0-RC1 (and Cats-Effect 3)#31
gaelrenoux merged 6 commits intomasterfrom
Doobie-1-Cats-3

Conversation

@gaelrenoux
Copy link
Copy Markdown
Owner

@gaelrenoux gaelrenoux commented Sep 5, 2021

So, this is mostly a rebase from #28 with a few changes:

  • I've upgraded the Doobie and ZIO versions.
  • I've replaced the call to effectTotal with succeed, because I don't think there's any effect happening in there (discussion below).
  • I've integrated @PawelJ-PL's changes to have the Clock service be provided, instead of using the default one.

@hmemcpy @PawelJ-PL Your comments are especially welcomed.

@gaelrenoux gaelrenoux added the enhancement New feature or request label Sep 5, 2021
@gaelrenoux gaelrenoux self-assigned this Sep 5, 2021
}
final def connectionFromJdbc(env: TranzactioEnv, connection: JdbcConnection): ZIO[Any, Nothing, Connection] = {
ZIO.runtime[TranzactioEnv].flatMap { implicit r: zio.Runtime[TranzactioEnv] =>
ZIO.succeed[Connection] {
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@hmemcpy I'm using succeed instead of effectTotal here, because I don't think there's any effecting code going under the hood here. Am I missing something ?

val tran = Transactor(connection, connect, interp, Strategy.void)
Has(tran)
}
}.provide(env)
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@PawelJ-PL In your code, you used provideLayer, I think we can just use provide here.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍 I can't remember, what I used provideLayer 😄

@gaelrenoux gaelrenoux linked an issue Sep 5, 2021 that may be closed by this pull request
@gaelrenoux gaelrenoux merged commit a71d92d into master Sep 10, 2021
@gaelrenoux gaelrenoux deleted the Doobie-1-Cats-3 branch September 10, 2021 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support doobie 1.0.0 (cats-effect 3 compatible)

3 participants