mirror of https://github.com/sbt/sbt.git
Fix params order in `@deprecated`
This commit is contained in:
parent
c6bf00c2c2
commit
1f90ef6b43
|
|
@ -20,9 +20,9 @@ import xsbti.api.Source
|
||||||
import xsbti.compile.{ CompileOrder, DependencyChanges, GlobalsCache, Output, SingleOutput, MultipleOutput, CompileProgress }
|
import xsbti.compile.{ CompileOrder, DependencyChanges, GlobalsCache, Output, SingleOutput, MultipleOutput, CompileProgress }
|
||||||
import CompileOrder.{ JavaThenScala, Mixed, ScalaThenJava }
|
import CompileOrder.{ JavaThenScala, Mixed, ScalaThenJava }
|
||||||
|
|
||||||
@deprecated("0.13.8", "Use MixedAnalyzingCompiler or IC instead.")
|
@deprecated("Use MixedAnalyzingCompiler or IC instead.", "0.13.8")
|
||||||
class AggressiveCompile(cacheFile: File) {
|
class AggressiveCompile(cacheFile: File) {
|
||||||
@deprecated("0.13.8", "Use IC.compile instead.")
|
@deprecated("Use IC.compile instead.", "0.13.8")
|
||||||
def apply(compiler: AnalyzingCompiler,
|
def apply(compiler: AnalyzingCompiler,
|
||||||
javac: xsbti.compile.JavaCompiler,
|
javac: xsbti.compile.JavaCompiler,
|
||||||
sources: Seq[File], classpath: Seq[File],
|
sources: Seq[File], classpath: Seq[File],
|
||||||
|
|
@ -187,19 +187,19 @@ class AggressiveCompile(cacheFile: File) {
|
||||||
val store = MixedAnalyzingCompiler.staticCachedStore(cacheFile)
|
val store = MixedAnalyzingCompiler.staticCachedStore(cacheFile)
|
||||||
|
|
||||||
}
|
}
|
||||||
@deprecated("0.13.8", "Use MixedAnalyzingCompiler instead.")
|
@deprecated("Use MixedAnalyzingCompiler instead.", "0.13.8")
|
||||||
object AggressiveCompile {
|
object AggressiveCompile {
|
||||||
@deprecated("0.13.8", "Use MixedAnalyzingCompiler.staticCachedStore instead.")
|
@deprecated("Use MixedAnalyzingCompiler.staticCachedStore instead.", "0.13.8")
|
||||||
def staticCachedStore(cacheFile: File) = MixedAnalyzingCompiler.staticCachedStore(cacheFile)
|
def staticCachedStore(cacheFile: File) = MixedAnalyzingCompiler.staticCachedStore(cacheFile)
|
||||||
|
|
||||||
@deprecated("0.13.8", "Deprecated in favor of new sbt.compiler.javac package.")
|
@deprecated("Deprecated in favor of new sbt.compiler.javac package.", "0.13.8")
|
||||||
def directOrFork(instance: ScalaInstance, cpOptions: ClasspathOptions, javaHome: Option[File]): JavaTool =
|
def directOrFork(instance: ScalaInstance, cpOptions: ClasspathOptions, javaHome: Option[File]): JavaTool =
|
||||||
if (javaHome.isDefined)
|
if (javaHome.isDefined)
|
||||||
JavaCompiler.fork(cpOptions, instance)(forkJavac(javaHome))
|
JavaCompiler.fork(cpOptions, instance)(forkJavac(javaHome))
|
||||||
else
|
else
|
||||||
JavaCompiler.directOrFork(cpOptions, instance)(forkJavac(None))
|
JavaCompiler.directOrFork(cpOptions, instance)(forkJavac(None))
|
||||||
|
|
||||||
@deprecated("0.13.8", "Deprecated in favor of new sbt.compiler.javac package.")
|
@deprecated("Deprecated in favor of new sbt.compiler.javac package.", "0.13.8")
|
||||||
def forkJavac(javaHome: Option[File]): JavaCompiler.Fork =
|
def forkJavac(javaHome: Option[File]): JavaCompiler.Fork =
|
||||||
{
|
{
|
||||||
import Path._
|
import Path._
|
||||||
|
|
@ -218,7 +218,7 @@ object AggressiveCompile {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@deprecated("0.13.8", "Deprecated in favor of new sbt.compiler.javac package.")
|
@deprecated("Deprecated in favor of new sbt.compiler.javac package.", "0.13.8")
|
||||||
private[sbt] class JavacLogger(log: Logger) extends ProcessLogger {
|
private[sbt] class JavacLogger(log: Logger) extends ProcessLogger {
|
||||||
import scala.collection.mutable.ListBuffer
|
import scala.collection.mutable.ListBuffer
|
||||||
import Level.{ Info, Warn, Error, Value => LogLevel }
|
import Level.{ Info, Warn, Error, Value => LogLevel }
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ object IC extends IncrementalCompiler[Analysis, AnalyzingCompiler] {
|
||||||
|
|
||||||
private[this] def m2o[S](opt: Maybe[S]): Option[S] = if (opt.isEmpty) None else Some(opt.get)
|
private[this] def m2o[S](opt: Maybe[S]): Option[S] = if (opt.isEmpty) None else Some(opt.get)
|
||||||
|
|
||||||
@deprecated("0.13.8", "A logger is no longer needed.")
|
@deprecated("A logger is no longer needed.", "0.13.8")
|
||||||
override def newScalaCompiler(instance: ScalaInstance, interfaceJar: File, options: ClasspathOptions, log: Logger): AnalyzingCompiler =
|
override def newScalaCompiler(instance: ScalaInstance, interfaceJar: File, options: ClasspathOptions, log: Logger): AnalyzingCompiler =
|
||||||
new AnalyzingCompiler(instance, CompilerInterfaceProvider.constant(interfaceJar), options)
|
new AnalyzingCompiler(instance, CompilerInterfaceProvider.constant(interfaceJar), options)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,12 @@ import java.io.{ File, PrintWriter }
|
||||||
import xsbti.{ Severity, Reporter }
|
import xsbti.{ Severity, Reporter }
|
||||||
import xsbti.compile.Output
|
import xsbti.compile.Output
|
||||||
|
|
||||||
@deprecated("0.13.8", "Please use the new set of compilers in sbt.compilers.javac")
|
@deprecated("Please use the new set of compilers in sbt.compilers.javac", "0.13.8")
|
||||||
abstract class JavacContract(val name: String, val clazz: String) {
|
abstract class JavacContract(val name: String, val clazz: String) {
|
||||||
def exec(args: Array[String], writer: PrintWriter): Int
|
def exec(args: Array[String], writer: PrintWriter): Int
|
||||||
}
|
}
|
||||||
/** An interface we use to call the Java compiler. */
|
/** An interface we use to call the Java compiler. */
|
||||||
@deprecated("0.13.8", "Please use the new set of compilers in sbt.compilers.javac")
|
@deprecated("Please use the new set of compilers in sbt.compilers.javac", "0.13.8")
|
||||||
trait JavaCompiler extends xsbti.compile.JavaCompiler {
|
trait JavaCompiler extends xsbti.compile.JavaCompiler {
|
||||||
/**
|
/**
|
||||||
* Runs the java compiler
|
* Runs the java compiler
|
||||||
|
|
@ -42,13 +42,13 @@ trait JavaCompiler extends xsbti.compile.JavaCompiler {
|
||||||
|
|
||||||
def onArgs(f: Seq[String] => Unit): JavaCompiler
|
def onArgs(f: Seq[String] => Unit): JavaCompiler
|
||||||
}
|
}
|
||||||
@deprecated("0.13.8", "Please use the new set of compilers in sbt.compilers.javac")
|
@deprecated("Please use the new set of compilers in sbt.compilers.javac", "0.13.8")
|
||||||
trait Javadoc {
|
trait Javadoc {
|
||||||
def doc(sources: Seq[File], classpath: Seq[File], outputDirectory: File, options: Seq[String], maximumErrors: Int, log: Logger)
|
def doc(sources: Seq[File], classpath: Seq[File], outputDirectory: File, options: Seq[String], maximumErrors: Int, log: Logger)
|
||||||
|
|
||||||
def onArgs(f: Seq[String] => Unit): Javadoc
|
def onArgs(f: Seq[String] => Unit): Javadoc
|
||||||
}
|
}
|
||||||
@deprecated("0.13.8", "Please use the new set of compilers in sbt.compilers.javac")
|
@deprecated("Please use the new set of compilers in sbt.compilers.javac", "0.13.8")
|
||||||
trait JavaTool extends Javadoc with JavaCompiler {
|
trait JavaTool extends Javadoc with JavaCompiler {
|
||||||
def apply(sources: Seq[File], classpath: Seq[File], outputDirectory: File, options: Seq[String])(implicit log: Logger) =
|
def apply(sources: Seq[File], classpath: Seq[File], outputDirectory: File, options: Seq[String])(implicit log: Logger) =
|
||||||
compile(JavaCompiler.javac, sources, classpath, outputDirectory, options)(log)
|
compile(JavaCompiler.javac, sources, classpath, outputDirectory, options)(log)
|
||||||
|
|
@ -60,9 +60,9 @@ trait JavaTool extends Javadoc with JavaCompiler {
|
||||||
|
|
||||||
def onArgs(f: Seq[String] => Unit): JavaTool
|
def onArgs(f: Seq[String] => Unit): JavaTool
|
||||||
}
|
}
|
||||||
@deprecated("0.13.8", "Please use the new set of compilers in sbt.compilers.javac")
|
@deprecated("Please use the new set of compilers in sbt.compilers.javac", "0.13.8")
|
||||||
object JavaCompiler {
|
object JavaCompiler {
|
||||||
@deprecated("0.13.8", "Please use the new set of compilers in sbt.compilers.javac")
|
@deprecated("Please use the new set of compilers in sbt.compilers.javac", "0.13.8")
|
||||||
type Fork = (JavacContract, Seq[String], Logger) => Int
|
type Fork = (JavacContract, Seq[String], Logger) => Int
|
||||||
|
|
||||||
val javac = new JavacContract("javac", "com.sun.tools.javac.Main") {
|
val javac = new JavacContract("javac", "com.sun.tools.javac.Main") {
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ private[sbt] object ConvertResolver {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Converts the given sbt resolver into an Ivy resolver. */
|
/** Converts the given sbt resolver into an Ivy resolver. */
|
||||||
@deprecated("0.13.8", "Use the variant with updateOptions")
|
@deprecated("Use the variant with updateOptions", "0.13.8")
|
||||||
def apply(r: Resolver, settings: IvySettings, log: Logger): DependencyResolver =
|
def apply(r: Resolver, settings: IvySettings, log: Logger): DependencyResolver =
|
||||||
apply(r, settings, UpdateOptions(), log)
|
apply(r, settings, UpdateOptions(), log)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import java.net.URL
|
||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
import sbt.mavenint.{ PomExtraDependencyAttributes, SbtPomExtraProperties }
|
import sbt.mavenint.{ PomExtraDependencyAttributes, SbtPomExtraProperties }
|
||||||
|
|
||||||
@deprecated("0.13.8", "We now use an Aether-based pom parser.")
|
@deprecated("We now use an Aether-based pom parser.", "0.13.8")
|
||||||
final class CustomPomParser(delegate: ModuleDescriptorParser, transform: (ModuleDescriptorParser, ModuleDescriptor) => ModuleDescriptor) extends ModuleDescriptorParser {
|
final class CustomPomParser(delegate: ModuleDescriptorParser, transform: (ModuleDescriptorParser, ModuleDescriptor) => ModuleDescriptor) extends ModuleDescriptorParser {
|
||||||
override def parseDescriptor(ivySettings: ParserSettings, descriptorURL: URL, validate: Boolean) =
|
override def parseDescriptor(ivySettings: ParserSettings, descriptorURL: URL, validate: Boolean) =
|
||||||
transform(this, delegate.parseDescriptor(ivySettings, descriptorURL, validate))
|
transform(this, delegate.parseDescriptor(ivySettings, descriptorURL, validate))
|
||||||
|
|
@ -28,7 +28,7 @@ final class CustomPomParser(delegate: ModuleDescriptorParser, transform: (Module
|
||||||
override def getType() = delegate.getType()
|
override def getType() = delegate.getType()
|
||||||
override def getMetadataArtifact(mrid: ModuleRevisionId, res: Resource) = delegate.getMetadataArtifact(mrid, res)
|
override def getMetadataArtifact(mrid: ModuleRevisionId, res: Resource) = delegate.getMetadataArtifact(mrid, res)
|
||||||
}
|
}
|
||||||
@deprecated("0.13.8", "We now use an Aether-based pom parser.")
|
@deprecated("We now use an Aether-based pom parser.", "0.13.8")
|
||||||
object CustomPomParser {
|
object CustomPomParser {
|
||||||
|
|
||||||
// Evil hackery to override the default maven pom mappings.
|
// Evil hackery to override the default maven pom mappings.
|
||||||
|
|
|
||||||
|
|
@ -68,13 +68,13 @@ object Compiler {
|
||||||
}
|
}
|
||||||
compilers(instance, cpOptions, CheaterJavaTool(javac2, javac))
|
compilers(instance, cpOptions, CheaterJavaTool(javac2, javac))
|
||||||
}
|
}
|
||||||
@deprecated("0.13.8", "Deprecated in favor of new sbt.compiler.javac package.")
|
@deprecated("Deprecated in favor of new sbt.compiler.javac package.", "0.13.8")
|
||||||
def compilers(instance: ScalaInstance, cpOptions: ClasspathOptions, javac: sbt.compiler.JavaCompiler.Fork)(implicit app: AppConfiguration, log: Logger): Compilers =
|
def compilers(instance: ScalaInstance, cpOptions: ClasspathOptions, javac: sbt.compiler.JavaCompiler.Fork)(implicit app: AppConfiguration, log: Logger): Compilers =
|
||||||
{
|
{
|
||||||
val javaCompiler = sbt.compiler.JavaCompiler.fork(cpOptions, instance)(javac)
|
val javaCompiler = sbt.compiler.JavaCompiler.fork(cpOptions, instance)(javac)
|
||||||
compilers(instance, cpOptions, javaCompiler)
|
compilers(instance, cpOptions, javaCompiler)
|
||||||
}
|
}
|
||||||
@deprecated("0.13.8", "Deprecated in favor of new sbt.compiler.javac package.")
|
@deprecated("Deprecated in favor of new sbt.compiler.javac package.", "0.13.8")
|
||||||
def compilers(instance: ScalaInstance, cpOptions: ClasspathOptions, javac: JavaTool)(implicit app: AppConfiguration, log: Logger): Compilers =
|
def compilers(instance: ScalaInstance, cpOptions: ClasspathOptions, javac: JavaTool)(implicit app: AppConfiguration, log: Logger): Compilers =
|
||||||
{
|
{
|
||||||
val scalac = scalaCompiler(instance, cpOptions)
|
val scalac = scalaCompiler(instance, cpOptions)
|
||||||
|
|
@ -88,12 +88,12 @@ object Compiler {
|
||||||
new AnalyzingCompiler(instance, provider, cpOptions)
|
new AnalyzingCompiler(instance, provider, cpOptions)
|
||||||
}
|
}
|
||||||
|
|
||||||
@deprecated("0.13.8", "Use the `compile` method instead.")
|
@deprecated("Use the `compile` method instead.", "0.13.8")
|
||||||
def apply(in: Inputs, log: Logger): Analysis = {
|
def apply(in: Inputs, log: Logger): Analysis = {
|
||||||
import in.config._
|
import in.config._
|
||||||
apply(in, log, new LoggerReporter(maxErrors, log, sourcePositionMapper))
|
apply(in, log, new LoggerReporter(maxErrors, log, sourcePositionMapper))
|
||||||
}
|
}
|
||||||
@deprecated("0.13.8", "Use the `compile` method instead.")
|
@deprecated("Use the `compile` method instead.", "0.13.8")
|
||||||
def apply(in: Inputs, log: Logger, reporter: xsbti.Reporter): Analysis = {
|
def apply(in: Inputs, log: Logger, reporter: xsbti.Reporter): Analysis = {
|
||||||
import in.compilers._
|
import in.compilers._
|
||||||
import in.config._
|
import in.config._
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ trait Init[Scope] {
|
||||||
*/
|
*/
|
||||||
private[sbt] final def validated[T](key: ScopedKey[T], selfRefOk: Boolean): ValidationCapture[T] = new ValidationCapture(key, selfRefOk)
|
private[sbt] final def validated[T](key: ScopedKey[T], selfRefOk: Boolean): ValidationCapture[T] = new ValidationCapture(key, selfRefOk)
|
||||||
|
|
||||||
@deprecated("0.13.7", "Use the version with default arguments and default parameter.")
|
@deprecated("Use the version with default arguments and default parameter.", "0.13.7")
|
||||||
final def derive[T](s: Setting[T], allowDynamic: Boolean, filter: Scope => Boolean, trigger: AttributeKey[_] => Boolean): Setting[T] =
|
final def derive[T](s: Setting[T], allowDynamic: Boolean, filter: Scope => Boolean, trigger: AttributeKey[_] => Boolean): Setting[T] =
|
||||||
derive(s, allowDynamic, filter, trigger, false)
|
derive(s, allowDynamic, filter, trigger, false)
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue