Skip to content

Commit 1193cc7

Browse files
committed
Cross compile the test-runner module against Scala 3 Next versions
1 parent d733914 commit 1193cc7

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

build.mill.scala

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,9 @@ object core extends Cross[Core](Scala.scala3MainVersions) with CrossSc
105105
object `build-module` extends Cross[Build](Scala.scala3MainVersions)
106106
with CrossScalaDefaultToInternal
107107
object runner extends Cross[Runner](Scala.runnerScalaVersions) with CrossScalaDefaultToRunner
108-
object `test-runner` extends TestRunner
109-
object `tasty-lib` extends Cross[TastyLib](Scala.scala3MainVersions)
108+
object `test-runner` extends Cross[TestRunner](Scala.runnerScalaVersions)
109+
with CrossScalaDefaultToRunner
110+
object `tasty-lib` extends Cross[TastyLib](Scala.scala3MainVersions)
110111
with CrossScalaDefaultToInternal
111112
// Runtime classes used within native image on Scala 3 replacing runtime from Scala
112113
object `scala3-runtime` extends Cross[Scala3Runtime](Scala.scala3MainVersions)
@@ -436,7 +437,7 @@ trait Core extends ScalaCliCrossSbtModule
436437
def constantsFile: T[PathRef] = Task(persistent = true) {
437438
val dir = Task.dest / "constants"
438439
val dest = dir / "Constants.scala"
439-
val testRunnerMainClass = `test-runner`
440+
val testRunnerMainClass = `test-runner`(crossScalaVersion)
440441
.mainClass()
441442
.getOrElse(sys.error("No main class defined for test-runner"))
442443
val runnerMainClass = build.runner(crossScalaVersion)
@@ -445,7 +446,7 @@ trait Core extends ScalaCliCrossSbtModule
445446
val detailedVersionValue =
446447
if (`local-repo`.developingOnStubModules) s"""Some("${vcsState()}")"""
447448
else "None"
448-
val testRunnerOrganization = `test-runner`
449+
val testRunnerOrganization = `test-runner`(crossScalaVersion)
449450
.pomSettings()
450451
.organization
451452
val code =
@@ -465,8 +466,8 @@ trait Core extends ScalaCliCrossSbtModule
465466
| def scalaNativeVersion = "${Deps.Versions.scalaNative}"
466467
|
467468
| def testRunnerOrganization = "$testRunnerOrganization"
468-
| def testRunnerModuleName = "${`test-runner`.artifactName()}"
469-
| def testRunnerVersion = "${`test-runner`.publishVersion()}"
469+
| def testRunnerModuleName = "${`test-runner`(crossScalaVersion).artifactName()}"
470+
| def testRunnerVersion = "${`test-runner`(crossScalaVersion).publishVersion()}"
470471
| def testRunnerMainClass = "$testRunnerMainClass"
471472
|
472473
| def runnerOrganization = "${build.runner(crossScalaVersion).pomSettings().organization}"
@@ -726,7 +727,7 @@ trait Build extends ScalaCliCrossSbtModule
726727
options(crossScalaVersion),
727728
directives(crossScalaVersion),
728729
`scala-cli-bsp`,
729-
`test-runner`,
730+
`test-runner`(crossScalaVersion),
730731
`tasty-lib`(crossScalaVersion)
731732
)
732733
override def scalacOptions: T[Seq[String]] = Task {
@@ -1273,10 +1274,9 @@ trait Runner extends CrossSbtModule
12731274
}
12741275
}
12751276

1276-
trait TestRunner extends SbtModule
1277+
trait TestRunner extends CrossSbtModule
12771278
with ScalaCliPublishModule
12781279
with ScalaCliScalafixModule {
1279-
override def scalaVersion: T[String] = Scala.runnerScala3
12801280
override def scalacOptions: T[Seq[String]] = Task {
12811281
super.scalacOptions() ++ Seq("-release", "8", "-deprecation")
12821282
}
@@ -1321,7 +1321,7 @@ object `local-repo` extends LocalRepo {
13211321
def developingOnStubModules = false
13221322

13231323
override def stubsModules: Seq[PublishLocalNoFluff] =
1324-
Seq(runner(Scala.runnerScala3), `test-runner`)
1324+
Seq(runner(Scala.runnerScala3), `test-runner`(Scala.runnerScala3))
13251325

13261326
override def version: T[String] = runner(Scala.runnerScala3).publishVersion()
13271327
}

0 commit comments

Comments
 (0)