mirror of https://github.com/sbt/sbt.git
Merge pull request #4365 from eed3si9n/wip/warnings
-Xfatal-warnings in most subprojects
This commit is contained in:
commit
fbce3232a8
|
|
@ -221,6 +221,7 @@ lazy val testingProj = (project in file("testing"))
|
|||
baseSettings,
|
||||
name := "Testing",
|
||||
libraryDependencies ++= Seq(testInterface, launcherInterface, sjsonNewScalaJson.value),
|
||||
Compile / scalacOptions += "-Ywarn-unused:-locals,-explicits,-privates",
|
||||
managedSourceDirectories in Compile +=
|
||||
baseDirectory.value / "src" / "main" / "contraband-scala",
|
||||
sourceManaged in (Compile, generateContrabands) := baseDirectory.value / "src" / "main" / "contraband-scala",
|
||||
|
|
@ -294,6 +295,7 @@ lazy val runProj = (project in file("run"))
|
|||
.settings(
|
||||
testedBaseSettings,
|
||||
name := "Run",
|
||||
Compile / scalacOptions += "-Ywarn-unused:-locals,-explicits,-privates",
|
||||
managedSourceDirectories in Compile +=
|
||||
baseDirectory.value / "src" / "main" / "contraband-scala",
|
||||
sourceManaged in (Compile, generateContrabands) := baseDirectory.value / "src" / "main" / "contraband-scala",
|
||||
|
|
@ -398,10 +400,9 @@ lazy val protocolProj = (project in file("protocol"))
|
|||
.dependsOn(collectionProj)
|
||||
.settings(
|
||||
testedBaseSettings,
|
||||
scalacOptions -= "-Ywarn-unused",
|
||||
scalacOptions += "-Xlint:-unused",
|
||||
name := "Protocol",
|
||||
libraryDependencies ++= Seq(sjsonNewScalaJson.value, ipcSocket),
|
||||
Compile / scalacOptions += "-Ywarn-unused:-locals,-explicits,-privates",
|
||||
managedSourceDirectories in Compile +=
|
||||
baseDirectory.value / "src" / "main" / "contraband-scala",
|
||||
sourceManaged in (Compile, generateContrabands) := baseDirectory.value / "src" / "main" / "contraband-scala",
|
||||
|
|
@ -443,6 +444,7 @@ lazy val commandProj = (project in file("main-command"))
|
|||
testedBaseSettings,
|
||||
name := "Command",
|
||||
libraryDependencies ++= Seq(launcherInterface, sjsonNewScalaJson.value, templateResolverApi),
|
||||
Compile / scalacOptions += "-Ywarn-unused:-locals,-explicits,-privates",
|
||||
managedSourceDirectories in Compile +=
|
||||
baseDirectory.value / "src" / "main" / "contraband-scala",
|
||||
sourceManaged in (Compile, generateContrabands) := baseDirectory.value / "src" / "main" / "contraband-scala",
|
||||
|
|
@ -546,6 +548,7 @@ lazy val mainProj = (project in file("main"))
|
|||
testedBaseSettings,
|
||||
name := "Main",
|
||||
libraryDependencies ++= scalaXml.value ++ Seq(launcherInterface) ++ log4jDependencies ++ Seq(scalaCacheCaffeine),
|
||||
Compile / scalacOptions -= "-Xfatal-warnings",
|
||||
managedSourceDirectories in Compile +=
|
||||
baseDirectory.value / "src" / "main" / "contraband-scala",
|
||||
sourceManaged in (Compile, generateContrabands) := baseDirectory.value / "src" / "main" / "contraband-scala",
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ object Instance {
|
|||
*
|
||||
* Each `input` in each expression of the form `wrap[T]( input )` is transformed by `convert`.
|
||||
* This transformation converts the input Tree to a Tree of type `M[T]`.
|
||||
* The original wrapped expression `wrap(input)` is replaced by a reference to a new local `val $x: T`, where `$x` is a fresh name.
|
||||
* The original wrapped expression `wrap(input)` is replaced by a reference to a new local `val x: T`, where `x` is a fresh name.
|
||||
* These converted inputs are passed to `builder` as well as the list of these synthetic `ValDef`s.
|
||||
* The `TupleBuilder` instance constructs a tuple (Tree) from the inputs and defines the right hand side of the vals
|
||||
* that unpacks the tuple containing the results of the inputs.
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import sbt.io.IO
|
|||
|
||||
/**
|
||||
* These sources of examples are used in parsers for user input completion. An example of such a source is the
|
||||
* [[sbt.complete.FileExamples]] class, which provides a list of suggested files to the user as they press the
|
||||
* [[sbt.internal.util.complete.FileExamples]] class, which provides a list of suggested files to the user as they press the
|
||||
* TAB key in the console.
|
||||
*/
|
||||
trait ExampleSource {
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ final case class Clauses(clauses: List[Clause]) {
|
|||
/** When the `body` Formula succeeds, atoms in `head` are true. */
|
||||
final case class Clause(body: Formula, head: Set[Atom])
|
||||
|
||||
/** A literal is an [[Atom]] or its [[negation|Negated]]. */
|
||||
/** A literal is an [[Atom]] or its negation ([[Negated]]). */
|
||||
sealed abstract class Literal extends Formula {
|
||||
|
||||
/** The underlying (positive) atom. */
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ object Package {
|
|||
val inputFiles = conf.sources.map(_._1).toSet
|
||||
val inputs = conf.sources :+: lastModified(inputFiles) :+: manifest :+: HNil
|
||||
cachedMakeJar(inputs)(() => exists(conf.jar))
|
||||
()
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -280,13 +280,13 @@ object Scoped {
|
|||
final def set(app: Initialize[S], source: SourcePosition): Setting[S] =
|
||||
setting(scopedKey, app, source)
|
||||
|
||||
/** From the given [[Settings]], extract the value bound to this key. */
|
||||
/** From the given `Settings`, extract the value bound to this key. */
|
||||
final def get(settings: Settings[Scope]): Option[S] =
|
||||
settings.get(scopedKey.scope, scopedKey.key)
|
||||
|
||||
/**
|
||||
* Creates an [[Def.Initialize]] with value [[scala.None]] if there was no previous definition of this key,
|
||||
* and `[[scala.Some]](value)` if a definition exists. Useful for when you want to use the ''existence'' of
|
||||
* Creates an [[Def.Initialize]] with value `scala.None` if there was no previous definition of this key,
|
||||
* and `scala.Some(value)` if a definition exists. Useful for when you want to use the ''existence'' of
|
||||
* one setting in order to define another setting.
|
||||
* @return currently bound value wrapped in `Initialize[Some[T]]`, or `Initialize[None]` if unbound.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ private[sbt] object LibraryManagement {
|
|||
val finalReport = transform(report)
|
||||
|
||||
// Warn of any eviction and compatibility warnings
|
||||
val ew = EvictionWarning(module, ewo, finalReport, log)
|
||||
val ew = EvictionWarning(module, ewo, finalReport)
|
||||
ew.lines.foreach(log.warn(_))
|
||||
ew.infoAllTheThings.foreach(log.info(_))
|
||||
CompatibilityWarning.run(compatWarning, module, mavenStyle, log)
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ abstract class TestBuild {
|
|||
implicit val tGen = Arbitrary { genTasks(lowerIDGen, MaxDepsGen, MaxTasksGen) }
|
||||
val seed = rng.Seed.random
|
||||
|
||||
final class Keys(val env: Env, val scopes: Seq[Scope]) {
|
||||
class Keys(val env: Env, val scopes: Seq[Scope]) {
|
||||
override def toString = env + "\n" + scopes.mkString("Scopes:\n\t", "\n\t", "")
|
||||
lazy val delegated = scopes map env.delegates
|
||||
}
|
||||
|
|
@ -119,7 +119,7 @@ abstract class TestBuild {
|
|||
(taskAxes, zero.toSet, single.toSet, multi.toSet)
|
||||
}
|
||||
}
|
||||
final case class Env(builds: Vector[Build], tasks: Vector[Taskk]) {
|
||||
case class Env(builds: Vector[Build], tasks: Vector[Taskk]) {
|
||||
override def toString =
|
||||
"Env:\n " + " Tasks:\n " + tasks.mkString("\n ") + "\n" + builds.mkString("\n ")
|
||||
val root = builds.head
|
||||
|
|
@ -159,7 +159,7 @@ abstract class TestBuild {
|
|||
}
|
||||
def getKey: Taskk => AttributeKey[_] = _.key
|
||||
def toConfigKey: Configuration => ConfigKey = c => ConfigKey(c.name)
|
||||
final case class Build(uri: URI, projects: Seq[Proj]) {
|
||||
case class Build(uri: URI, projects: Seq[Proj]) {
|
||||
override def toString = "Build " + uri.toString + " :\n " + projects.mkString("\n ")
|
||||
val allProjects = projects map { p =>
|
||||
(ProjectRef(uri, p.id), p)
|
||||
|
|
@ -167,7 +167,7 @@ abstract class TestBuild {
|
|||
val root = projects.head
|
||||
val projectMap = mapBy(projects)(_.id)
|
||||
}
|
||||
final case class Proj(
|
||||
case class Proj(
|
||||
id: String,
|
||||
delegates: Seq[ProjectRef],
|
||||
configurations: Seq[Configuration]
|
||||
|
|
@ -178,7 +178,7 @@ abstract class TestBuild {
|
|||
val confMap = mapBy(configurations)(_.name)
|
||||
}
|
||||
|
||||
final case class Taskk(key: AttributeKey[String], delegates: Seq[Taskk]) {
|
||||
case class Taskk(key: AttributeKey[String], delegates: Seq[Taskk]) {
|
||||
override def toString =
|
||||
key.label + " (delegates: " + delegates.map(_.key.label).mkString(", ") + ")"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,25 +25,14 @@ object Util {
|
|||
)
|
||||
|
||||
lazy val baseScalacOptions = Seq(
|
||||
scalacOptions ++= Seq("-Xelide-below", "0"),
|
||||
scalacOptions ++= Seq(
|
||||
"-encoding",
|
||||
"utf8",
|
||||
"-deprecation",
|
||||
"-feature",
|
||||
"-unchecked",
|
||||
"-Xlint",
|
||||
"-Xelide-below",
|
||||
"0",
|
||||
"-language:existentials",
|
||||
"-language:higherKinds",
|
||||
"-language:implicitConversions",
|
||||
"-language:postfixOps",
|
||||
"-Xfuture",
|
||||
"-Yno-adapted-args",
|
||||
"-Ywarn-dead-code",
|
||||
"-Ywarn-numeric-widen",
|
||||
"-Ywarn-unused:-patvars,-implicits,_",
|
||||
"-Ywarn-unused-import"
|
||||
)
|
||||
),
|
||||
Compile / doc / scalacOptions -= "-Xlint",
|
||||
Compile / doc / scalacOptions -= "-Xfatal-warnings",
|
||||
)
|
||||
|
||||
def projectComponent: Setting[_] =
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
scalaVersion := "2.12.6"
|
||||
scalacOptions ++= Seq("-feature", "-language:postfixOps")
|
||||
|
||||
addSbtPlugin("org.scala-sbt" % "sbt-houserules" % "0.3.7")
|
||||
addSbtPlugin("org.scala-sbt" % "sbt-contraband" % "0.4.0")
|
||||
addSbtPlugin("org.scala-sbt" % "sbt-houserules" % "0.3.8")
|
||||
addSbtPlugin("org.scala-sbt" % "sbt-contraband" % "0.4.1")
|
||||
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "3.0.2")
|
||||
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.8.0")
|
||||
addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.15")
|
||||
|
|
|
|||
|
|
@ -7,23 +7,19 @@ package sbt.internal.langserver
|
|||
/**
|
||||
* Represents a diagnostic, such as a compiler error or warning.
|
||||
* Diagnostic objects are only valid in the scope of a resource.
|
||||
* @param range The range at which the message applies.
|
||||
* @param severity The diagnostic's severity. Can be omitted. If omitted it is up to the
|
||||
client to interpret diagnostics as error, warning, info or hint.
|
||||
* @param code The diagnostic's code. Can be omitted.
|
||||
* @param source A human-readable string describing the source of this
|
||||
diagnostic, e.g. 'typescript' or 'super lint'.
|
||||
* @param message The diagnostic's message.
|
||||
*/
|
||||
final class Diagnostic private (
|
||||
/** The range at which the message applies. */
|
||||
val range: sbt.internal.langserver.Range,
|
||||
/**
|
||||
* The diagnostic's severity. Can be omitted. If omitted it is up to the
|
||||
* client to interpret diagnostics as error, warning, info or hint.
|
||||
*/
|
||||
val severity: Option[Long],
|
||||
/** The diagnostic's code. Can be omitted. */
|
||||
val code: Option[String],
|
||||
/**
|
||||
* A human-readable string describing the source of this
|
||||
* diagnostic, e.g. 'typescript' or 'super lint'.
|
||||
*/
|
||||
val source: Option[String],
|
||||
/** The diagnostic's message. */
|
||||
val message: String) extends Serializable {
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
// DO NOT EDIT MANUALLY
|
||||
package sbt.internal.langserver
|
||||
/** @param rootPath The rootPath of the workspace. */
|
||||
final class InitializeParams private (
|
||||
val processId: Option[Long],
|
||||
/** The rootPath of the workspace. */
|
||||
val rootPath: Option[String],
|
||||
val rootUri: Option[String],
|
||||
val initializationOptions: Option[sjsonnew.shaded.scalajson.ast.unsafe.JValue],
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
// DO NOT EDIT MANUALLY
|
||||
package sbt.internal.langserver
|
||||
/** @param capabilities The capabilities the language server provides. */
|
||||
final class InitializeResult private (
|
||||
/** The capabilities the language server provides. */
|
||||
val capabilities: sbt.internal.langserver.ServerCapabilities) extends Serializable {
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,10 +4,12 @@
|
|||
|
||||
// DO NOT EDIT MANUALLY
|
||||
package sbt.internal.langserver
|
||||
/**
|
||||
* @param type The message type.
|
||||
* @param message The actual message
|
||||
*/
|
||||
final class LogMessageParams private (
|
||||
/** The message type. */
|
||||
val `type`: Long,
|
||||
/** The actual message */
|
||||
val message: String) extends Serializable {
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@ package sbt.internal.langserver
|
|||
/**
|
||||
* Position in a text document expressed as zero-based line and zero-based character offset.
|
||||
* A position is between two characters like an 'insert' cursor in a editor.
|
||||
* @param line Line position in a document (zero-based).
|
||||
* @param character Character offset on a line in a document (zero-based).
|
||||
*/
|
||||
final class Position private (
|
||||
/** Line position in a document (zero-based). */
|
||||
val line: Long,
|
||||
/** Character offset on a line in a document (zero-based). */
|
||||
val character: Long) extends Serializable {
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,11 +4,13 @@
|
|||
|
||||
// DO NOT EDIT MANUALLY
|
||||
package sbt.internal.langserver
|
||||
/** Diagnostics notification are sent from the server to the client to signal results of validation runs. */
|
||||
/**
|
||||
* Diagnostics notification are sent from the server to the client to signal results of validation runs.
|
||||
* @param uri The URI for which diagnostic information is reported.
|
||||
* @param diagnostics An array of diagnostic information items.
|
||||
*/
|
||||
final class PublishDiagnosticsParams private (
|
||||
/** The URI for which diagnostic information is reported. */
|
||||
val uri: String,
|
||||
/** An array of diagnostic information items. */
|
||||
val diagnostics: Vector[sbt.internal.langserver.Diagnostic]) extends Serializable {
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@ package sbt.internal.langserver
|
|||
/**
|
||||
* A range in a text document expressed as (zero-based) start and end positions. A range is comparable to a selection in an editor.
|
||||
* Therefore the end position is exclusive.
|
||||
* @param start The range's start position.
|
||||
* @param end The range's end position.
|
||||
*/
|
||||
final class Range private (
|
||||
/** The range's start position. */
|
||||
val start: sbt.internal.langserver.Position,
|
||||
/** The range's end position. */
|
||||
val end: sbt.internal.langserver.Position) extends Serializable {
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
// DO NOT EDIT MANUALLY
|
||||
package sbt.internal.langserver
|
||||
/** @param includeText The client is supposed to include the content on save. */
|
||||
final class SaveOptions private (
|
||||
/** The client is supposed to include the content on save. */
|
||||
val includeText: Option[Boolean]) extends Serializable {
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,11 +4,13 @@
|
|||
|
||||
// DO NOT EDIT MANUALLY
|
||||
package sbt.internal.langserver
|
||||
/**
|
||||
* @param hoverProvider The server provides hover support.
|
||||
* @param definitionProvider Goto definition
|
||||
*/
|
||||
final class ServerCapabilities private (
|
||||
val textDocumentSync: Option[sbt.internal.langserver.TextDocumentSyncOptions],
|
||||
/** The server provides hover support. */
|
||||
val hoverProvider: Option[Boolean],
|
||||
/** Goto definition */
|
||||
val definitionProvider: Option[Boolean]) extends Serializable {
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,11 @@
|
|||
|
||||
// DO NOT EDIT MANUALLY
|
||||
package sbt.internal.langserver
|
||||
/** Text documents are identified using a URI. On the protocol level, URIs are passed as strings. */
|
||||
/**
|
||||
* Text documents are identified using a URI. On the protocol level, URIs are passed as strings.
|
||||
* @param uri The text document's URI.
|
||||
*/
|
||||
final class TextDocumentIdentifier private (
|
||||
/** The text document's URI. */
|
||||
val uri: String) extends Serializable {
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,11 +4,13 @@
|
|||
|
||||
// DO NOT EDIT MANUALLY
|
||||
package sbt.internal.langserver
|
||||
/** Goto definition params model */
|
||||
/**
|
||||
* Goto definition params model
|
||||
* @param textDocument The text document.
|
||||
* @param position The position inside the text document.
|
||||
*/
|
||||
final class TextDocumentPositionParams private (
|
||||
/** The text document. */
|
||||
val textDocument: sbt.internal.langserver.TextDocumentIdentifier,
|
||||
/** The position inside the text document. */
|
||||
val position: sbt.internal.langserver.Position) extends Serializable {
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,11 +4,13 @@
|
|||
|
||||
// DO NOT EDIT MANUALLY
|
||||
package sbt.internal.protocol
|
||||
/**
|
||||
* @param method The method to be invoked.
|
||||
* @param params The method's params.
|
||||
*/
|
||||
final class JsonRpcNotificationMessage private (
|
||||
jsonrpc: String,
|
||||
/** The method to be invoked. */
|
||||
val method: String,
|
||||
/** The method's params. */
|
||||
val params: Option[sjsonnew.shaded.scalajson.ast.unsafe.JValue]) extends sbt.internal.protocol.JsonRpcMessage(jsonrpc) with Serializable {
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,13 +4,15 @@
|
|||
|
||||
// DO NOT EDIT MANUALLY
|
||||
package sbt.internal.protocol
|
||||
/**
|
||||
* @param id The request id.
|
||||
* @param method The method to be invoked.
|
||||
* @param params The method's params.
|
||||
*/
|
||||
final class JsonRpcRequestMessage private (
|
||||
jsonrpc: String,
|
||||
/** The request id. */
|
||||
val id: String,
|
||||
/** The method to be invoked. */
|
||||
val method: String,
|
||||
/** The method's params. */
|
||||
val params: Option[sjsonnew.shaded.scalajson.ast.unsafe.JValue]) extends sbt.internal.protocol.JsonRpcMessage(jsonrpc) with Serializable {
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,15 +4,15 @@
|
|||
|
||||
// DO NOT EDIT MANUALLY
|
||||
package sbt.internal.protocol
|
||||
/**
|
||||
* @param code A number indicating the error type that occurred.
|
||||
* @param message A string providing a short description of the error.
|
||||
* @param data A Primitive or Structured value that contains additional
|
||||
information about the error. Can be omitted.
|
||||
*/
|
||||
final class JsonRpcResponseError private (
|
||||
/** A number indicating the error type that occurred. */
|
||||
val code: Long,
|
||||
/** A string providing a short description of the error. */
|
||||
val message: String,
|
||||
/**
|
||||
* A Primitive or Structured value that contains additional
|
||||
* information about the error. Can be omitted.
|
||||
*/
|
||||
val data: Option[sjsonnew.shaded.scalajson.ast.unsafe.JValue]) extends Serializable {
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,16 +4,16 @@
|
|||
|
||||
// DO NOT EDIT MANUALLY
|
||||
package sbt.internal.protocol
|
||||
/**
|
||||
* @param id The request id.
|
||||
* @param result The result of a request. This can be omitted in
|
||||
the case of an error.
|
||||
* @param error The error object in case a request fails.
|
||||
*/
|
||||
final class JsonRpcResponseMessage private (
|
||||
jsonrpc: String,
|
||||
/** The request id. */
|
||||
val id: Option[String],
|
||||
/**
|
||||
* The result of a request. This can be omitted in
|
||||
* the case of an error.
|
||||
*/
|
||||
val result: Option[sjsonnew.shaded.scalajson.ast.unsafe.JValue],
|
||||
/** The error object in case a request fails. */
|
||||
val error: Option[sbt.internal.protocol.JsonRpcResponseError]) extends sbt.internal.protocol.JsonRpcMessage(jsonrpc) with Serializable {
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ package sbt.internal.protocol
|
|||
/**
|
||||
* This file should exist throughout the lifetime of the server.
|
||||
* It can be used to find out the transport protocol (port number etc).
|
||||
* @param uri URI of the sbt server.
|
||||
*/
|
||||
final class PortFile private (
|
||||
/** URI of the sbt server. */
|
||||
val uri: String,
|
||||
val tokenfilePath: Option[String],
|
||||
val tokenfileUri: Option[String]) extends Serializable {
|
||||
|
|
|
|||
|
|
@ -4,31 +4,27 @@
|
|||
|
||||
// DO NOT EDIT MANUALLY
|
||||
package sbt
|
||||
/** Configures forking. */
|
||||
/**
|
||||
* Configures forking.
|
||||
* @param javaHome The Java installation to use. If not defined, the Java home for the current process is used.
|
||||
* @param outputStrategy Configures the forked standard output and error streams.
|
||||
If not defined, StdoutOutput is used, which maps the forked output to the output of
|
||||
this process and the forked error to the error stream of the forking process.
|
||||
* @param bootJars The Vector of jars to put on the forked boot classpath. By default, this is empty.
|
||||
* @param workingDirectory The directory to use as the working directory for the forked process.
|
||||
By default, this is the working directory of the forking process.
|
||||
* @param runJVMOptions The options to prepend to all user-specified arguments. By default, this is empty.
|
||||
* @param connectInput If true, the standard input of the forked process is connected to the standard input of this process. Otherwise, it is connected to an empty input stream.
|
||||
Connecting input streams can be problematic, especially on versions before Java 7.
|
||||
* @param envVars The environment variables to provide to the forked process. By default, none are provided.
|
||||
*/
|
||||
final class ForkOptions private (
|
||||
/** The Java installation to use. If not defined, the Java home for the current process is used. */
|
||||
val javaHome: Option[java.io.File],
|
||||
/**
|
||||
* Configures the forked standard output and error streams.
|
||||
* If not defined, StdoutOutput is used, which maps the forked output to the output of
|
||||
* this process and the forked error to the error stream of the forking process.
|
||||
*/
|
||||
val outputStrategy: Option[sbt.OutputStrategy],
|
||||
/** The Vector of jars to put on the forked boot classpath. By default, this is empty. */
|
||||
val bootJars: Vector[java.io.File],
|
||||
/**
|
||||
* The directory to use as the working directory for the forked process.
|
||||
* By default, this is the working directory of the forking process.
|
||||
*/
|
||||
val workingDirectory: Option[java.io.File],
|
||||
/** The options to prepend to all user-specified arguments. By default, this is empty. */
|
||||
val runJVMOptions: Vector[String],
|
||||
/**
|
||||
* If true, the standard input of the forked process is connected to the standard input of this process. Otherwise, it is connected to an empty input stream.
|
||||
* Connecting input streams can be problematic, especially on versions before Java 7.
|
||||
*/
|
||||
val connectInput: Boolean,
|
||||
/** The environment variables to provide to the forked process. By default, none are provided. */
|
||||
val envVars: scala.collection.immutable.Map[String, String]) extends Serializable {
|
||||
|
||||
private def this() = this(None, None, Vector(), None, Vector(), false, Map())
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ object RunFromSourceMain {
|
|||
def globalLock = noGlobalLock
|
||||
def bootDirectory = RunFromSourceMain.bootDirectory
|
||||
def ivyHome = file(sys.props("user.home")) / ".ivy2"
|
||||
final case class PredefRepo(id: Predefined) extends PredefinedRepository
|
||||
case class PredefRepo(id: Predefined) extends PredefinedRepository
|
||||
import Predefined._
|
||||
def ivyRepositories = Array(PredefRepo(Local), PredefRepo(MavenCentral))
|
||||
def appRepositories = Array(PredefRepo(Local), PredefRepo(MavenCentral))
|
||||
|
|
|
|||
|
|
@ -8,3 +8,4 @@
|
|||
package sbt
|
||||
|
||||
// ScriptedPlugin has moved to main.
|
||||
private[sbt] object ScriptedPluginNote
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ object ConcurrentRestrictions {
|
|||
warn: String => Unit
|
||||
): CompletionService[A, R] = {
|
||||
|
||||
/** Represents submitted work for a task.*/
|
||||
// Represents submitted work for a task.
|
||||
final class Enqueue(val node: A, val work: () => R)
|
||||
|
||||
new CompletionService[A, R] {
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ private[sbt] final class Execute[A[_] <: AnyRef](
|
|||
node,
|
||||
deps,
|
||||
active.toList
|
||||
/** active is mutable, so take a snapshot */
|
||||
/* active is mutable, so take a snapshot */
|
||||
)
|
||||
|
||||
if (active.isEmpty)
|
||||
|
|
|
|||
|
|
@ -4,19 +4,17 @@
|
|||
|
||||
// DO NOT EDIT MANUALLY
|
||||
package sbt.protocol.testing
|
||||
/** Mini version of sbt.testing.Event */
|
||||
/**
|
||||
* Mini version of sbt.testing.Event
|
||||
* @param fullyQualifiedName The fully qualified name of a class that can rerun the suite or test
|
||||
about which an event was fired.
|
||||
* @param status Indicates whether the event represents a test success, failure, error, skipped, ignored, canceled, pending.
|
||||
* @param duration An amount of time, in milliseconds, that was required to complete the action reported by this event.
|
||||
None, if no duration was available.
|
||||
*/
|
||||
final class TestItemDetail private (
|
||||
/**
|
||||
* The fully qualified name of a class that can rerun the suite or test
|
||||
* about which an event was fired.
|
||||
*/
|
||||
val fullyQualifiedName: String,
|
||||
/** Indicates whether the event represents a test success, failure, error, skipped, ignored, canceled, pending. */
|
||||
val status: sbt.testing.Status,
|
||||
/**
|
||||
* An amount of time, in milliseconds, that was required to complete the action reported by this event.
|
||||
* None, if no duration was available.
|
||||
*/
|
||||
val duration: Option[Long]) extends Serializable {
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ class JUnitXmlTestsListener(val outputDir: String, logger: Logger) extends Tests
|
|||
|
||||
val (errors, failures, tests) = (count(TStatus.Error), count(TStatus.Failure), events.size)
|
||||
|
||||
/** Junit XML reports don't differentiate between ignored, skipped or pending tests */
|
||||
// Junit XML reports don't differentiate between ignored, skipped or pending tests
|
||||
val ignoredSkippedPending = count(TStatus.Ignored) + count(TStatus.Skipped) + count(
|
||||
TStatus.Pending
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue