Skip to content
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

Remove all @deprecated classes, methods and fields #4458

Closed
wants to merge 18 commits into from
Closed
3 changes: 2 additions & 1 deletion bsp/src/mill/bsp/BSP.scala
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ object BSP extends ExternalModule with CoursierModule {
argv = Seq(
millPath,
"--bsp",
"--disable-ticker",
"--ticker",
"false",
"--color",
"false",
"--jobs",
Expand Down
16 changes: 1 addition & 15 deletions contrib/bloop/src/mill/contrib/bloop/BloopImpl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class BloopImpl(evs: () => Seq[Evaluator], wd: os.Path) extends ExternalModule {
override def millOuterCtx = jm.millOuterCtx

object bloop extends MillModule {
def config = Task { outer.bloopConfig(jm) }
def config = Task { outer.bloopConfig(jm)() }

def writeConfigFile(): Command[(String, PathRef)] = Task.Command {
os.makeDir.all(bloopDir)
Expand All @@ -94,11 +94,6 @@ class BloopImpl(evs: () => Seq[Evaluator], wd: os.Path) extends ExternalModule {
Task.log.info(s"Wrote $path")
name(jm) -> PathRef(path)
}

@deprecated("Use writeConfigFile instead.", "Mill after 0.10.9")
def writeConfig: T[(String, PathRef)] = Task {
writeConfigFile()()
}
}

def asBloop: Option[Module] = jm match {
Expand All @@ -107,15 +102,6 @@ class BloopImpl(evs: () => Seq[Evaluator], wd: os.Path) extends ExternalModule {
}
}

// Compute all transitive modules from build children and via moduleDeps
@deprecated("Use mill.internal.JavaModuleUtils.transitiveModules instead", since = "mill 0.10.3")
def transitiveModules(
mod: define.Module,
found: Seq[define.Module] = Seq.empty
): Seq[define.Module] = {
JavaModuleUtils.transitiveModules(mod, accept)
}

protected def computeModules: Seq[JavaModule] = {
val evals = evs()
evals.flatMap { eval =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package contrib.docker

import mill.scalalib.JavaModule
import mill.api.Result
import mill.util.TestUtil
import mill.testkit.UnitTester
import mill.testkit.TestBaseModule
import os.Path
Expand Down
18 changes: 9 additions & 9 deletions contrib/playlib/src/mill/playlib/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import mill.{Agg, Task}
import mill.scalalib._

private[playlib] trait Dependencies extends ScalaModule with Version {
def core = Task { component("play") }
def guice = Task { component("play-guice") }
def server = Task { component("play-server") }
def logback = Task { component("play-logback") }
def evolutions = Task { component("play-jdbc-evolutions") }
def jdbc = Task { component("play-jdbc") }
def filters = Task { component("filters-helpers") }
def ws = Task { component("play-ahc-ws") }
def caffeine = Task { component("play-caffeine-cache") }
def core = Task { component("play")() }
def guice = Task { component("play-guice")() }
def server = Task { component("play-server")() }
def logback = Task { component("play-logback")() }
def evolutions = Task { component("play-jdbc-evolutions")() }
def jdbc = Task { component("play-jdbc")() }
def filters = Task { component("filters-helpers")() }
def ws = Task { component("play-ahc-ws")() }
def caffeine = Task { component("play-caffeine-cache")() }

override def ivyDeps = Task {
super.ivyDeps() ++ Agg(
Expand Down
6 changes: 3 additions & 3 deletions contrib/playlib/src/mill/playlib/Server.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import mill.{Agg, Task}

private[playlib] trait Server extends ScalaModule with Version {

def nettyServer = Task { component("play-netty-server") }
def nettyServer = Task { component("play-netty-server")() }

def akkaHttpServer = Task { component("play-akka-http-server") }
def akkaHttpServer = Task { component("play-akka-http-server")() }

def pekkoHttpServer = Task { component("play-pekko-http-server") }
def pekkoHttpServer = Task { component("play-pekko-http-server")() }

def playServerProvider = Task {
if (playVersion().startsWith("2."))
Expand Down
8 changes: 0 additions & 8 deletions contrib/playlib/src/mill/playlib/SingleModule.scala

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import utest.{TestSuite, Tests, assert, _}

object PlaySingleApiModuleTests extends TestSuite with PlayTestSuite {

object playsingleapi extends TestBaseModule with PlayApiModule with SingleModule {
override val millSourcePath = os.temp() // workaround problem in `SingleModule`
object playsingleapi extends TestBaseModule with PlayApiModule {
override val millSourcePath = os.temp()
override def playVersion = Task { testPlay28 }
override def scalaVersion = Task { "2.13.12" }
object test extends PlayTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import utest.{TestSuite, Tests, assert, _}

object PlaySingleModuleTests extends TestSuite with PlayTestSuite {

object playsingle extends TestBaseModule with PlayModule with SingleModule {
object playsingle extends TestBaseModule with PlayModule {
override val millSourcePath = os.temp() // workaround problem in `SingleModule`
override def playVersion = Task { testPlay28 }
override def scalaVersion = Task { sys.props.getOrElse("TEST_SCALA_2_13_VERSION", ???) }
Expand Down
10 changes: 0 additions & 10 deletions contrib/scalapblib/src/mill/contrib/scalapblib/ScalaPBWorker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,6 @@ class ScalaPBWorker extends AutoCloseable {

trait ScalaPBWorkerApi {

@deprecated("Use other overload instead", "Mill after 0.10.9")
def compileScalaPB(
root: File,
source: Seq[File],
scalaPBOptions: String,
generatedDirectory: File,
otherArgs: Seq[String]
): Unit =
compileScalaPB(Seq(root), source, scalaPBOptions, generatedDirectory, otherArgs)

def compileScalaPB(
roots: Seq[File],
source: Seq[File],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import mill.scalalib.{DepSyntax, SbtModule, ScalaModule, TestModule}
import mill.testkit.UnitTester
import mill.testkit.TestBaseModule
import utest._
import utest.framework.TestPath

trait HelloWorldTests extends utest.TestSuite {
def threadCount: Option[Int] = Some(1)
Expand Down
6 changes: 3 additions & 3 deletions contrib/twirllib/src/mill/twirllib/TwirlModule.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package mill
package twirllib

import coursier.{Dependency, Repository}
import coursier.Repository
import mill.api.PathRef
import mill.scalalib._
import mill.api.Loose
Expand Down Expand Up @@ -59,8 +59,8 @@ trait TwirlModule extends mill.Module { twirlModule =>
* @since Mill after 0.10.5
*/
trait TwirlResolver extends CoursierModule {
override def resolveCoursierDependency: Task[Dep => Dependency] = Task.Anon { (d: Dep) =>
Lib.depToDependency(d, twirlScalaVersion())
override def bindDependency: Task[Dep => BoundDep] = Task.Anon { (dep: Dep) =>
BoundDep(Lib.depToDependency(dep, twirlScalaVersion()), dep.force)
}

override def repositoriesTask: Task[Seq[Repository]] = twirlModule match {
Expand Down
7 changes: 3 additions & 4 deletions idea/src/mill/idea/GenIdeaImpl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ import mill.scalajslib.ScalaJSModule
import mill.scalalib.GenIdeaModule.{IdeaConfigFile, JavaFacet}
import mill.scalalib.internal.JavaModuleUtils
import mill.util.Classpath
import mill.scalalib
import mill.scalalib.{GenIdeaImpl => _, _}
import mill.scalalib._
import mill.scalanativelib.ScalaNativeModule

case class GenIdeaImpl(
Expand Down Expand Up @@ -89,7 +88,7 @@ case class GenIdeaImpl(
}

val modules: Seq[(Segments, JavaModule, Evaluator)] = foundModules
.collect { case (s, x: scalalib.JavaModule, ev) => (s, x, ev) }
.collect { case (s, x: JavaModule, ev) => (s, x, ev) }
.filterNot(_._2.skipIdea)
.distinct

Expand All @@ -98,7 +97,7 @@ case class GenIdeaImpl(

// val modules: Seq[(Segments, JavaModule)] =
// rootModule.millInternal.segmentsToModules.values
// .collect { case x: scalalib.JavaModule => x }
// .collect { case x: JavaModule => x }
// .flatMap(_.transitiveModuleDeps)
// .filterNot(_.skipIdea)
// .map(x => (x.millModuleSegments, x))
Expand Down
4 changes: 1 addition & 3 deletions javascriptlib/src/mill/javascriptlib/PublishModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ trait PublishModule extends TypeScriptModule {
}

private def pubModDepsSources: T[Seq[PathRef]] = Task {
for {
modSource <- Task.traverse(moduleDeps)(_.sources)
} yield modSource
Task.traverse(moduleDeps)(_.sources)()
}

private def pubBaseModeGenSources: T[Seq[PathRef]] = Task {
Expand Down
3 changes: 2 additions & 1 deletion kotlinlib/src/mill/kotlinlib/KotlinModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ trait KotlinModule extends JavaModule { outer =>
compileClasspath = compileCp,
javacOptions = javacOptions,
reporter = compileProblemReporter,
reportCachedProblems = reportOldProblems
reportCachedProblems = reportOldProblems,
incrementalCompilation = true // TODO: Should incrementalCompilation be added to kotlin api?
)
}

Expand Down
77 changes: 0 additions & 77 deletions main/api/src/mill/api/FixSizedCache.scala

This file was deleted.

46 changes: 0 additions & 46 deletions main/api/src/mill/api/KeyedLockedCache.scala

This file was deleted.

Loading