Bump 2.12 versions in scripted

Problem/Solution
This bumps the Scala 2.12 version used in scripted tests to 2.12.20.
This also removes an old test that uses Scala 2.10.
This commit is contained in:
Eugene Yokota 2025-01-29 06:42:07 -05:00
parent 5647bab8f3
commit c9e696d1bf
11 changed files with 9 additions and 124 deletions

View File

@ -4,7 +4,7 @@ name := "demo-compiler-plugin"
version := "0.1"
scalaVersion := "2.12.17"
scalaVersion := "2.12.20"
libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaVersion.value % "provided"
exportJars := true

View File

@ -1,109 +0,0 @@
ThisBuild / scalaVersion := "2.10.4"
ThisBuild / dependencyOverrides += "com.github.nscala-time" %% "nscala-time" % "1.0.0"
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
def localCache =
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))
lazy val root = (project in file("."))
.dependsOn(p1 % Compile)
.settings(
inThisBuild(List(
organizationName := "eed3si9n",
organizationHomepage := Some(url("http://example.com/")),
homepage := Some(url("https://github.com/example/example")),
scmInfo := Some(ScmInfo(uri("https://github.com/example/example"), "git@github.com:example/example.git")),
developers := List(
Developer("harrah", "Mark Harrah", "@harrah", uri("https://github.com/harrah")),
Developer("eed3si9n", "Eugene Yokota", "@eed3si9n", uri("https://github.com/eed3si9n")),
Developer("jsuereth", "Josh Suereth", "@jsuereth", uri("https://github.com/jsuereth")),
Developer("dwijnand", "Dale Wijnand", "@dwijnand", uri("https://github.com/dwijnand")),
Developer("gkossakowski", "Grzegorz Kossakowski", "@gkossakowski", uri("https://github.com/gkossakowski")),
Developer("Duhemm", "Martin Duhem", "@Duhemm", uri("https://github.com/Duhemm"))
),
version := "0.3.1-SNAPSHOT",
description := "An HTTP client for Scala with Async Http Client underneath.",
licenses := Seq("Apache 2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")),
)),
localCache,
libraryDependencies += "com.github.nscala-time" %% "nscala-time" % "1.0.0",
// https://github.com/sbt/sbt/pull/1620
// sbt resolves dependencies every compile when using %% with dependencyOverrides
TaskKey[Unit]("check") := {
val s = (update / streams).value
val cacheDirectory = crossTarget.value / "update" / updateCacheName.value
val cacheStoreFactory = sbt.util.CacheStoreFactory.directory(cacheDirectory)
val module = ivyModule.value
val updateConfig = updateConfiguration.value
val extraInputHash0 = module.extraInputHash
val moduleSettings0 = module.moduleSettings
val inline0 = moduleSettings0 match { case x: InlineConfiguration => x }
// Remove clock for caching purpose
val updateConfig0 = updateConfig
.withLogicalClock(LogicalClock.unknown)
.withMetadataDirectory(dependencyCacheDirectory.value)
import sbt.librarymanagement.{ ModuleSettings, UpdateConfiguration, LibraryManagementCodec }
type In = (Long, ModuleSettings, UpdateConfiguration)
import LibraryManagementCodec._
val f: In => Unit =
Tracked.inputChanged(cacheStoreFactory make "inputs") { (inChanged: Boolean, in: In) =>
val extraInputHash1 = in._1
val moduleSettings1 = in._2
val inline1 = moduleSettings1 match { case x: InlineConfiguration => x }
val updateConfig1 = in._3
if (inChanged) {
sys.error(s"""
extraInputHash1 == extraInputHash0: ${extraInputHash1 == extraInputHash0}
extraInputHash1:
$extraInputHash1
extraInputHash0
$extraInputHash0
-----
inline1 == inline0: ${inline1 == inline0}
inline1:
$inline1
inline0
$inline0
-----
updateConfig1 == updateConfig0: ${updateConfig1 == updateConfig0}
updateConfig1:
$updateConfig1
updateConfig0
$updateConfig0
""")
}
}
f((extraInputHash0, (inline0: ModuleSettings), updateConfig0))
},
// https://github.com/sbt/sbt/issues/3226
// update caching is not working on sbt 1.0.x
TaskKey[Unit]("check2") := {
val ur = update.value
if (!ur.stats.cached) {
sys.error(s"update.value is not cached! $ur")
}
val tu = transitiveUpdate.value
if (tu.exists(!_.stats.cached)) {
sys.error(s"uncached transitiveUpdate exists! $tu")
}
}
)
lazy val p1 = project
.settings(
libraryDependencies += "com.novocode" % "junit-interface" % "0.11"
)

View File

@ -1,6 +0,0 @@
> compile
$ sleep 2000
> check
$ sleep 2000
> check
> check2

View File

@ -5,7 +5,7 @@ lazy val scalaOverride = taskKey[Unit]("Check that the proper version of Scala i
lazy val root = (project in file(".")).
settings(
libraryDependencies ++= baseDirectory(dependencies).value,
scalaVersion := "2.9.2",
scalaVersion := "2.12.20",
scalaModuleInfo := scalaModuleInfo.value map (_.withOverrideScalaVersion(sbtPlugin.value)),
autoScalaLibrary := baseDirectory(base => !(base / "noscala").exists ).value,
scalaOverride := check("scala.App").value

View File

@ -1,5 +1,5 @@
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
ThisBuild / scalaVersion := "2.12.17"
ThisBuild / scalaVersion := "2.12.20"
def localCache =
ivyPaths := IvyPaths(baseDirectory.value.toString, Some(((ThisBuild / baseDirectory).value / "ivy" / "cache").toString))

View File

@ -1,4 +1,4 @@
ThisBuild / scalaVersion := "2.12.17"
ThisBuild / scalaVersion := "2.12.20"
autoScalaLibrary := false
libraryDependencies += "org.scala-lang" % "scala-library" % scalaVersion.value % "test"

View File

@ -1,6 +1,6 @@
libraryDependencies += "org.json4s" %% "json4s-native" % "[3.3.0,3.5.0)"
scalaVersion := "2.12.17"
scalaVersion := "2.12.20"
lazy val actualVersionCheck = taskKey[Unit]("")
actualVersionCheck := {

View File

@ -1,4 +1,4 @@
ThisBuild / scalaVersion := "2.12.17"
ThisBuild / scalaVersion := "2.12.20"
lazy val root = (project in file("."))
lazy val sub1 = (project in file("sub1"))
lazy val sub2 = (project in file("sub2"))

View File

@ -1,4 +1,4 @@
ThisBuild / scalaVersion := "2.12.17"
ThisBuild / scalaVersion := "2.12.20"
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
val commonSettings = Seq(

View File

@ -1,4 +1,4 @@
ThisBuild / scalaVersion := "2.12.17"
ThisBuild / scalaVersion := "2.12.20"
ThisBuild / csrCacheDirectory := (ThisBuild / baseDirectory).value / "coursier-cache"
organization := "com.example"

View File

@ -1,4 +1,4 @@
ThisBuild / scalaVersion := "2.12.17"
ThisBuild / scalaVersion := "2.12.20"
lazy val main = project.settings(
organization := "org.scala-sbt.testsuite.example",