-
Notifications
You must be signed in to change notification settings - Fork 25
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
Conversation
|
||
scalaVersion := scala213Version | ||
scalaVersion := scala3Version |
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.
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" |
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.
Scala3 support recently added to anorm!
playframework/anorm#474
https://github.com/playframework/anorm/releases/tag/2.7.0
|
||
/** 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) |
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.
There were warnings from compiler suggesting me to explicitly call apply
methods so I did.
build.sbt
Outdated
|
||
val scala2allVersionsOption = Seq( |
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.
Not all options in allVersionsOption
were applicable in scala3 so I extracted the ones that's not applicable in scala3 to scala2allVersionsOption
Looks good to me! Made a small fix and merging. |
Resolves #33
Let me know if you have any feedback. Happy to address them.
BTW, thanks for the library!