From 4b23036c63d5e2b98cb246b7d3d66c1cfec979b0 Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Tue, 18 Sep 2018 16:56:19 -0400 Subject: [PATCH] contraband 0.4.1 --- project/plugins.sbt | 2 +- .../sbt/internal/langserver/Diagnostic.scala | 18 ++++------- .../langserver/InitializeParams.scala | 2 +- .../langserver/InitializeResult.scala | 2 +- .../langserver/LogMessageParams.scala | 6 ++-- .../sbt/internal/langserver/Position.scala | 4 +-- .../langserver/PublishDiagnosticsParams.scala | 8 +++-- .../sbt/internal/langserver/Range.scala | 4 +-- .../sbt/internal/langserver/SaveOptions.scala | 2 +- .../langserver/ServerCapabilities.scala | 6 ++-- .../langserver/TextDocumentIdentifier.scala | 6 ++-- .../TextDocumentPositionParams.scala | 8 +++-- .../protocol/JsonRpcNotificationMessage.scala | 6 ++-- .../protocol/JsonRpcRequestMessage.scala | 8 +++-- .../protocol/JsonRpcResponseError.scala | 12 +++---- .../protocol/JsonRpcResponseMessage.scala | 12 +++---- .../sbt/internal/protocol/PortFile.scala | 2 +- .../contraband-scala/sbt/ForkOptions.scala | 32 ++++++++----------- .../sbt/protocol/testing/TestItemDetail.scala | 18 +++++------ 19 files changed, 81 insertions(+), 77 deletions(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 3fcf701fe..d0a2e5f71 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -2,7 +2,7 @@ scalaVersion := "2.12.6" scalacOptions ++= Seq("-feature", "-language:postfixOps") 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("com.eed3si9n" % "sbt-buildinfo" % "0.8.0") addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.15") diff --git a/protocol/src/main/contraband-scala/sbt/internal/langserver/Diagnostic.scala b/protocol/src/main/contraband-scala/sbt/internal/langserver/Diagnostic.scala index 033fae3cf..fb5d9505a 100644 --- a/protocol/src/main/contraband-scala/sbt/internal/langserver/Diagnostic.scala +++ b/protocol/src/main/contraband-scala/sbt/internal/langserver/Diagnostic.scala @@ -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 { diff --git a/protocol/src/main/contraband-scala/sbt/internal/langserver/InitializeParams.scala b/protocol/src/main/contraband-scala/sbt/internal/langserver/InitializeParams.scala index 7c53991c0..2c8e5b790 100644 --- a/protocol/src/main/contraband-scala/sbt/internal/langserver/InitializeParams.scala +++ b/protocol/src/main/contraband-scala/sbt/internal/langserver/InitializeParams.scala @@ -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], diff --git a/protocol/src/main/contraband-scala/sbt/internal/langserver/InitializeResult.scala b/protocol/src/main/contraband-scala/sbt/internal/langserver/InitializeResult.scala index a7c797870..e901f03c3 100644 --- a/protocol/src/main/contraband-scala/sbt/internal/langserver/InitializeResult.scala +++ b/protocol/src/main/contraband-scala/sbt/internal/langserver/InitializeResult.scala @@ -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 { diff --git a/protocol/src/main/contraband-scala/sbt/internal/langserver/LogMessageParams.scala b/protocol/src/main/contraband-scala/sbt/internal/langserver/LogMessageParams.scala index 3755c84d0..a44361697 100644 --- a/protocol/src/main/contraband-scala/sbt/internal/langserver/LogMessageParams.scala +++ b/protocol/src/main/contraband-scala/sbt/internal/langserver/LogMessageParams.scala @@ -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 { diff --git a/protocol/src/main/contraband-scala/sbt/internal/langserver/Position.scala b/protocol/src/main/contraband-scala/sbt/internal/langserver/Position.scala index caf248768..5f07dfb02 100644 --- a/protocol/src/main/contraband-scala/sbt/internal/langserver/Position.scala +++ b/protocol/src/main/contraband-scala/sbt/internal/langserver/Position.scala @@ -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 { diff --git a/protocol/src/main/contraband-scala/sbt/internal/langserver/PublishDiagnosticsParams.scala b/protocol/src/main/contraband-scala/sbt/internal/langserver/PublishDiagnosticsParams.scala index 3c18fbbab..1645368f0 100644 --- a/protocol/src/main/contraband-scala/sbt/internal/langserver/PublishDiagnosticsParams.scala +++ b/protocol/src/main/contraband-scala/sbt/internal/langserver/PublishDiagnosticsParams.scala @@ -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 { diff --git a/protocol/src/main/contraband-scala/sbt/internal/langserver/Range.scala b/protocol/src/main/contraband-scala/sbt/internal/langserver/Range.scala index fab914ef5..99e580c02 100644 --- a/protocol/src/main/contraband-scala/sbt/internal/langserver/Range.scala +++ b/protocol/src/main/contraband-scala/sbt/internal/langserver/Range.scala @@ -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 { diff --git a/protocol/src/main/contraband-scala/sbt/internal/langserver/SaveOptions.scala b/protocol/src/main/contraband-scala/sbt/internal/langserver/SaveOptions.scala index 7f66646de..3e08ddd55 100644 --- a/protocol/src/main/contraband-scala/sbt/internal/langserver/SaveOptions.scala +++ b/protocol/src/main/contraband-scala/sbt/internal/langserver/SaveOptions.scala @@ -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 { diff --git a/protocol/src/main/contraband-scala/sbt/internal/langserver/ServerCapabilities.scala b/protocol/src/main/contraband-scala/sbt/internal/langserver/ServerCapabilities.scala index 4aa6c698d..ad74d85bc 100644 --- a/protocol/src/main/contraband-scala/sbt/internal/langserver/ServerCapabilities.scala +++ b/protocol/src/main/contraband-scala/sbt/internal/langserver/ServerCapabilities.scala @@ -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 { diff --git a/protocol/src/main/contraband-scala/sbt/internal/langserver/TextDocumentIdentifier.scala b/protocol/src/main/contraband-scala/sbt/internal/langserver/TextDocumentIdentifier.scala index dd5a2887f..087f5de2b 100644 --- a/protocol/src/main/contraband-scala/sbt/internal/langserver/TextDocumentIdentifier.scala +++ b/protocol/src/main/contraband-scala/sbt/internal/langserver/TextDocumentIdentifier.scala @@ -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 { diff --git a/protocol/src/main/contraband-scala/sbt/internal/langserver/TextDocumentPositionParams.scala b/protocol/src/main/contraband-scala/sbt/internal/langserver/TextDocumentPositionParams.scala index 10717f0fc..7b8b5ac53 100644 --- a/protocol/src/main/contraband-scala/sbt/internal/langserver/TextDocumentPositionParams.scala +++ b/protocol/src/main/contraband-scala/sbt/internal/langserver/TextDocumentPositionParams.scala @@ -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 { diff --git a/protocol/src/main/contraband-scala/sbt/internal/protocol/JsonRpcNotificationMessage.scala b/protocol/src/main/contraband-scala/sbt/internal/protocol/JsonRpcNotificationMessage.scala index b3edb6b9d..d71caa160 100644 --- a/protocol/src/main/contraband-scala/sbt/internal/protocol/JsonRpcNotificationMessage.scala +++ b/protocol/src/main/contraband-scala/sbt/internal/protocol/JsonRpcNotificationMessage.scala @@ -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 { diff --git a/protocol/src/main/contraband-scala/sbt/internal/protocol/JsonRpcRequestMessage.scala b/protocol/src/main/contraband-scala/sbt/internal/protocol/JsonRpcRequestMessage.scala index d40611379..7f872728e 100644 --- a/protocol/src/main/contraband-scala/sbt/internal/protocol/JsonRpcRequestMessage.scala +++ b/protocol/src/main/contraband-scala/sbt/internal/protocol/JsonRpcRequestMessage.scala @@ -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 { diff --git a/protocol/src/main/contraband-scala/sbt/internal/protocol/JsonRpcResponseError.scala b/protocol/src/main/contraband-scala/sbt/internal/protocol/JsonRpcResponseError.scala index 68541873e..41f939f61 100644 --- a/protocol/src/main/contraband-scala/sbt/internal/protocol/JsonRpcResponseError.scala +++ b/protocol/src/main/contraband-scala/sbt/internal/protocol/JsonRpcResponseError.scala @@ -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 { diff --git a/protocol/src/main/contraband-scala/sbt/internal/protocol/JsonRpcResponseMessage.scala b/protocol/src/main/contraband-scala/sbt/internal/protocol/JsonRpcResponseMessage.scala index b2d1596b4..79f10013a 100644 --- a/protocol/src/main/contraband-scala/sbt/internal/protocol/JsonRpcResponseMessage.scala +++ b/protocol/src/main/contraband-scala/sbt/internal/protocol/JsonRpcResponseMessage.scala @@ -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 { diff --git a/protocol/src/main/contraband-scala/sbt/internal/protocol/PortFile.scala b/protocol/src/main/contraband-scala/sbt/internal/protocol/PortFile.scala index 8354bc5b4..0798eb284 100644 --- a/protocol/src/main/contraband-scala/sbt/internal/protocol/PortFile.scala +++ b/protocol/src/main/contraband-scala/sbt/internal/protocol/PortFile.scala @@ -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 { diff --git a/run/src/main/contraband-scala/sbt/ForkOptions.scala b/run/src/main/contraband-scala/sbt/ForkOptions.scala index b8f30ab15..6c5784cb2 100644 --- a/run/src/main/contraband-scala/sbt/ForkOptions.scala +++ b/run/src/main/contraband-scala/sbt/ForkOptions.scala @@ -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()) diff --git a/testing/src/main/contraband-scala/sbt/protocol/testing/TestItemDetail.scala b/testing/src/main/contraband-scala/sbt/protocol/testing/TestItemDetail.scala index 904cdc258..2585091c3 100644 --- a/testing/src/main/contraband-scala/sbt/protocol/testing/TestItemDetail.scala +++ b/testing/src/main/contraband-scala/sbt/protocol/testing/TestItemDetail.scala @@ -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 {