Skip to content

Commit

Permalink
Scala Native 0.5.x (#1351)
Browse files Browse the repository at this point in the history
  • Loading branch information
sideeffffect authored Aug 6, 2024
1 parent 467fce1 commit 31d9067
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ addCommandAlias(
";coreTestsNative/test;experimentalTestsNative/test" // `test` currently executes only compilation, see `nativeSettings` in `BuildHelper`
)

val zioVersion = "2.1.6"
val zioVersion = "2.1.7"

val projectsCommon = List(
core,
Expand Down
18 changes: 10 additions & 8 deletions project/BuildHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import sbtbuildinfo.BuildInfoKeys.*
import sbtcrossproject.CrossPlugin.autoImport.*
import scalafix.sbt.ScalafixPlugin.autoImport.*

import scala.scalanative.sbtplugin.ScalaNativePlugin.autoImport._

object BuildHelper {
val Scala212: String = "2.12.19"
val Scala213: String = "2.13.14"
Expand Down Expand Up @@ -185,9 +187,9 @@ object BuildHelper {
)

def stdSettings(prjName: String) = Seq(
name := s"$prjName",
crossScalaVersions := Seq(Scala212, Scala213, Scala3),
ThisBuild / scalaVersion := Scala213,
name := s"$prjName",
crossScalaVersions := Seq(Scala212, Scala213, Scala3),
ThisBuild / scalaVersion := Scala213,
scalacOptions ++= stdOptions ++ extraOptions(scalaVersion.value, optimize = !isSnapshot.value),
libraryDependencies ++= {
if (scalaVersion.value != Scala3)
Expand All @@ -196,16 +198,15 @@ object BuildHelper {
)
else Seq.empty
},
semanticdbEnabled := scalaVersion.value != Scala3, // enable SemanticDB
semanticdbEnabled := scalaVersion.value != Scala3, // enable SemanticDB
semanticdbOptions += "-P:semanticdb:synthetics:on",
semanticdbVersion := scalafixSemanticdb.revision, // use Scalafix compatible version
ThisBuild / scalafixScalaBinaryVersion := CrossVersion.binaryScalaVersion(scalaVersion.value),
semanticdbVersion := scalafixSemanticdb.revision, // use Scalafix compatible version
ThisBuild / scalafixDependencies ++= List(
"com.github.vovapolu" %% "scaluzzi" % "0.1.23"
),
Test / parallelExecution := false,
Test / parallelExecution := false,
incOptions ~= (_.withLogRecompileOnMacro(false)),
autoAPIMappings := true,
autoAPIMappings := true,
unusedCompileDependenciesFilter -= moduleFilter("org.scala-js", "scalajs-library")
)

Expand Down Expand Up @@ -242,6 +243,7 @@ object BuildHelper {
)

def nativeSettings = Seq(
nativeConfig ~= { _.withMultithreading(false) },
Test / fork := crossProjectPlatform.value == JVMPlatform // set fork to `true` on JVM to improve log readability, JS and Native need `false`
)

Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ addSbtPlugin("de.heikoseeberger" % "sbt-header"
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.2")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.17")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.4")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.5.4")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("pl.project13.scala" % "sbt-jcstress" % "0.2.0")
Expand Down

0 comments on commit 31d9067

Please sign in to comment.