diff --git a/contrib/playlib/src/mill/playlib/RouterModule.scala b/contrib/playlib/src/mill/playlib/RouterModule.scala index a23d6fc4804..c578095b6aa 100644 --- a/contrib/playlib/src/mill/playlib/RouterModule.scala +++ b/contrib/playlib/src/mill/playlib/RouterModule.scala @@ -64,14 +64,14 @@ trait RouterModule extends ScalaModule with Version { def compileRouter: T[CompilationResult] = T.persistent { T.log.debug(s"compiling play routes with ${playVersion()} worker") routeCompilerWorker.routeCompilerWorker().compile( - toolsClasspath().map(_.path), - routeFiles().map(_.path), - routesAdditionalImport, - generateForwardsRouter, - generateReverseRouter, - namespaceReverseRouter, - generatorType, - T.dest + routerClasspath = playRouterToolsClasspath().map(_.path), + files = routeFiles().map(_.path), + additionalImports = routesAdditionalImport, + forwardsRouter = generateForwardsRouter, + reverseRouter = generateReverseRouter, + namespaceReverseRouter = namespaceReverseRouter, + generatorType = generatorType, + dest = T.dest ) } @@ -90,7 +90,12 @@ trait RouterModule extends ScalaModule with Version { ) } + @deprecated("Use playRouterToolsClasspath instead", "mill after 0.10.0-M1") def toolsClasspath = T { + playRouterToolsClasspath() + } + + def playRouterToolsClasspath = T { playRouteCompilerWorkerClasspath() ++ routerClasspath() } diff --git a/contrib/scoverage/src/ScoverageModule.scala b/contrib/scoverage/src/ScoverageModule.scala index a5ebe98cd19..0eacbeeb6df 100644 --- a/contrib/scoverage/src/ScoverageModule.scala +++ b/contrib/scoverage/src/ScoverageModule.scala @@ -63,7 +63,12 @@ trait ScoverageModule extends ScalaModule { outer: ScalaModule => ivy"org.scoverage::scalac-scoverage-plugin:${outer.scoverageVersion()}" } + @deprecated("Use scoverageToolsClasspath instead.", "mill after 0.10.0-M1") def toolsClasspath: T[Agg[PathRef]] = T { + scoverageToolsClasspath() + } + + def scoverageToolsClasspath: T[Agg[PathRef]] = T { scoverageReportWorkerClasspath() ++ scoverageClasspath() } @@ -92,7 +97,7 @@ trait ScoverageModule extends ScalaModule { outer: ScalaModule => def doReport(reportType: ReportType): Task[Unit] = T.task { ScoverageReportWorker .scoverageReportWorker() - .bridge(toolsClasspath().map(_.path)) + .bridge(scoverageToolsClasspath().map(_.path)) .report(reportType, allSources().map(_.path), Seq(data().path)) } diff --git a/contrib/scoverage/src/ScoverageReport.scala b/contrib/scoverage/src/ScoverageReport.scala index 31e95460190..fb85ec88cd1 100644 --- a/contrib/scoverage/src/ScoverageReport.scala +++ b/contrib/scoverage/src/ScoverageReport.scala @@ -104,7 +104,7 @@ trait ScoverageReport extends Module { val dataPaths: Seq[Path] = T.sequence(dataTasks)().map(_.path) scoverageReportWorkerModule .scoverageReportWorker() - .bridge(workerModule.toolsClasspath().map(_.path)) + .bridge(workerModule.scoverageToolsClasspath().map(_.path)) .report(reportType, sourcePaths, dataPaths) PathRef(T.dest) } diff --git a/scalajslib/src/ScalaJSModule.scala b/scalajslib/src/ScalaJSModule.scala index ed8db829279..d944a429366 100644 --- a/scalajslib/src/ScalaJSModule.scala +++ b/scalajslib/src/ScalaJSModule.scala @@ -64,31 +64,34 @@ trait ScalaJSModule extends scalalib.ScalaModule { outer => ) } - def toolsClasspath = T { scalaJSWorkerClasspath() ++ scalaJSLinkerClasspath() } + @deprecated("Use scalaJsToolsClasspath instead", "mill after 0.10.0-M1") + def toolsClasspath = T { scalaJsToolsClasspath() } + + def scalaJsToolsClasspath = T { scalaJSWorkerClasspath() ++ scalaJSLinkerClasspath() } def fastOpt = T { link( - ScalaJSWorkerApi.scalaJSWorker(), - toolsClasspath(), - runClasspath(), - finalMainClassOpt().toOption, + worker = ScalaJSWorkerApi.scalaJSWorker(), + toolsClasspath = scalaJsToolsClasspath(), + runClasspath = runClasspath(), + mainClass = finalMainClassOpt().toOption, testBridgeInit = false, - FastOpt, - moduleKind(), - useECMAScript2015() + mode = FastOpt, + moduleKind = moduleKind(), + useECMAScript2015 = useECMAScript2015() ) } def fullOpt = T { link( - ScalaJSWorkerApi.scalaJSWorker(), - toolsClasspath(), - runClasspath(), - finalMainClassOpt().toOption, + worker = ScalaJSWorkerApi.scalaJSWorker(), + toolsClasspath = scalaJsToolsClasspath(), + runClasspath = runClasspath(), + mainClass = finalMainClassOpt().toOption, testBridgeInit = false, - FullOpt, - moduleKind(), - useECMAScript2015() + mode = FullOpt, + moduleKind = moduleKind(), + useECMAScript2015 = useECMAScript2015() ) } @@ -99,7 +102,7 @@ trait ScalaJSModule extends scalalib.ScalaModule { outer => case Left(err) => Result.Failure(err) case Right(_) => ScalaJSWorkerApi.scalaJSWorker().run( - toolsClasspath().map(_.path), + scalaJsToolsClasspath().map(_.path), jsEnvConfig(), fastOpt().path.toIO ) @@ -150,9 +153,11 @@ trait ScalaJSModule extends scalalib.ScalaModule { outer => ).map(PathRef(_)) } - override def mandatoryScalacOptions = super.mandatoryScalacOptions() ++ { - if (isScala3(scalaVersion())) Seq("-scalajs") - else Seq.empty + override def mandatoryScalacOptions = T { + super.mandatoryScalacOptions() ++ { + if (isScala3(scalaVersion())) Seq("-scalajs") + else Seq.empty + } } override def scalacPluginIvyDeps = T { @@ -204,7 +209,7 @@ trait TestScalaJSModule extends ScalaJSModule with TestModule { def fastOptTest = T { link( ScalaJSWorkerApi.scalaJSWorker(), - toolsClasspath(), + scalaJsToolsClasspath(), scalaJSTestDeps() ++ runClasspath(), None, testBridgeInit = true, @@ -222,7 +227,7 @@ trait TestScalaJSModule extends ScalaJSModule with TestModule { ): Task[(String, Seq[TestRunner.Result])] = T.task { val (close, framework) = mill.scalajslib.ScalaJSWorkerApi.scalaJSWorker().getFramework( - toolsClasspath().map(_.path), + scalaJsToolsClasspath().map(_.path), jsEnvConfig(), testFramework(), fastOptTest().path.toIO,