Skip to content

Commit

Permalink
Merge pull request #76 from softwaremill/deps-302
Browse files Browse the repository at this point in the history
Enable Scala.JS for Scala3, update dependencies
  • Loading branch information
adamw authored Oct 11, 2021
2 parents ab2855c + 56c8a53 commit 1c022ec
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
15 changes: 10 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import com.softwaremill.SbtSoftwareMillCommon.commonSmlBuildSettings
import com.softwaremill.Publish.{updateDocs, ossPublishSettings}
import com.softwaremill.UpdateVersionInDocs

val scala211 = "2.11.12"
val scala212 = "2.12.13"
val scala213 = "2.13.5"
val scala3 = "3.0.0"
val scala212 = "2.12.15"
val scala213 = "2.13.6"
val scala3 = "3.0.2"

val scalaIdeaVersion = scala3 // the version for which to import sources into intellij

Expand Down Expand Up @@ -65,14 +67,17 @@ lazy val quicklens = (projectMatrix in file("quicklens"))
libraryDependencies ++= compilerLibrary(scalaVersion.value),
versionSpecificScalaSources,
libraryDependencies ++= Seq("flatspec", "shouldmatchers").map(m =>
"org.scalatest" %%% s"scalatest-$m" % "3.2.9" % Test
"org.scalatest" %%% s"scalatest-$m" % "3.2.10" % Test
)
)
.jvmPlatform(
scalaVersions = List(scala211, scala212, scala213, scala3)
)
.jsPlatform(
scalaVersions = List(scala212, scala213) // TODO: add scala3
scalaVersions = List(scala212, scala213, scala3),
Test / test := {
if (scalaVersion.value == scala3) {} else (Test / test).value
}
)
.nativePlatform(
scalaVersions = List(scala211, scala212, scala213),
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.5.2
sbt.version=1.5.5
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
val scalaJSVersion = Option(System.getenv("SCALAJS_VERSION")).getOrElse("1.5.1")
val scalaJSVersion = Option(System.getenv("SCALAJS_VERSION")).getOrElse("1.7.1")
val scalaNativeVersion = Option(System.getenv("SCALANATIVE_VERSION")).getOrElse("0.4.0")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)
addSbtPlugin("org.scala-native" % "sbt-scala-native" % scalaNativeVersion)
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.7.0")
addSbtPlugin("org.jetbrains.scala" % "sbt-ide-settings" % "1.1.1")

val sbtSoftwareMillVersion = "2.0.3"
val sbtSoftwareMillVersion = "2.0.8"
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-common" % sbtSoftwareMillVersion)
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-publish" % sbtSoftwareMillVersion)
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,7 @@ object QuicklensMacros {
report.throwError(unsupportedShapeInfo(focusTree))
}

val objTree: Tree = obj.asTerm
val objTerm: Term = objTree match {
case Inlined(_, _, term) => term
}

val res: (Expr[A => A] => Expr[S]) = (mod: Expr[A => A]) => mapToCopy(Symbol.spliceOwner, mod, objTerm, path).asExpr.asInstanceOf[Expr[S]]
val res: (Expr[A => A] => Expr[S]) = (mod: Expr[A => A]) => mapToCopy(Symbol.spliceOwner, mod, obj.asTerm, path).asExpr.asInstanceOf[Expr[S]]
toPathModify(obj, to(res))
}
}

0 comments on commit 1c022ec

Please sign in to comment.