mirror of
https://github.com/sbt/sbt.git
synced 2026-09-01 18:47:14 +02:00
-sbinary/+sjson-new, -datatype/+contraband & upgrades
* start to replace sbinary with sjson-new * upgrade from sbt/datatype to sbt/contraband * upgrade and migrate to new sbt modules APIs
This commit is contained in:
+4
-6
@@ -4,11 +4,11 @@
|
||||
|
||||
// DO NOT EDIT MANUALLY
|
||||
package sbt.internal.server
|
||||
final class CommandMessage(
|
||||
final class CommandMessage private (
|
||||
val `type`: String,
|
||||
val commandLine: Option[String]) extends Serializable {
|
||||
|
||||
def this(`type`: String) = this(`type`, None)
|
||||
private def this(`type`: String) = this(`type`, None)
|
||||
|
||||
override def equals(o: Any): Boolean = o match {
|
||||
case x: CommandMessage => (this.`type` == x.`type`) && (this.commandLine == x.commandLine)
|
||||
@@ -20,10 +20,7 @@ final class CommandMessage(
|
||||
override def toString: String = {
|
||||
"CommandMessage(" + `type` + ", " + commandLine + ")"
|
||||
}
|
||||
def copy(`type`: String): CommandMessage = {
|
||||
new CommandMessage(`type`, commandLine)
|
||||
}
|
||||
def copy(`type`: String = `type`, commandLine: Option[String] = commandLine): CommandMessage = {
|
||||
protected[this] def copy(`type`: String = `type`, commandLine: Option[String] = commandLine): CommandMessage = {
|
||||
new CommandMessage(`type`, commandLine)
|
||||
}
|
||||
def withType(`type`: String): CommandMessage = {
|
||||
@@ -34,6 +31,7 @@ final class CommandMessage(
|
||||
}
|
||||
}
|
||||
object CommandMessage {
|
||||
|
||||
def apply(`type`: String): CommandMessage = new CommandMessage(`type`, None)
|
||||
def apply(`type`: String, commandLine: Option[String]): CommandMessage = new CommandMessage(`type`, commandLine)
|
||||
}
|
||||
+7
-9
@@ -4,16 +4,16 @@
|
||||
|
||||
// DO NOT EDIT MANUALLY
|
||||
package sbt.internal.server
|
||||
final class EventMessage(
|
||||
final class EventMessage private (
|
||||
val `type`: String,
|
||||
val status: Option[String],
|
||||
val commandQueue: Vector[String],
|
||||
val commandQueue: scala.Vector[String],
|
||||
val level: Option[String],
|
||||
val message: Option[String],
|
||||
val success: Option[Boolean],
|
||||
val commandLine: Option[String]) extends Serializable {
|
||||
|
||||
def this(`type`: String) = this(`type`, None, Vector(), None, None, None, None)
|
||||
private def this(`type`: String) = this(`type`, None, Vector(), None, None, None, None)
|
||||
|
||||
override def equals(o: Any): Boolean = o match {
|
||||
case x: EventMessage => (this.`type` == x.`type`) && (this.status == x.status) && (this.commandQueue == x.commandQueue) && (this.level == x.level) && (this.message == x.message) && (this.success == x.success) && (this.commandLine == x.commandLine)
|
||||
@@ -25,10 +25,7 @@ final class EventMessage(
|
||||
override def toString: String = {
|
||||
"EventMessage(" + `type` + ", " + status + ", " + commandQueue + ", " + level + ", " + message + ", " + success + ", " + commandLine + ")"
|
||||
}
|
||||
def copy(`type`: String): EventMessage = {
|
||||
new EventMessage(`type`, status, commandQueue, level, message, success, commandLine)
|
||||
}
|
||||
def copy(`type`: String = `type`, status: Option[String] = status, commandQueue: Vector[String] = commandQueue, level: Option[String] = level, message: Option[String] = message, success: Option[Boolean] = success, commandLine: Option[String] = commandLine): EventMessage = {
|
||||
protected[this] def copy(`type`: String = `type`, status: Option[String] = status, commandQueue: scala.Vector[String] = commandQueue, level: Option[String] = level, message: Option[String] = message, success: Option[Boolean] = success, commandLine: Option[String] = commandLine): EventMessage = {
|
||||
new EventMessage(`type`, status, commandQueue, level, message, success, commandLine)
|
||||
}
|
||||
def withType(`type`: String): EventMessage = {
|
||||
@@ -37,7 +34,7 @@ final class EventMessage(
|
||||
def withStatus(status: Option[String]): EventMessage = {
|
||||
copy(status = status)
|
||||
}
|
||||
def withCommandQueue(commandQueue: Vector[String]): EventMessage = {
|
||||
def withCommandQueue(commandQueue: scala.Vector[String]): EventMessage = {
|
||||
copy(commandQueue = commandQueue)
|
||||
}
|
||||
def withLevel(level: Option[String]): EventMessage = {
|
||||
@@ -54,6 +51,7 @@ final class EventMessage(
|
||||
}
|
||||
}
|
||||
object EventMessage {
|
||||
|
||||
def apply(`type`: String): EventMessage = new EventMessage(`type`, None, Vector(), None, None, None, None)
|
||||
def apply(`type`: String, status: Option[String], commandQueue: Vector[String], level: Option[String], message: Option[String], success: Option[Boolean], commandLine: Option[String]): EventMessage = new EventMessage(`type`, status, commandQueue, level, message, success, commandLine)
|
||||
def apply(`type`: String, status: Option[String], commandQueue: scala.Vector[String], level: Option[String], message: Option[String], success: Option[Boolean], commandLine: Option[String]): EventMessage = new EventMessage(`type`, status, commandQueue, level, message, success, commandLine)
|
||||
}
|
||||
+1
-1
@@ -14,7 +14,7 @@ implicit lazy val CommandMessageFormat: JsonFormat[sbt.internal.server.CommandMe
|
||||
val `type` = unbuilder.readField[String]("type")
|
||||
val commandLine = unbuilder.readField[Option[String]]("commandLine")
|
||||
unbuilder.endObject()
|
||||
new sbt.internal.server.CommandMessage(`type`, commandLine)
|
||||
sbt.internal.server.CommandMessage(`type`, commandLine)
|
||||
case None =>
|
||||
deserializationError("Expected JsObject but found None")
|
||||
}
|
||||
+2
-2
@@ -13,13 +13,13 @@ implicit lazy val EventMessageFormat: JsonFormat[sbt.internal.server.EventMessag
|
||||
unbuilder.beginObject(js)
|
||||
val `type` = unbuilder.readField[String]("type")
|
||||
val status = unbuilder.readField[Option[String]]("status")
|
||||
val commandQueue = unbuilder.readField[Vector[String]]("commandQueue")
|
||||
val commandQueue = unbuilder.readField[scala.Vector[String]]("commandQueue")
|
||||
val level = unbuilder.readField[Option[String]]("level")
|
||||
val message = unbuilder.readField[Option[String]]("message")
|
||||
val success = unbuilder.readField[Option[Boolean]]("success")
|
||||
val commandLine = unbuilder.readField[Option[String]]("commandLine")
|
||||
unbuilder.endObject()
|
||||
new sbt.internal.server.EventMessage(`type`, status, commandQueue, level, message, success, commandLine)
|
||||
sbt.internal.server.EventMessage(`type`, status, commandQueue, level, message, success, commandLine)
|
||||
case None =>
|
||||
deserializationError("Expected JsObject but found None")
|
||||
}
|
||||
+7
-7
@@ -14,7 +14,7 @@
|
||||
},
|
||||
{
|
||||
"name": "commandLine",
|
||||
"type": "String?",
|
||||
"type": "Option[String]",
|
||||
"default": "None",
|
||||
"since": "0.1.0"
|
||||
}
|
||||
@@ -33,37 +33,37 @@
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"type": "String?",
|
||||
"type": "Option[String]",
|
||||
"default": "None",
|
||||
"since": "0.1.0"
|
||||
},
|
||||
{
|
||||
"name": "commandQueue",
|
||||
"type": "String*",
|
||||
"type": "scala.Vector[String]",
|
||||
"default": "Vector()",
|
||||
"since": "0.1.0"
|
||||
},
|
||||
{
|
||||
"name": "level",
|
||||
"type": "String?",
|
||||
"type": "Option[String]",
|
||||
"default": "None",
|
||||
"since": "0.1.0"
|
||||
},
|
||||
{
|
||||
"name": "message",
|
||||
"type": "String?",
|
||||
"type": "Option[String]",
|
||||
"default": "None",
|
||||
"since": "0.1.0"
|
||||
},
|
||||
{
|
||||
"name": "success",
|
||||
"type": "boolean?",
|
||||
"type": "Option[Boolean]",
|
||||
"default": "None",
|
||||
"since": "0.1.0"
|
||||
},
|
||||
{
|
||||
"name": "commandLine",
|
||||
"type": "String?",
|
||||
"type": "Option[String]",
|
||||
"default": "None",
|
||||
"since": "0.1.0"
|
||||
}
|
||||
Reference in New Issue
Block a user