Skip to content

Commit

Permalink
Merge pull request #30 from VirtusLab/scalajs
Browse files Browse the repository at this point in the history
Add ScalaJS and ScalaNative cross build
  • Loading branch information
KacperFKorban authored Sep 28, 2022
2 parents 115acf6 + 7459318 commit 4b7f23a
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion avocADO/src/main/scala/macros.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import scala.quoted.*
private[avocado] object macros {

def adoImpl[F[_]: Type, A: Type](compExpr: Expr[F[A]], instanceExpr: Expr[AvocADO[F]])(using Quotes): Expr[F[A]] =
ADOImpl(using quotes).adoImpl(compExpr, instanceExpr)
new ADOImpl(using quotes).adoImpl(compExpr, instanceExpr)

class ADOImpl(using Quotes) {
import quotes.reflect.*
Expand Down
File renamed without changes.
19 changes: 15 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
val scala3 = "3.2.0"

Global / concurrentRestrictions += Tags.limit(Tags.All, 1)

val commonSettings = Seq(
organization := "org.virtuslab",
description := "Safe compile-time parallelization of for-comprehensions for Scala 3",
Expand All @@ -22,7 +24,7 @@ val commonSettings = Seq(
"-feature"
),
libraryDependencies ++= Seq(
"org.scalameta" %%% "munit" % "0.7.29" % Test
"org.scalameta" %%% "munit" % "1.0.0-M6" % Test
)
)

Expand All @@ -47,40 +49,49 @@ lazy val avocado = projectMatrix
name := "avocADO"
)
.jvmPlatform(scalaVersions = List(scala3))
.jsPlatform(scalaVersions = Seq(scala3))
.nativePlatform(scalaVersions = Seq(scala3))

lazy val cats = projectMatrix
.in(file("cats"))
.settings(commonSettings)
.settings(
name := "avocADO-cats",
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-core" % "2.8.0",
"org.typelevel" %%% "cats-core" % "2.8.0",
"org.typelevel" %%% "cats-effect" % "3.3.14" % Test
)
)
.dependsOn(avocado)
.jvmPlatform(scalaVersions = List(scala3))
.jsPlatform(scalaVersions = Seq(scala3))
.nativePlatform(scalaVersions = Seq(scala3))

lazy val zio2 = projectMatrix
.in(file("zio-2"))
.settings(commonSettings)
.settings(
name := "avocADO-zio-2",
libraryDependencies ++= Seq(
"dev.zio" %%% "zio" % "2.0.0"
"dev.zio" %%% "zio" % "2.0.2"
)
)
.dependsOn(avocado)
.jvmPlatform(scalaVersions = List(scala3))
.jsPlatform(scalaVersions = Seq(scala3))
.nativePlatform(scalaVersions = Seq(scala3))


lazy val zio1 = projectMatrix
.in(file("zio-1"))
.settings(commonSettings)
.settings(
name := "avocADO-zio-1",
libraryDependencies ++= Seq(
"dev.zio" %% "zio" % "1.0.17"
"dev.zio" %%% "zio" % "1.0.17"
)
)
.dependsOn(avocado)
.jvmPlatform(scalaVersions = List(scala3))
.jsPlatform(scalaVersions = Seq(scala3))
.nativePlatform(scalaVersions = Seq(scala3))
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 4b7f23a

Please sign in to comment.