Skip to content

Commit

Permalink
upgrade to Scala 3 to 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
alphaho committed Aug 2, 2023
1 parent 26bb289 commit da8d929
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
fail-fast: false
matrix:
java: ['[email protected]', '[email protected]']
scala: ['2.12.17', '2.13.8', '3.2.1']
scala: ['2.12.17', '2.13.8', '3.3.0']
steps:
- uses: actions/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion project/BuildHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ object BuildHelper {

val Scala212: String = versions("2.12")
val Scala213: String = versions("2.13")
val Scala3: String = versions("3.2") //versions.getOrElse("3.0", versions("3.1"))
val Scala3: String = versions("3.3") //versions.getOrElse("3.0", versions("3.1"))

val zioVersion = "2.0.10"
val zioJsonVersion = "0.5.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ object Derive {
DeriveInstance().deriveInstance[F, A](deriver, schema, top = true)
}

private case class DeriveInstance()(using val ctx: Quotes) extends ReflectionUtils(ctx) {
private case class DeriveInstance()(using val ctx: Quotes) {
val reflectionUtils = ReflectionUtils(ctx)
import reflectionUtils.{MirrorType, Mirror, summonOptional}
import ctx.reflect._

case class Frame(ref: Term, tpe: TypeRepr)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ object DeriveSchema {
DeriveSchema().deriveSchema[T](top = true)
}

private case class DeriveSchema()(using val ctx: Quotes) extends ReflectionUtils(ctx) {
private case class DeriveSchema()(using val ctx: Quotes) {
val reflectionUtils = ReflectionUtils(ctx)
import reflectionUtils.{MirrorType, Mirror}
import ctx.reflect._

case class Frame(ref: Term, tpe: TypeRepr)
case class Stack(frames: List[Frame]) {
def find(tpe: TypeRepr): Option[Term] = frames.find(_.tpe =:= tpe).map(_.ref)
Expand Down

0 comments on commit da8d929

Please sign in to comment.