Skip to content

Scala 3.0.0-RC2 + sbt 1.5 #440

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ scala:
- 2.11.12
- 2.12.13
- 2.13.5
- 3.0.0-M3
- 3.0.0-RC1
- 3.0.0-RC2

env:
- SCALAJS_VERSION= ADOPTOPENJDK=8
Expand Down Expand Up @@ -39,16 +39,16 @@ matrix:

# Scala Native doesn't support Scala 3 yet

- scala: 3.0.0-M3
- scala: 3.0.0-RC1
env: SCALANATIVE_VERSION=0.4.0 ADOPTOPENJDK=8

- scala: 3.0.0-M3
- scala: 3.0.0-RC1
env: SCALANATIVE_VERSION=0.4.0 ADOPTOPENJDK=11

- scala: 3.0.0-RC1
- scala: 3.0.0-RC2
env: SCALANATIVE_VERSION=0.4.0 ADOPTOPENJDK=8

- scala: 3.0.0-RC1
- scala: 3.0.0-RC2
env: SCALANATIVE_VERSION=0.4.0 ADOPTOPENJDK=11

install:
Expand Down
24 changes: 17 additions & 7 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ lazy val junit = libraryDependencies += "com.novocode" % "junit-interface" % "0.
lazy val scala211 = "2.11.12"
lazy val scala212 = "2.12.13"
lazy val scala213 = "2.13.5"
lazy val scala30 = "3.0.0-RC1"
lazy val scala30 = "3.0.0-RC2"

lazy val compat = MultiScalaCrossProject(JSPlatform, JVMPlatform, NativePlatform)(
"compat",
Expand All @@ -67,16 +67,23 @@ lazy val compat = MultiScalaCrossProject(JSPlatform, JVMPlatform, NativePlatform
scalacOptions ++= Seq("-feature", "-language:higherKinds", "-language:implicitConversions"),
Compile / unmanagedSourceDirectories += {
val sharedSourceDir = (ThisBuild / baseDirectory).value / "compat/src/main"
if (scalaVersion.value.startsWith("2.13.") || isDotty.value) sharedSourceDir / "scala-2.13"
else sharedSourceDir / "scala-2.11_2.12"
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _) | (2, 13)) =>
sharedSourceDir / "scala-2.13"
case _ =>
sharedSourceDir / "scala-2.11_2.12"
}
},
versionScheme := Some("early-semver"),
versionPolicyIntention := Compatibility.BinaryCompatible,
)
.jvmSettings(
Test / unmanagedSourceDirectories += (ThisBuild / baseDirectory).value / "compat/src/test/scala-jvm",
junit,
scalaModuleMimaPreviousVersion := Some("2.4.0").filterNot(_ => isDotty.value),
scalaModuleMimaPreviousVersion := (CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) => None
case _ => Some("2.4.0")
}),
mimaBinaryIssueFilters ++= {
import com.typesafe.tools.mima.core._
import com.typesafe.tools.mima.core.ProblemFilters._
Expand All @@ -92,7 +99,10 @@ lazy val compat = MultiScalaCrossProject(JSPlatform, JVMPlatform, NativePlatform
.Process("git rev-parse HEAD")
.lineStream_!
.head
val opt = if (isDotty.value) "-scalajs-mapSourceURI" else "-P:scalajs:mapSourceURI"
val opt = CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) => "-scalajs-mapSourceURI"
case _ => "-P:scalajs:mapSourceURI"
}
Seq(s"$opt:$x->$y/")
},
Test / fork := false // Scala.js cannot run forked tests
Expand Down Expand Up @@ -277,8 +287,8 @@ lazy val `scalafix-tests` = project
output212Plus.value,
output213.value
),
scalafixTestkitInputSourceDirectories := sourceDirectories.in(`scalafix-input`, Compile).value,
scalafixTestkitInputClasspath := fullClasspath.in(`scalafix-input`, Compile).value
scalafixTestkitInputSourceDirectories := (`scalafix-input` / Compile / sourceDirectories).value,
scalafixTestkitInputClasspath := (`scalafix-input` / Compile / fullClasspath).value,
)
.dependsOn(`scalafix-input`, `scalafix-rules`)
.enablePlugins(BuildInfoPlugin, ScalafixTestkitPlugin)
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.4.9
sbt.version=1.5.0-RC2
1 change: 0 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ val scalaJSVersion =
val scalaNativeVersion =
Option(System.getenv("SCALANATIVE_VERSION")).filter(_.nonEmpty).getOrElse("0.4.0")

addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.3")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % crossVer)
addSbtPlugin("org.scala-native" % "sbt-scala-native" % scalaNativeVersion)
Expand Down