mirror of https://github.com/sbt/sbt.git
remove unused code
This commit is contained in:
parent
028248f73e
commit
d1a1dd9edd
|
|
@ -11,7 +11,6 @@ package internal
|
||||||
|
|
||||||
import sbt.internal.util.{ AttributeKey, LineRange, MessageOnlyException, RangePosition }
|
import sbt.internal.util.{ AttributeKey, LineRange, MessageOnlyException, RangePosition }
|
||||||
|
|
||||||
import java.io.File
|
|
||||||
import java.nio.file.Path
|
import java.nio.file.Path
|
||||||
import sbt.internal.util.complete.DefaultParsers.validID
|
import sbt.internal.util.complete.DefaultParsers.validID
|
||||||
import Def.{ ScopedKey, Setting, Settings }
|
import Def.{ ScopedKey, Setting, Settings }
|
||||||
|
|
@ -51,9 +50,6 @@ private[sbt] object EvaluateConfigurations {
|
||||||
val settings: Seq[(String, LineRange)]
|
val settings: Seq[(String, LineRange)]
|
||||||
)
|
)
|
||||||
|
|
||||||
/** The keywords we look for when classifying a string as a definition. */
|
|
||||||
private val DefinitionKeywords = Seq("lazy val ", "def ", "val ")
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Using an evaluating instance of the scala compiler, a sequence of files and
|
* Using an evaluating instance of the scala compiler, a sequence of files and
|
||||||
* the default imports to use, this method will take a ClassLoader of sbt-classes and
|
* the default imports to use, this method will take a ClassLoader of sbt-classes and
|
||||||
|
|
@ -192,10 +188,6 @@ private[sbt] object EvaluateConfigurations {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** move a project to be relative to this file after we've evaluated it. */
|
|
||||||
private def resolveBase(f: File, p: Project) =
|
|
||||||
p.copy(base = IO.resolve(f, p.base))
|
|
||||||
|
|
||||||
private def addOffset(offset: Int, lines: Seq[(String, Int)]): Seq[(String, Int)] =
|
private def addOffset(offset: Int, lines: Seq[(String, Int)]): Seq[(String, Int)] =
|
||||||
lines.map { (s, i) => (s, i + offset) }
|
lines.map { (s, i) => (s, i + offset) }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -198,7 +198,6 @@ trait Terminal extends AutoCloseable {
|
||||||
val in = System.in
|
val in = System.in
|
||||||
val ESC = '\u001B'
|
val ESC = '\u001B'
|
||||||
val EOT = '\u0004'
|
val EOT = '\u0004'
|
||||||
var result: Int = -1
|
|
||||||
def readBracket: Int =
|
def readBracket: Int =
|
||||||
in.read() match {
|
in.read() match {
|
||||||
case '[' => readAnsiControl
|
case '[' => readAnsiControl
|
||||||
|
|
|
||||||
|
|
@ -979,7 +979,6 @@ object Defaults extends BuildCommon {
|
||||||
},
|
},
|
||||||
scalacOptions := {
|
scalacOptions := {
|
||||||
val old = scalacOptions.value
|
val old = scalacOptions.value
|
||||||
val converter = fileConverter.value
|
|
||||||
if (exportPipelining.value)
|
if (exportPipelining.value)
|
||||||
Def.uncached(
|
Def.uncached(
|
||||||
Vector(
|
Vector(
|
||||||
|
|
@ -1955,7 +1954,6 @@ object Defaults extends BuildCommon {
|
||||||
val hasJava = srcs.exists(_.name.endsWith(".java"))
|
val hasJava = srcs.exists(_.name.endsWith(".java"))
|
||||||
val cp = data(dependencyClasspath.value).toList
|
val cp = data(dependencyClasspath.value).toList
|
||||||
val label = nameForSrc(configuration.value.name)
|
val label = nameForSrc(configuration.value.name)
|
||||||
val fiOpts = fileInputOptions.value
|
|
||||||
val reporter = (compile / bspReporter).value
|
val reporter = (compile / bspReporter).value
|
||||||
val converter = fileConverter.value
|
val converter = fileConverter.value
|
||||||
val tFiles = tastyFiles.value
|
val tFiles = tastyFiles.value
|
||||||
|
|
@ -3343,7 +3341,6 @@ object Classpaths {
|
||||||
val sbtOrg = scalaOrganization.value
|
val sbtOrg = scalaOrganization.value
|
||||||
val version = scalaVersion.value
|
val version = scalaVersion.value
|
||||||
val extResolvers = externalResolvers.value
|
val extResolvers = externalResolvers.value
|
||||||
val isScala3M123 = ScalaArtifacts.isScala3M123(version)
|
|
||||||
val allToolDeps =
|
val allToolDeps =
|
||||||
if scalaHome.value.isDefined || scalaModuleInfo.value.isEmpty || !managedScalaInstance.value
|
if scalaHome.value.isDefined || scalaModuleInfo.value.isEmpty || !managedScalaInstance.value
|
||||||
then Nil
|
then Nil
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ object Compiler:
|
||||||
Def.taskDyn {
|
Def.taskDyn {
|
||||||
val sh = Keys.scalaHome.value
|
val sh = Keys.scalaHome.value
|
||||||
val app = Keys.appConfiguration.value
|
val app = Keys.appConfiguration.value
|
||||||
val sv = Keys.scalaVersion.value
|
|
||||||
val managed = Keys.managedScalaInstance.value
|
val managed = Keys.managedScalaInstance.value
|
||||||
sh match
|
sh match
|
||||||
case Some(h) => scalaInstanceFromHome(h)
|
case Some(h) => scalaInstanceFromHome(h)
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ package sbt.util
|
||||||
private[sbt] object ListInstances:
|
private[sbt] object ListInstances:
|
||||||
lazy val listMonad: Monad[List] =
|
lazy val listMonad: Monad[List] =
|
||||||
new Monad[List]:
|
new Monad[List]:
|
||||||
type F[a] = List[a]
|
|
||||||
def pure[A1](x: () => A1): List[A1] = List(x())
|
def pure[A1](x: () => A1): List[A1] = List(x())
|
||||||
def ap[A, B](ff: List[A => B])(fa: List[A]): List[B] =
|
def ap[A, B](ff: List[A => B])(fa: List[A]): List[B] =
|
||||||
for
|
for
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue