Skip to content
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 scala 3 support #42

Merged
merged 2 commits into from
Sep 25, 2022
Merged

Conversation

endertunc
Copy link
Contributor

Resolves #33

Let me know if you have any feedback. Happy to address them.

BTW, thanks for the library!


scalaVersion := scala213Version
scalaVersion := scala3Version
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated default version to scala3 but this might not be desirable given that editor supports are still trying to catch up. Happy to set it back to 2.13.

val ZioCatsVersion = "3.3.0"
val DoobieVersion = "1.0.0-RC2"
val AnormVersion = "2.6.10"
val H2Version = "1.4.200"
val AnormVersion = "2.7.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

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


/** Converts a Doobie stream to a ZStream. Note that you can provide a queue size, default value is the same as in ZIO. */
final def tzioStream[A](q: => fs2.Stream[Query, A], queueSize: => Int = DefaultStreamQueueSize)(implicit trace: Trace): TranzactIOStream[A] =
ZStream.serviceWithStream[Connection] { c =>
c.transP.apply(q).toZStream(queueSize)
}.mapError(DbException.Wrapped)
}.mapError(DbException.Wrapped.apply)
Copy link
Contributor Author

@endertunc endertunc Sep 16, 2022

Choose a reason for hiding this comment

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

There were warnings from compiler suggesting me to explicitly call apply methods so I did.

build.sbt Outdated

val scala2allVersionsOption = Seq(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not all options in allVersionsOption were applicable in scala3 so I extracted the ones that's not applicable in scala3 to scala2allVersionsOption

@gaelrenoux
Copy link
Owner

Looks good to me! Made a small fix and merging.

@gaelrenoux gaelrenoux merged commit 09e40b8 into gaelrenoux:master Sep 25, 2022
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.

Scala 3 artefacts?
2 participants