Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi committed Aug 23, 2024
1 parent 8d5f4dd commit 4b75831
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions contrib/bloop/test/src/mill/contrib/bloop/BloopTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,19 @@ object BloopTests extends TestSuite {
}

object scalajsModule extends scalajslib.ScalaJSModule with testBloop.Module {
val sv = sys.props("TEST_SCALA_2_13_VERSION")
val sjsv = sys.props("TEST_SCALAJS_VERSION")
val sv = sys.props.getOrElse("TEST_SCALA_2_13_VERSION", ???)
val sjsv = sys.props.getOrElse("TEST_SCALAJS_VERSION", ???)
override def scalaVersion = sv
override def scalaJSVersion = sjsv
override def linkerMode = T(Some(_root_.bloop.config.Config.LinkerMode.Release))
override def moduleKind = T(ModuleKind.CommonJSModule)
}

object scalanativeModule extends scalanativelib.ScalaNativeModule with testBloop.Module {
val sv = sys.props("TEST_SCALA_2_13_VERSION")
val sv = sys.props.getOrElse("TEST_SCALA_2_13_VERSION", ???)
override def skipBloop: Boolean = isWin
override def scalaVersion = sv
override def scalaNativeVersion = sys.props("TEST_SCALANATIVE_0_5_VERSION")
override def scalaNativeVersion = sys.props.getOrElse("TEST_SCALANATIVE_0_5_VERSION", ???)
override def releaseMode = T(ReleaseMode.Debug)
}

Expand Down
2 changes: 1 addition & 1 deletion contrib/docker/src/mill/contrib/docker/DockerModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ trait DockerModule { outer: JavaModule =>
else volumes().map(v => s"\"$v\"").mkString("VOLUME [", ", ", "]"),
run().map(c => s"RUN $c").mkString("\n"),
if (user().isEmpty) "" else s"USER ${user()}"
).filter(_.nonEmpty).mkString(sys.props("line.separator"))
).filter(_.nonEmpty).mkString(sys.props.getOrElse("line.separator", ???))

val quotedEntryPointArgs = (Seq("java") ++ jvmOptions() ++ Seq("-jar", s"/$jarName"))
.map(arg => s"\"$arg\"").mkString(", ")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ object DockerModuleTest extends TestSuite {
|FROM gcr.io/distroless/java:latest
|COPY out.jar /out.jar
|ENTRYPOINT ["java", "-jar", "/out.jar"]""".stripMargin,
sys.props("line.separator")
sys.props.getOrElse("line.separator", ???)
)
val dockerfileStringRefined = multineRegex.replaceAllIn(
result.value,
sys.props("line.separator")
sys.props.getOrElse("line.separator", ???)
)
assert(dockerfileStringRefined == expected)
}
Expand All @@ -124,11 +124,11 @@ object DockerModuleTest extends TestSuite {
|USER user1
|COPY out.jar /out.jar
|ENTRYPOINT ["java", "-jar", "/out.jar"]""".stripMargin,
sys.props("line.separator")
sys.props.getOrElse("line.separator", ???)
)
val dockerfileStringRefined = multineRegex.replaceAllIn(
result.value,
sys.props("line.separator")
sys.props.getOrElse("line.separator", ???)
)
assert(dockerfileStringRefined == expected)
}
Expand All @@ -141,11 +141,11 @@ object DockerModuleTest extends TestSuite {
|FROM gcr.io/distroless/java:latest
|COPY out.jar /out.jar
|ENTRYPOINT ["java", "-Xmx1024M", "-jar", "/out.jar"]""".stripMargin,
sys.props("line.separator")
sys.props.getOrElse("line.separator", ???)
)
val dockerfileStringRefined = multineRegex.replaceAllIn(
result.value,
sys.props("line.separator")
sys.props.getOrElse("line.separator", ???)
)
assert(dockerfileStringRefined == expected)
}
Expand Down
8 changes: 4 additions & 4 deletions scalalib/test/src/mill/scalalib/TestRunnerTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,28 @@ import scala.xml.{Elem, NodeSeq, XML}

object TestRunnerTests extends TestSuite {
object testrunner extends TestBaseModule with ScalaModule {
def scalaVersion = sys.props("TEST_SCALA_2_13_VERSION")
def scalaVersion = sys.props.getOrElse("TEST_SCALA_2_13_VERSION", ???)

object utest extends ScalaTests with TestModule.Utest {
override def ivyDeps = T {
super.ivyDeps() ++ Agg(
ivy"com.lihaoyi::utest:${sys.props("TEST_UTEST_VERSION")}"
ivy"com.lihaoyi::utest:${sys.props.getOrElse("TEST_UTEST_VERSION", ???)}"
)
}
}

object scalatest extends ScalaTests with TestModule.ScalaTest {
override def ivyDeps = T {
super.ivyDeps() ++ Agg(
ivy"org.scalatest::scalatest:${sys.props("TEST_SCALATEST_VERSION")}"
ivy"org.scalatest::scalatest:${sys.props.getOrElse("TEST_SCALATEST_VERSION", ???)}"
)
}
}

trait DoneMessage extends ScalaTests {
override def ivyDeps = T {
super.ivyDeps() ++ Agg(
ivy"org.scala-sbt:test-interface:${sys.props("TEST_TEST_INTERFACE_VERSION")}"
ivy"org.scala-sbt:test-interface:${sys.props.getOrElse("TEST_TEST_INTERFACE_VERSION", ???)}"
)
}
}
Expand Down

0 comments on commit 4b75831

Please sign in to comment.