Migrate most scripted tests away from scala 2.11 (#107)

So that they can run with openjdk11 too
This commit is contained in:
Alexandre Archambault 2019-07-26 12:07:11 +02:00 committed by GitHub
parent e39b9cf55c
commit df3d5c627a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
48 changed files with 60 additions and 66 deletions

View File

@ -1,4 +1,4 @@
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"
libraryDependencies += {
sys.props("sbt.log.noformat") = "true" // disables colors in coursierWhatDependsOn output

View File

@ -1,4 +1,4 @@
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"
coursierArtifacts := {
val f = file("coursier-artifacts")

View File

@ -3,7 +3,7 @@
lazy val a = project
.settings(
scalaVersion := "2.11.8",
scalaVersion := "2.12.8",
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-effect" % "1.3.1",
"org.typelevel" %% "cats-core" % "1.5.0"
@ -12,9 +12,9 @@ lazy val a = project
lazy val b = project
.settings(
scalaVersion := "2.11.8",
scalaVersion := "2.12.8",
libraryDependencies ++= Seq(
"org.slf4s" %% "slf4s-api" % "1.7.12", // depends on org.slf4j:slf4j-api:1.7.12
"org.slf4s" %% "slf4s-api" % "1.7.25", // depends on org.slf4j:slf4j-api:1.7.25
"ch.qos.logback" % "logback-classic" % "1.1.2" // depends on org.slf4j:slf4j-api:1.7.6
)
)

View File

@ -1,4 +1,4 @@
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"
libraryDependencies += ("com.rengwuxian.materialedittext" % "library" % "2.1.4")
.exclude("com.android.support", "support-v4")

View File

@ -1,11 +1,11 @@
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"
organization := "io.get-coursier.test"
name := "sbt-coursier-all-exclude-dependencies"
version := "0.1.0-SNAPSHOT"
libraryDependencies += "com.github.alexarchambault" %% "argonaut-shapeless_6.1" % "1.0.0-RC1"
libraryDependencies += "com.github.alexarchambault" %% "argonaut-shapeless_6.2" % "1.2.0-M11"
allExcludeDependencies += sbt.ExclusionRule("com.chuusai", "shapeless_2.11")
allExcludeDependencies += sbt.ExclusionRule("com.chuusai", "shapeless_2.12")
allExcludeDependencies += "io.argonaut" %% "argonaut"

View File

@ -2,4 +2,4 @@ $ delete output
> run
$ exists output
> publishLocal
$ exec java -jar coursier launch io.get-coursier.test:sbt-coursier-all-exclude-dependencies_2.11:0.1.0-SNAPSHOT
$ exec java -jar coursier launch io.get-coursier.test:sbt-coursier-all-exclude-dependencies_2.12:0.1.0-SNAPSHOT

View File

@ -1,2 +1,2 @@
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"
libraryDependencies += "org.jclouds.api" % "nova" % "1.5.9" classifier "tests"

View File

@ -1,4 +1,4 @@
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"
val checkEmpty = TaskKey[Unit]("checkEmpty")

View File

@ -1,4 +1,4 @@
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"
resolvers += "authenticated" at sys.env("TEST_REPOSITORY")

View File

@ -1,6 +1,6 @@
import java.nio.file.Files
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"
resolvers += "authenticated" at sys.env("TEST_REPOSITORY")

View File

@ -1,4 +1,4 @@
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"
resolvers += "authenticated" at sys.env("TEST_REPOSITORY")

View File

@ -1,4 +1,4 @@
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"
resolvers += "authenticated" at sys.env("TEST_REPOSITORY")

View File

@ -1,4 +1,4 @@
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"
resolvers += "authenticated" at sys.env("TEST_REPOSITORY")

View File

@ -1,4 +1,4 @@
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"
resolvers += "authenticated" at sys.env("TEST_REPOSITORY")

View File

@ -1,4 +1,4 @@
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"
resolvers += "authenticated" at sys.env("TEST_REPOSITORY")

View File

@ -1,11 +1,11 @@
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"
organization := "io.get-coursier.test"
name := "sbt-coursier-exclude-dependencies"
version := "0.1.0-SNAPSHOT"
libraryDependencies += "com.github.alexarchambault" %% "argonaut-shapeless_6.1" % "1.0.0-RC1"
libraryDependencies += "com.github.alexarchambault" %% "argonaut-shapeless_6.2" % "1.2.0-M11"
excludeDependencies += sbt.ExclusionRule("com.chuusai", "shapeless_2.11")
excludeDependencies += sbt.ExclusionRule("com.chuusai", "shapeless_2.12")
excludeDependencies += "io.argonaut" %% "argonaut"

View File

@ -2,4 +2,4 @@ $ delete output
> run
$ exists output
> publishLocal
$ exec java -jar coursier launch io.get-coursier.test:sbt-coursier-exclude-dependencies_2.11:0.1.0-SNAPSHOT
$ exec java -jar coursier launch io.get-coursier.test:sbt-coursier-exclude-dependencies_2.12:0.1.0-SNAPSHOT

View File

@ -2,7 +2,7 @@
lazy val a = project
.settings(sharedSettings)
.settings(
libraryDependencies += "com.chuusai" %% "shapeless" % "2.3.234" from "https://oss.sonatype.org/content/repositories/releases/com/chuusai/shapeless_2.11/2.3.1/shapeless_2.11-2.3.1.jar"
libraryDependencies += "com.chuusai" %% "shapeless" % "2.3.234" from "https://oss.sonatype.org/content/repositories/releases/com/chuusai/shapeless_2.12/2.3.3/shapeless_2.12-2.3.3.jar"
)
lazy val b = project
@ -16,5 +16,5 @@ lazy val root = project
lazy val sharedSettings = Seq(
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"
)

View File

@ -1,3 +1,3 @@
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"
libraryDependencies += "ccl.northwestern.edu" % "netlogo" % "5.3.1" % "provided" from s"https://github.com/NetLogo/NetLogo/releases/download/5.3.1/NetLogo.jar"

View File

@ -1,7 +1,7 @@
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"
// keeping the default cache policies here
libraryDependencies += "com.chuusai" %% "shapeless" % "2.3.2" from {
"https://repo1.maven.org/maven2/com/chuusai/shapeless_2.11/2.3.242/shapeless_2.11-2.3.242.jar"
"https://repo1.maven.org/maven2/com/chuusai/shapeless_2.12/2.3.242/shapeless_2.12-2.3.242.jar"
}

View File

@ -1,11 +1,11 @@
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"
libraryDependencies += "com.chuusai" %% "shapeless" % "2.3.41" from {
val f = file("shapeless_2.11-2.3.0.jar")
val f = file("shapeless_2.12-2.3.3.jar")
if (!f.exists()) {
val url0 = "https://repo1.maven.org/maven2/com/chuusai/shapeless_2.11/2.3.0/shapeless_2.11-2.3.0.jar"
val url0 = "https://repo1.maven.org/maven2/com/chuusai/shapeless_2.12/2.3.3/shapeless_2.12-2.3.3.jar"
sLog.value.warn(s"Fetching $url0")

View File

@ -1,3 +1,3 @@
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"
libraryDependencies += "org.apache.hadoop" % "hadoop-yarn-server-resourcemanager" % "2.7.1"

View File

@ -1,14 +1,9 @@
import java.io.File
import java.nio.file.Files
import scalaz.stream._
import scalaz.concurrent.Task
object Main extends App {
val pch = Process.constant((i:Int) => Task.now(())).take(3)
val count = Process.constant(1).toSource.to(pch).runLog.run.size
assert(count == 3)
// TODO Use some jvm-repr stuff as a test
Files.write(new File("output").toPath, A.default.msg.getBytes("UTF-8"))
}

View File

@ -2,7 +2,7 @@
lazy val a = project
.settings(sharedSettings)
.settings(
resolvers += "Scalaz Bintray Repo" at "https://dl.bintray.com/scalaz/releases"
resolvers += "Jitpack Repo" at "https://jitpack.io"
)
lazy val b = project
@ -10,7 +10,7 @@ lazy val b = project
.settings(sharedSettings)
.settings(
// resolver added in inter-project dependency only - should still be fine
libraryDependencies += "org.scalaz.stream" %% "scalaz-stream" % "0.7.1a"
libraryDependencies += "com.github.jupyter" % "jvm-repr" % "0.3.0"
)
lazy val root = project
@ -20,5 +20,5 @@ lazy val root = project
lazy val sharedSettings = Seq(
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"
)

View File

@ -1,15 +1,15 @@
lazy val sharedSettings = Seq(
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"
)
/** Module with the same Maven coordinates as shapeless 2.3.1 */
/** Module with the same Maven coordinates as shapeless 2.3.3 */
lazy val `shapeless-mock` = project
.settings(sharedSettings)
.settings(
organization := "com.chuusai",
name := "shapeless",
version := "2.3.1"
version := "2.3.3"
)
lazy val a = project
@ -20,7 +20,7 @@ lazy val a = project
version := "0.0.1"
)
/** Transitively depends on the - real - shapeless 2.3.1 */
/** Transitively depends on the - real - shapeless 2.3.3 */
lazy val b = project
.dependsOn(a)
.settings(sharedSettings)
@ -28,5 +28,5 @@ lazy val b = project
organization := "com.pany",
name := "b",
version := "0.0.1",
libraryDependencies += "com.github.alexarchambault" %% "argonaut-shapeless_6.2" % "1.2.0-M1"
libraryDependencies += "com.github.alexarchambault" %% "argonaut-shapeless_6.2" % "1.2.0-M11"
)

View File

@ -1,8 +1,8 @@
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"
resolvers += Resolver.url(
"webjars-bintray",
new URL("https://dl.bintray.com/scalaz/releases/")
"jitpack",
new URL("https://jitpack.io")
)(
// patterns should be ignored - and the repo be considered a maven one - because
// isMavenCompatible is true
@ -15,4 +15,4 @@ resolvers += Resolver.url(
)
)
libraryDependencies += "org.scalaz.stream" %% "scalaz-stream" % "0.7.1"
libraryDependencies += "com.github.jupyter" % "jvm-repr" % "0.3.0"

View File

@ -1,14 +1,9 @@
import java.io.File
import java.nio.file.Files
import scalaz.stream._
import scalaz.concurrent.Task
object Main extends App {
val pch = Process.constant((i:Int) => Task.now(())).take(3)
val count = Process.constant(1).toSource.to(pch).runLog.run.size
assert(count == 3)
// TODO Use some jvm-repr stuff
Files.write(new File("output").toPath, "OK".getBytes("UTF-8"))
}

View File

@ -1,2 +1,2 @@
addSbtCoursier
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.3")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.25")

View File

@ -1,2 +1,2 @@
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"
credentials += Credentials(file("nope/nope/nope/nope/nope"))

View File

@ -1,5 +1,5 @@
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"
libraryDependencies += "org.apache.spark" %% "spark-sql" % "1.6.2"
libraryDependencies += "org.apache.spark" %% "spark-sql" % "2.4.3"
mavenProfiles += "hadoop-2.6"
mavenProfiles += "hadoop-3.1"

View File

@ -13,7 +13,7 @@ object Main extends App {
val hadoopVersion = p.getProperty("version")
Console.err.println(s"Found hadoop version $hadoopVersion")
assert(hadoopVersion == "2.6.0")
assert(hadoopVersion.startsWith("3.1."))
Files.write(new File("output").toPath, "OK".getBytes("UTF-8"))
}

View File

@ -17,7 +17,7 @@ lazy val bar = project
lazy val shared = Seq(
organization := org,
version := ver,
scalaVersion := "2.11.8",
scalaVersion := "2.12.8",
confCheck := {
val log = streams.value.log

View File

@ -1 +1 @@
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"

View File

@ -1,3 +1,3 @@
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"
resolvers += Resolver.file("space-repo", file(raw"/tmp/space the final frontier/repo"))(Resolver.ivyStylePatterns)

View File

@ -1,3 +1,3 @@
scalaVersion := "2.11.8"
scalaVersion := "2.12.8"
libraryDependencies += "org.apache.zookeeper" % "zookeeper" % "3.5.0-alpha"

View File

@ -16,6 +16,8 @@ sbtShading() {
runLmCoursierTests() {
if [ "$TEST_GROUP" = 1 ]; then
SCRIPTED_EXTRA="sbt-lm-coursier/*"
elif [ "$TEST_GROUP" = 2 ]; then
SCRIPTED_EXTRA="scala-211/*"
else
SCRIPTED_EXTRA=""
fi
@ -32,6 +34,8 @@ runLmCoursierTests() {
runSbtCoursierTests() {
if [ "$TEST_GROUP" = 1 ]; then
SCRIPTED_EXTRA="sbt-coursier/*"
elif [ "$TEST_GROUP" = 2 ]; then
SCRIPTED_EXTRA="scala-211/*"
else
SCRIPTED_EXTRA=""
fi