Skip to content

Scala 3.0.0 #177

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 4 commits into from
May 25, 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
6 changes: 3 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ lazy val compileScalastyle = taskKey[Unit]("compileScalastyle")

val commonSettings = Seq(
scalaVersion in ThisBuild := "2.12.12",
crossScalaVersions := Seq("2.11.12", "2.12.12", "2.13.5", "3.0.0-RC1"),
crossScalaVersions := Seq("2.11.12", "2.12.12", "2.13.5", "3.0.0"),

parallelExecution in ThisBuild := false,
fork := true,

scalacOptions ++= {
if (isDotty.value) Seq(
if (isDotty.value) Seq(
"-unchecked",
"-deprecation",
"-language:_",
"-encoding", "UTF-8",
"-encoding", "UTF-8",
"-source:3.0-migration"
) else Seq(
"-unchecked",
Expand Down
8 changes: 4 additions & 4 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ object Dependencies {
private val testcontainersVersion = "1.15.2"
private val seleniumVersion = "2.53.1"
private val slf4jVersion = "1.7.25"
private val scalaTestVersion = "3.2.5"
private val scalaTestMockitoVersion = "3.2.5.0"
private val scalaTestVersion = "3.2.9"
private val scalaTestMockitoVersion = "3.2.9.0"
private val scalaTestSeleniumVersion_scala2 = "3.2.2.0"
private val scalaTestSeleniumVersion_scala3 = "3.2.5.0"
private val scalaTestSeleniumVersion_scala3 = "3.2.9.0"
private val junitVersion = "4.13.1"
private val munitVersion = "0.7.22"
private val munitVersion = "0.7.25"
private val mysqlConnectorVersion = "5.1.42"
private val neo4jConnectorVersion = "4.0.0"
private val oracleDriverVersion = "19.3.0.0"
Expand Down
2 changes: 1 addition & 1 deletion project/Plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.7")
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.3")
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.5")
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.dimafeng.testcontainers.integration;

import org.testcontainers.images.builder.ImageFromDockerfile;

// workaround for https://github.com/lampepfl/dotty/issues/12586
public class JavaStub {

public ImageFromDockerfile imageFromDockerFileWithFileFromClasspath(String path, String resourcePath) {
return new ImageFromDockerfile().withFileFromClasspath(path, resourcePath);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import com.dimafeng.testcontainers.{ForAllTestContainer, GenericContainer}
import org.scalatest.flatspec.AnyFlatSpec
import org.testcontainers.containers.wait.strategy.Wait
import org.testcontainers.images.builder.ImageFromDockerfile
import org.testcontainers.images.builder.traits.ClasspathTrait;

import scala.io.Source

Expand All @@ -23,7 +24,8 @@ class GenericContainerSpec extends AnyFlatSpec with ForAllTestContainer {
}

class GenericContainerDockerFileSpec extends GenericContainerSpec {
private val imageFromDockerfile = new ImageFromDockerfile().withFileFromClasspath("Dockerfile", "generic-container-dockerfile")
// we can't do this in Scala 3 due to https://github.com/lampepfl/dotty/issues/12586 so this is delegated to a small Java class.
private val imageFromDockerfile = new JavaStub().imageFromDockerFileWithFileFromClasspath("Dockerfile", "generic-container-dockerfile")
override val container: GenericContainer = GenericContainer(imageFromDockerfile,
exposedPorts = Seq(80),
waitStrategy = Wait.forHttp("/")
Expand Down