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,
|
baseSettings,
|
||||||
name := "Testing",
|
name := "Testing",
|
||||||
libraryDependencies ++= Seq(testInterface, launcherInterface, sjsonNewScalaJson.value),
|
libraryDependencies ++= Seq(testInterface, launcherInterface, sjsonNewScalaJson.value),
|
||||||
|
Compile / scalacOptions += "-Ywarn-unused:-locals,-explicits,-privates",
|
||||||
managedSourceDirectories in Compile +=
|
managedSourceDirectories in Compile +=
|
||||||
baseDirectory.value / "src" / "main" / "contraband-scala",
|
baseDirectory.value / "src" / "main" / "contraband-scala",
|
||||||
sourceManaged in (Compile, generateContrabands) := 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(
|
.settings(
|
||||||
testedBaseSettings,
|
testedBaseSettings,
|
||||||
name := "Run",
|
name := "Run",
|
||||||
|
Compile / scalacOptions += "-Ywarn-unused:-locals,-explicits,-privates",
|
||||||
managedSourceDirectories in Compile +=
|
managedSourceDirectories in Compile +=
|
||||||
baseDirectory.value / "src" / "main" / "contraband-scala",
|
baseDirectory.value / "src" / "main" / "contraband-scala",
|
||||||
sourceManaged in (Compile, generateContrabands) := 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)
|
.dependsOn(collectionProj)
|
||||||
.settings(
|
.settings(
|
||||||
testedBaseSettings,
|
testedBaseSettings,
|
||||||
scalacOptions -= "-Ywarn-unused",
|
|
||||||
scalacOptions += "-Xlint:-unused",
|
|
||||||
name := "Protocol",
|
name := "Protocol",
|
||||||
libraryDependencies ++= Seq(sjsonNewScalaJson.value, ipcSocket),
|
libraryDependencies ++= Seq(sjsonNewScalaJson.value, ipcSocket),
|
||||||
|
Compile / scalacOptions += "-Ywarn-unused:-locals,-explicits,-privates",
|
||||||
managedSourceDirectories in Compile +=
|
managedSourceDirectories in Compile +=
|
||||||
baseDirectory.value / "src" / "main" / "contraband-scala",
|
baseDirectory.value / "src" / "main" / "contraband-scala",
|
||||||
sourceManaged in (Compile, generateContrabands) := 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,
|
testedBaseSettings,
|
||||||
name := "Command",
|
name := "Command",
|
||||||
libraryDependencies ++= Seq(launcherInterface, sjsonNewScalaJson.value, templateResolverApi),
|
libraryDependencies ++= Seq(launcherInterface, sjsonNewScalaJson.value, templateResolverApi),
|
||||||
|
Compile / scalacOptions += "-Ywarn-unused:-locals,-explicits,-privates",
|
||||||
managedSourceDirectories in Compile +=
|
managedSourceDirectories in Compile +=
|
||||||
baseDirectory.value / "src" / "main" / "contraband-scala",
|
baseDirectory.value / "src" / "main" / "contraband-scala",
|
||||||
sourceManaged in (Compile, generateContrabands) := 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,
|
testedBaseSettings,
|
||||||
name := "Main",
|
name := "Main",
|
||||||
libraryDependencies ++= scalaXml.value ++ Seq(launcherInterface) ++ log4jDependencies ++ Seq(scalaCacheCaffeine),
|
libraryDependencies ++= scalaXml.value ++ Seq(launcherInterface) ++ log4jDependencies ++ Seq(scalaCacheCaffeine),
|
||||||
|
Compile / scalacOptions -= "-Xfatal-warnings",
|
||||||
managedSourceDirectories in Compile +=
|
managedSourceDirectories in Compile +=
|
||||||
baseDirectory.value / "src" / "main" / "contraband-scala",
|
baseDirectory.value / "src" / "main" / "contraband-scala",
|
||||||
sourceManaged in (Compile, generateContrabands) := 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`.
|
* 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]`.
|
* 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.
|
* 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
|
* 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.
|
* 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
|
* 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.
|
* TAB key in the console.
|
||||||
*/
|
*/
|
||||||
trait ExampleSource {
|
trait ExampleSource {
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ final case class Clauses(clauses: List[Clause]) {
|
||||||
/** When the `body` Formula succeeds, atoms in `head` are true. */
|
/** When the `body` Formula succeeds, atoms in `head` are true. */
|
||||||
final case class Clause(body: Formula, head: Set[Atom])
|
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 {
|
sealed abstract class Literal extends Formula {
|
||||||
|
|
||||||
/** The underlying (positive) atom. */
|
/** The underlying (positive) atom. */
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,7 @@ object Package {
|
||||||
val inputFiles = conf.sources.map(_._1).toSet
|
val inputFiles = conf.sources.map(_._1).toSet
|
||||||
val inputs = conf.sources :+: lastModified(inputFiles) :+: manifest :+: HNil
|
val inputs = conf.sources :+: lastModified(inputFiles) :+: manifest :+: HNil
|
||||||
cachedMakeJar(inputs)(() => exists(conf.jar))
|
cachedMakeJar(inputs)(() => exists(conf.jar))
|
||||||
|
()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -280,13 +280,13 @@ object Scoped {
|
||||||
final def set(app: Initialize[S], source: SourcePosition): Setting[S] =
|
final def set(app: Initialize[S], source: SourcePosition): Setting[S] =
|
||||||
setting(scopedKey, app, source)
|
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] =
|
final def get(settings: Settings[Scope]): Option[S] =
|
||||||
settings.get(scopedKey.scope, scopedKey.key)
|
settings.get(scopedKey.scope, scopedKey.key)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an [[Def.Initialize]] with value [[scala.None]] if there was no previous definition of this 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
|
* 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.
|
* one setting in order to define another setting.
|
||||||
* @return currently bound value wrapped in `Initialize[Some[T]]`, or `Initialize[None]` if unbound.
|
* @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)
|
val finalReport = transform(report)
|
||||||
|
|
||||||
// Warn of any eviction and compatibility warnings
|
// 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.lines.foreach(log.warn(_))
|
||||||
ew.infoAllTheThings.foreach(log.info(_))
|
ew.infoAllTheThings.foreach(log.info(_))
|
||||||
CompatibilityWarning.run(compatWarning, module, mavenStyle, log)
|
CompatibilityWarning.run(compatWarning, module, mavenStyle, log)
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ abstract class TestBuild {
|
||||||
implicit val tGen = Arbitrary { genTasks(lowerIDGen, MaxDepsGen, MaxTasksGen) }
|
implicit val tGen = Arbitrary { genTasks(lowerIDGen, MaxDepsGen, MaxTasksGen) }
|
||||||
val seed = rng.Seed.random
|
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", "")
|
override def toString = env + "\n" + scopes.mkString("Scopes:\n\t", "\n\t", "")
|
||||||
lazy val delegated = scopes map env.delegates
|
lazy val delegated = scopes map env.delegates
|
||||||
}
|
}
|
||||||
|
|
@ -119,7 +119,7 @@ abstract class TestBuild {
|
||||||
(taskAxes, zero.toSet, single.toSet, multi.toSet)
|
(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 =
|
override def toString =
|
||||||
"Env:\n " + " Tasks:\n " + tasks.mkString("\n ") + "\n" + builds.mkString("\n ")
|
"Env:\n " + " Tasks:\n " + tasks.mkString("\n ") + "\n" + builds.mkString("\n ")
|
||||||
val root = builds.head
|
val root = builds.head
|
||||||
|
|
@ -159,7 +159,7 @@ abstract class TestBuild {
|
||||||
}
|
}
|
||||||
def getKey: Taskk => AttributeKey[_] = _.key
|
def getKey: Taskk => AttributeKey[_] = _.key
|
||||||
def toConfigKey: Configuration => ConfigKey = c => ConfigKey(c.name)
|
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 ")
|
override def toString = "Build " + uri.toString + " :\n " + projects.mkString("\n ")
|
||||||
val allProjects = projects map { p =>
|
val allProjects = projects map { p =>
|
||||||
(ProjectRef(uri, p.id), p)
|
(ProjectRef(uri, p.id), p)
|
||||||
|
|
@ -167,7 +167,7 @@ abstract class TestBuild {
|
||||||
val root = projects.head
|
val root = projects.head
|
||||||
val projectMap = mapBy(projects)(_.id)
|
val projectMap = mapBy(projects)(_.id)
|
||||||
}
|
}
|
||||||
final case class Proj(
|
case class Proj(
|
||||||
id: String,
|
id: String,
|
||||||
delegates: Seq[ProjectRef],
|
delegates: Seq[ProjectRef],
|
||||||
configurations: Seq[Configuration]
|
configurations: Seq[Configuration]
|
||||||
|
|
@ -178,7 +178,7 @@ abstract class TestBuild {
|
||||||
val confMap = mapBy(configurations)(_.name)
|
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 =
|
override def toString =
|
||||||
key.label + " (delegates: " + delegates.map(_.key.label).mkString(", ") + ")"
|
key.label + " (delegates: " + delegates.map(_.key.label).mkString(", ") + ")"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,25 +25,14 @@ object Util {
|
||||||
)
|
)
|
||||||
|
|
||||||
lazy val baseScalacOptions = Seq(
|
lazy val baseScalacOptions = Seq(
|
||||||
scalacOptions ++= Seq("-Xelide-below", "0"),
|
|
||||||
scalacOptions ++= Seq(
|
scalacOptions ++= Seq(
|
||||||
"-encoding",
|
"-Xelide-below",
|
||||||
"utf8",
|
"0",
|
||||||
"-deprecation",
|
|
||||||
"-feature",
|
|
||||||
"-unchecked",
|
|
||||||
"-Xlint",
|
|
||||||
"-language:existentials",
|
"-language:existentials",
|
||||||
"-language:higherKinds",
|
|
||||||
"-language:implicitConversions",
|
|
||||||
"-language:postfixOps",
|
"-language:postfixOps",
|
||||||
"-Xfuture",
|
),
|
||||||
"-Yno-adapted-args",
|
Compile / doc / scalacOptions -= "-Xlint",
|
||||||
"-Ywarn-dead-code",
|
Compile / doc / scalacOptions -= "-Xfatal-warnings",
|
||||||
"-Ywarn-numeric-widen",
|
|
||||||
"-Ywarn-unused:-patvars,-implicits,_",
|
|
||||||
"-Ywarn-unused-import"
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def projectComponent: Setting[_] =
|
def projectComponent: Setting[_] =
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
scalaVersion := "2.12.6"
|
scalaVersion := "2.12.6"
|
||||||
scalacOptions ++= Seq("-feature", "-language:postfixOps")
|
scalacOptions ++= Seq("-feature", "-language:postfixOps")
|
||||||
|
|
||||||
addSbtPlugin("org.scala-sbt" % "sbt-houserules" % "0.3.7")
|
addSbtPlugin("org.scala-sbt" % "sbt-houserules" % "0.3.8")
|
||||||
addSbtPlugin("org.scala-sbt" % "sbt-contraband" % "0.4.0")
|
addSbtPlugin("org.scala-sbt" % "sbt-contraband" % "0.4.1")
|
||||||
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "3.0.2")
|
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "3.0.2")
|
||||||
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.8.0")
|
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.8.0")
|
||||||
addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.15")
|
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.
|
* Represents a diagnostic, such as a compiler error or warning.
|
||||||
* Diagnostic objects are only valid in the scope of a resource.
|
* 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 (
|
final class Diagnostic private (
|
||||||
/** The range at which the message applies. */
|
|
||||||
val range: sbt.internal.langserver.Range,
|
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],
|
val severity: Option[Long],
|
||||||
/** The diagnostic's code. Can be omitted. */
|
|
||||||
val code: Option[String],
|
val code: Option[String],
|
||||||
/**
|
|
||||||
* A human-readable string describing the source of this
|
|
||||||
* diagnostic, e.g. 'typescript' or 'super lint'.
|
|
||||||
*/
|
|
||||||
val source: Option[String],
|
val source: Option[String],
|
||||||
/** The diagnostic's message. */
|
|
||||||
val message: String) extends Serializable {
|
val message: String) extends Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@
|
||||||
|
|
||||||
// DO NOT EDIT MANUALLY
|
// DO NOT EDIT MANUALLY
|
||||||
package sbt.internal.langserver
|
package sbt.internal.langserver
|
||||||
|
/** @param rootPath The rootPath of the workspace. */
|
||||||
final class InitializeParams private (
|
final class InitializeParams private (
|
||||||
val processId: Option[Long],
|
val processId: Option[Long],
|
||||||
/** The rootPath of the workspace. */
|
|
||||||
val rootPath: Option[String],
|
val rootPath: Option[String],
|
||||||
val rootUri: Option[String],
|
val rootUri: Option[String],
|
||||||
val initializationOptions: Option[sjsonnew.shaded.scalajson.ast.unsafe.JValue],
|
val initializationOptions: Option[sjsonnew.shaded.scalajson.ast.unsafe.JValue],
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
// DO NOT EDIT MANUALLY
|
// DO NOT EDIT MANUALLY
|
||||||
package sbt.internal.langserver
|
package sbt.internal.langserver
|
||||||
|
/** @param capabilities The capabilities the language server provides. */
|
||||||
final class InitializeResult private (
|
final class InitializeResult private (
|
||||||
/** The capabilities the language server provides. */
|
|
||||||
val capabilities: sbt.internal.langserver.ServerCapabilities) extends Serializable {
|
val capabilities: sbt.internal.langserver.ServerCapabilities) extends Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,12 @@
|
||||||
|
|
||||||
// DO NOT EDIT MANUALLY
|
// DO NOT EDIT MANUALLY
|
||||||
package sbt.internal.langserver
|
package sbt.internal.langserver
|
||||||
|
/**
|
||||||
|
* @param type The message type.
|
||||||
|
* @param message The actual message
|
||||||
|
*/
|
||||||
final class LogMessageParams private (
|
final class LogMessageParams private (
|
||||||
/** The message type. */
|
|
||||||
val `type`: Long,
|
val `type`: Long,
|
||||||
/** The actual message */
|
|
||||||
val message: String) extends Serializable {
|
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.
|
* 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.
|
* 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 (
|
final class Position private (
|
||||||
/** Line position in a document (zero-based). */
|
|
||||||
val line: Long,
|
val line: Long,
|
||||||
/** Character offset on a line in a document (zero-based). */
|
|
||||||
val character: Long) extends Serializable {
|
val character: Long) extends Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,13 @@
|
||||||
|
|
||||||
// DO NOT EDIT MANUALLY
|
// DO NOT EDIT MANUALLY
|
||||||
package sbt.internal.langserver
|
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 (
|
final class PublishDiagnosticsParams private (
|
||||||
/** The URI for which diagnostic information is reported. */
|
|
||||||
val uri: String,
|
val uri: String,
|
||||||
/** An array of diagnostic information items. */
|
|
||||||
val diagnostics: Vector[sbt.internal.langserver.Diagnostic]) extends Serializable {
|
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.
|
* 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.
|
* Therefore the end position is exclusive.
|
||||||
|
* @param start The range's start position.
|
||||||
|
* @param end The range's end position.
|
||||||
*/
|
*/
|
||||||
final class Range private (
|
final class Range private (
|
||||||
/** The range's start position. */
|
|
||||||
val start: sbt.internal.langserver.Position,
|
val start: sbt.internal.langserver.Position,
|
||||||
/** The range's end position. */
|
|
||||||
val end: sbt.internal.langserver.Position) extends Serializable {
|
val end: sbt.internal.langserver.Position) extends Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
// DO NOT EDIT MANUALLY
|
// DO NOT EDIT MANUALLY
|
||||||
package sbt.internal.langserver
|
package sbt.internal.langserver
|
||||||
|
/** @param includeText The client is supposed to include the content on save. */
|
||||||
final class SaveOptions private (
|
final class SaveOptions private (
|
||||||
/** The client is supposed to include the content on save. */
|
|
||||||
val includeText: Option[Boolean]) extends Serializable {
|
val includeText: Option[Boolean]) extends Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,13 @@
|
||||||
|
|
||||||
// DO NOT EDIT MANUALLY
|
// DO NOT EDIT MANUALLY
|
||||||
package sbt.internal.langserver
|
package sbt.internal.langserver
|
||||||
|
/**
|
||||||
|
* @param hoverProvider The server provides hover support.
|
||||||
|
* @param definitionProvider Goto definition
|
||||||
|
*/
|
||||||
final class ServerCapabilities private (
|
final class ServerCapabilities private (
|
||||||
val textDocumentSync: Option[sbt.internal.langserver.TextDocumentSyncOptions],
|
val textDocumentSync: Option[sbt.internal.langserver.TextDocumentSyncOptions],
|
||||||
/** The server provides hover support. */
|
|
||||||
val hoverProvider: Option[Boolean],
|
val hoverProvider: Option[Boolean],
|
||||||
/** Goto definition */
|
|
||||||
val definitionProvider: Option[Boolean]) extends Serializable {
|
val definitionProvider: Option[Boolean]) extends Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,11 @@
|
||||||
|
|
||||||
// DO NOT EDIT MANUALLY
|
// DO NOT EDIT MANUALLY
|
||||||
package sbt.internal.langserver
|
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 (
|
final class TextDocumentIdentifier private (
|
||||||
/** The text document's URI. */
|
|
||||||
val uri: String) extends Serializable {
|
val uri: String) extends Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,13 @@
|
||||||
|
|
||||||
// DO NOT EDIT MANUALLY
|
// DO NOT EDIT MANUALLY
|
||||||
package sbt.internal.langserver
|
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 (
|
final class TextDocumentPositionParams private (
|
||||||
/** The text document. */
|
|
||||||
val textDocument: sbt.internal.langserver.TextDocumentIdentifier,
|
val textDocument: sbt.internal.langserver.TextDocumentIdentifier,
|
||||||
/** The position inside the text document. */
|
|
||||||
val position: sbt.internal.langserver.Position) extends Serializable {
|
val position: sbt.internal.langserver.Position) extends Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,13 @@
|
||||||
|
|
||||||
// DO NOT EDIT MANUALLY
|
// DO NOT EDIT MANUALLY
|
||||||
package sbt.internal.protocol
|
package sbt.internal.protocol
|
||||||
|
/**
|
||||||
|
* @param method The method to be invoked.
|
||||||
|
* @param params The method's params.
|
||||||
|
*/
|
||||||
final class JsonRpcNotificationMessage private (
|
final class JsonRpcNotificationMessage private (
|
||||||
jsonrpc: String,
|
jsonrpc: String,
|
||||||
/** The method to be invoked. */
|
|
||||||
val method: String,
|
val method: String,
|
||||||
/** The method's params. */
|
|
||||||
val params: Option[sjsonnew.shaded.scalajson.ast.unsafe.JValue]) extends sbt.internal.protocol.JsonRpcMessage(jsonrpc) with Serializable {
|
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
|
// DO NOT EDIT MANUALLY
|
||||||
package sbt.internal.protocol
|
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 (
|
final class JsonRpcRequestMessage private (
|
||||||
jsonrpc: String,
|
jsonrpc: String,
|
||||||
/** The request id. */
|
|
||||||
val id: String,
|
val id: String,
|
||||||
/** The method to be invoked. */
|
|
||||||
val method: String,
|
val method: String,
|
||||||
/** The method's params. */
|
|
||||||
val params: Option[sjsonnew.shaded.scalajson.ast.unsafe.JValue]) extends sbt.internal.protocol.JsonRpcMessage(jsonrpc) with Serializable {
|
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
|
// DO NOT EDIT MANUALLY
|
||||||
package sbt.internal.protocol
|
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 (
|
final class JsonRpcResponseError private (
|
||||||
/** A number indicating the error type that occurred. */
|
|
||||||
val code: Long,
|
val code: Long,
|
||||||
/** A string providing a short description of the error. */
|
|
||||||
val message: String,
|
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 {
|
val data: Option[sjsonnew.shaded.scalajson.ast.unsafe.JValue]) extends Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,16 +4,16 @@
|
||||||
|
|
||||||
// DO NOT EDIT MANUALLY
|
// DO NOT EDIT MANUALLY
|
||||||
package sbt.internal.protocol
|
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 (
|
final class JsonRpcResponseMessage private (
|
||||||
jsonrpc: String,
|
jsonrpc: String,
|
||||||
/** The request id. */
|
|
||||||
val id: Option[String],
|
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],
|
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 {
|
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.
|
* This file should exist throughout the lifetime of the server.
|
||||||
* It can be used to find out the transport protocol (port number etc).
|
* It can be used to find out the transport protocol (port number etc).
|
||||||
|
* @param uri URI of the sbt server.
|
||||||
*/
|
*/
|
||||||
final class PortFile private (
|
final class PortFile private (
|
||||||
/** URI of the sbt server. */
|
|
||||||
val uri: String,
|
val uri: String,
|
||||||
val tokenfilePath: Option[String],
|
val tokenfilePath: Option[String],
|
||||||
val tokenfileUri: Option[String]) extends Serializable {
|
val tokenfileUri: Option[String]) extends Serializable {
|
||||||
|
|
|
||||||
|
|
@ -4,31 +4,27 @@
|
||||||
|
|
||||||
// DO NOT EDIT MANUALLY
|
// DO NOT EDIT MANUALLY
|
||||||
package sbt
|
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 (
|
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],
|
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],
|
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],
|
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],
|
val workingDirectory: Option[java.io.File],
|
||||||
/** The options to prepend to all user-specified arguments. By default, this is empty. */
|
|
||||||
val runJVMOptions: Vector[String],
|
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,
|
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 {
|
val envVars: scala.collection.immutable.Map[String, String]) extends Serializable {
|
||||||
|
|
||||||
private def this() = this(None, None, Vector(), None, Vector(), false, Map())
|
private def this() = this(None, None, Vector(), None, Vector(), false, Map())
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ object RunFromSourceMain {
|
||||||
def globalLock = noGlobalLock
|
def globalLock = noGlobalLock
|
||||||
def bootDirectory = RunFromSourceMain.bootDirectory
|
def bootDirectory = RunFromSourceMain.bootDirectory
|
||||||
def ivyHome = file(sys.props("user.home")) / ".ivy2"
|
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._
|
import Predefined._
|
||||||
def ivyRepositories = Array(PredefRepo(Local), PredefRepo(MavenCentral))
|
def ivyRepositories = Array(PredefRepo(Local), PredefRepo(MavenCentral))
|
||||||
def appRepositories = Array(PredefRepo(Local), PredefRepo(MavenCentral))
|
def appRepositories = Array(PredefRepo(Local), PredefRepo(MavenCentral))
|
||||||
|
|
|
||||||
|
|
@ -8,3 +8,4 @@
|
||||||
package sbt
|
package sbt
|
||||||
|
|
||||||
// ScriptedPlugin has moved to main.
|
// ScriptedPlugin has moved to main.
|
||||||
|
private[sbt] object ScriptedPluginNote
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ object ConcurrentRestrictions {
|
||||||
warn: String => Unit
|
warn: String => Unit
|
||||||
): CompletionService[A, R] = {
|
): CompletionService[A, R] = {
|
||||||
|
|
||||||
/** Represents submitted work for a task.*/
|
// Represents submitted work for a task.
|
||||||
final class Enqueue(val node: A, val work: () => R)
|
final class Enqueue(val node: A, val work: () => R)
|
||||||
|
|
||||||
new CompletionService[A, R] {
|
new CompletionService[A, R] {
|
||||||
|
|
|
||||||
|
|
@ -215,7 +215,7 @@ private[sbt] final class Execute[A[_] <: AnyRef](
|
||||||
node,
|
node,
|
||||||
deps,
|
deps,
|
||||||
active.toList
|
active.toList
|
||||||
/** active is mutable, so take a snapshot */
|
/* active is mutable, so take a snapshot */
|
||||||
)
|
)
|
||||||
|
|
||||||
if (active.isEmpty)
|
if (active.isEmpty)
|
||||||
|
|
|
||||||
|
|
@ -4,19 +4,17 @@
|
||||||
|
|
||||||
// DO NOT EDIT MANUALLY
|
// DO NOT EDIT MANUALLY
|
||||||
package sbt.protocol.testing
|
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 (
|
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,
|
val fullyQualifiedName: String,
|
||||||
/** Indicates whether the event represents a test success, failure, error, skipped, ignored, canceled, pending. */
|
|
||||||
val status: sbt.testing.Status,
|
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 {
|
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)
|
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(
|
val ignoredSkippedPending = count(TStatus.Ignored) + count(TStatus.Skipped) + count(
|
||||||
TStatus.Pending
|
TStatus.Pending
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue