Skip to content

Commit

Permalink
Remove Scala 2.11 support && Update ZIO to 2.0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
guizmaii committed Apr 11, 2023
1 parent 47d36c5 commit a935423
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: ['adopt@1.8', 'adopt@1.11']
java: ['adopt@1.8', 'adopt@1.11', 'adopt@1.17']
scala: ['2.12.17', '2.13.10', '3.2.2']
platform: ['JVM', 'JS', 'Native']
steps:
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ addCommandAlias(
";mockNative/compile"
)

val zioVersion = "2.0.10"
val zioVersion = "2.0.12"

lazy val root = (project in file("."))
.aggregate(
Expand Down
3 changes: 1 addition & 2 deletions mock/shared/src/main/scala-2/zio/mock/MockableMacro.scala
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,7 @@ private[mock] object MockableMacro {
wrapInUnsafe(q"rts.unsafe.run(proxy($tag, ..$paramNames)).getOrThrowFiberFailure()")
}

val noParams = info.symbol.paramLists.isEmpty // Scala 2.11 workaround. For some reason isVal == false in 2.11
if (info.symbol.isVal || (noParams && TestVersion.isScala211)) q"$mods val $name: $returnType = $returnValue"
if (info.symbol.isVal) q"$mods val $name: $returnType = $returnValue"
else {
info.symbol.paramLists.map(_.map { ts =>
val name = ts.asTerm.name
Expand Down
22 changes: 3 additions & 19 deletions project/BuildHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -164,20 +164,6 @@ object BuildHelper {
"-Xmax-classfile-name",
"242"
) ++ std2xOptions ++ optimizerOptions(optimize)
case Some((2, 11)) =>
Seq(
"-Ypartial-unification",
"-Yno-adapted-args",
"-Ywarn-inaccessible",
"-Ywarn-nullary-override",
"-Ywarn-nullary-unit",
"-Xexperimental",
"-Ywarn-unused-import",
"-Xfuture",
"-Xsource:2.13",
"-Xmax-classfile-name",
"242"
) ++ std2xOptions
case _ => Seq.empty
}

Expand All @@ -190,14 +176,12 @@ object BuildHelper {

def crossPlatformSources(scalaVer: String, platform: String, conf: String, baseDir: File) = {
val versions = CrossVersion.partialVersion(scalaVer) match {
case Some((2, 11)) =>
List("2.11", "2.11+", "2.11-2.12", "2.x")
case Some((2, 12)) =>
List("2.12", "2.11+", "2.12+", "2.11-2.12", "2.12-2.13", "2.x")
List("2.12", "2.12+", "2.12-2.13", "2.x")
case Some((2, 13)) =>
List("2.13", "2.11+", "2.12+", "2.13+", "2.12-2.13", "2.x")
List("2.13", "2.12+", "2.13+", "2.12-2.13", "2.x")
case Some((3, 0)) =>
List("dotty", "2.11+", "2.12+", "2.13+", "3.x")
List("dotty", "2.12+", "2.13+", "3.x")
case _ =>
List()
}
Expand Down

0 comments on commit a935423

Please sign in to comment.