Skip to content

Commit

Permalink
update deprecation comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi committed Feb 6, 2024
1 parent 9fc189e commit 25264af
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ val sourcecode = "0.3.0"
val dottyCustomVersion = Option(sys.props("dottyVersion"))

val scala2JVMVersions = Seq(scala212, scala213)
val scalaVersions = scala2JVMVersions ++ Seq(scala3) ++ dottyCustomVersion
val scalaVersions = scala2JVMVersions// ++ Seq(scala3) ++ dottyCustomVersion

trait CommonPlatformModule extends ScalaModule with PlatformScalaModule{

Expand Down
4 changes: 2 additions & 2 deletions ujson/src/ujson/IndexedValue.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import upickle.core.{Visitor, ObjVisitor, ArrVisitor, Abort, AbortException}
* want to work with an AST but still provide source-index error positions if
* something goes wrong
*/
@deprecated("Left for binary compatibility, use upickle.core.BufferedValue instead", "After 3.1.4")
@deprecated("Left for binary compatibility, use upickle.core.BufferedValue instead", "upickle after 3.1.4")
sealed trait IndexedValue {
def index: Int
}

@deprecated("Left for binary compatibility, use upickle.core.BufferedValue instead", "After 3.1.4")
@deprecated("Left for binary compatibility, use upickle.core.BufferedValue instead", "upickle after 3.1.4")
object IndexedValue extends Transformer[IndexedValue]{

case class Str(index: Int, value0: java.lang.CharSequence) extends IndexedValue
Expand Down
18 changes: 9 additions & 9 deletions ujson/src/ujson/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package object ujson{
BufferedValue.maybeSortKeysTransform(Readable, t, sortKeys, v)
}

// @deprecated("Binary Compatibility Stub", "After 3.1.4")
// @deprecated("Binary Compatibility Stub", "upickle after 3.1.4")
def transform[T](t: Readable,
v: upickle.core.Visitor[_, T]): T = transform(t, v, sortKeys = false)
/**
Expand All @@ -31,7 +31,7 @@ package object ujson{
writer.toString
}

// @deprecated("Binary Compatibility Stub", "After 3.1.4")
// @deprecated("Binary Compatibility Stub", "upickle after 3.1.4")
def write(t: Value.Value,
indent: Int,
escapeUnicode: Boolean): String = {
Expand All @@ -49,7 +49,7 @@ package object ujson{
transform(t, Renderer(out, indent, escapeUnicode), sortKeys)
}

// @deprecated("Binary Compatibility Stub", "After 3.1.4")
// @deprecated("Binary Compatibility Stub", "upickle after 3.1.4")
def writeTo(t: Value.Value,
out: java.io.Writer,
indent: Int,
Expand All @@ -65,7 +65,7 @@ package object ujson{
transform(t, new BaseByteRenderer(out, indent, escapeUnicode), sortKeys)
}

// @deprecated("Binary Compatibility Stub", "After 3.1.4")
// @deprecated("Binary Compatibility Stub", "upickle after 3.1.4")
def writeToOutputStream(t: Value.Value,
out: java.io.OutputStream,
indent: Int,
Expand All @@ -82,7 +82,7 @@ package object ujson{
baos.toByteArray
}

// @deprecated("Binary Compatibility Stub", "After 3.1.4")
// @deprecated("Binary Compatibility Stub", "upickle after 3.1.4")
def writeToByteArray(t: Value.Value,
indent: Int,
escapeUnicode: Boolean): Array[Byte] = {
Expand All @@ -106,7 +106,7 @@ package object ujson{
writer.toString
}

// @deprecated("Binary Compatibility Stub", "After 3.1.4")
// @deprecated("Binary Compatibility Stub", "upickle after 3.1.4")
def reformat(s: Readable,
indent: Int,
escapeUnicode: Boolean): String = {
Expand All @@ -124,7 +124,7 @@ package object ujson{
transform(s, Renderer(out, indent, escapeUnicode), sortKeys)
}

// @deprecated("Binary Compatibility Stub", "After 3.1.4")
// @deprecated("Binary Compatibility Stub", "upickle after 3.1.4")
def reformatTo(s: Readable,
out: java.io.Writer,
indent: Int,
Expand All @@ -143,7 +143,7 @@ package object ujson{
transform(s, new BaseByteRenderer(out, indent, escapeUnicode), sortKeys)
}

// @deprecated("Binary Compatibility Stub", "After 3.1.4")
// @deprecated("Binary Compatibility Stub", "upickle after 3.1.4")
def reformatToOutputStream(s: Readable,
out: java.io.OutputStream,
indent: Int,
Expand All @@ -160,7 +160,7 @@ package object ujson{
baos.toByteArray
}

// @deprecated("Binary Compatibility Stub", "After 3.1.4")
// @deprecated("Binary Compatibility Stub", "upickle after 3.1.4")
def reformatToByteArray(s: Readable,
indent: Int,
escapeUnicode: Boolean): Array[Byte] = {
Expand Down
18 changes: 9 additions & 9 deletions upickle/src/upickle/Api.scala
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ trait Api
maybeSortKeysTransform(t, sortKeys, ujson.StringRenderer(indent, escapeUnicode)).toString
}

// @deprecated("Binary Compatibility Stub", "After 3.1.4")
// @deprecated("Binary Compatibility Stub", "upickle after 3.1.4")
def write[T: Writer](t: T,
indent: Int,
escapeUnicode: Boolean): String = {
Expand All @@ -69,7 +69,7 @@ trait Api
maybeSortKeysTransform(t, sortKeys, new upack.MsgPackWriter(new ByteArrayOutputStream())).toByteArray
}

// @deprecated("Binary Compatibility Stub", "After 3.1.4")
// @deprecated("Binary Compatibility Stub", "upickle after 3.1.4")
def writeBinary[T: Writer](t: T): Array[Byte] = writeBinary(t, sortKeys = false)

/**
Expand All @@ -94,7 +94,7 @@ trait Api
}


// @deprecated("Binary Compatibility Stub", "After 3.1.4")
// @deprecated("Binary Compatibility Stub", "upickle after 3.1.4")
def writeTo[T: Writer](t: T,
out: java.io.Writer,
indent: Int,
Expand All @@ -108,7 +108,7 @@ trait Api
maybeSortKeysTransform(t, sortKeys, new ujson.BaseByteRenderer(out, indent = indent, escapeUnicode))
}

// @deprecated("Binary Compatibility Stub", "After 3.1.4")
// @deprecated("Binary Compatibility Stub", "upickle after 3.1.4")
def writeToOutputStream[T: Writer](t: T,
out: java.io.OutputStream,
indent: Int,
Expand All @@ -125,7 +125,7 @@ trait Api
out.toByteArray
}

// @deprecated("Binary Compatibility Stub", "After 3.1.4")
// @deprecated("Binary Compatibility Stub", "upickle after 3.1.4")
def writeToByteArray[T: Writer](t: T,
indent: Int,
escapeUnicode: Boolean): Array[Byte] = {
Expand All @@ -144,7 +144,7 @@ trait Api
}
}

// @deprecated("Binary Compatibility Stub", "After 3.1.4")
// @deprecated("Binary Compatibility Stub", "upickle after 3.1.4")
def stream[T: Writer](t: T,
indent: Int,
escapeUnicode: Boolean): geny.Writable = {
Expand All @@ -159,7 +159,7 @@ trait Api
streamBinary[T](t, sortKeys = sortKeys).writeBytesTo(out)
}

// @deprecated("Binary Compatibility Stub", "After 3.1.4")
// @deprecated("Binary Compatibility Stub", "upickle after 3.1.4")
def writeBinaryTo[T: Writer](t: T,
out: java.io.OutputStream): Unit = {
writeBinaryTo(t, out, sortKeys = false)
Expand All @@ -172,7 +172,7 @@ trait Api
out.toByteArray
}

// @deprecated("Binary Compatibility Stub", "After 3.1.4")
// @deprecated("Binary Compatibility Stub", "upickle after 3.1.4")
def writeBinaryToByteArray[T: Writer](t: T): Array[Byte] = {
writeBinaryToByteArray(t, sortKeys = false)
}
Expand All @@ -184,7 +184,7 @@ trait Api
def writeBytesTo(out: java.io.OutputStream) = maybeSortKeysTransform(t, sortKeys, new upack.MsgPackWriter(out))
}

// @deprecated("Binary Compatibility Stub", "After 3.1.4")
// @deprecated("Binary Compatibility Stub", "upickle after 3.1.4")
def streamBinary[T: Writer](t: T): geny.Writable = {
streamBinary(t, sortKeys = false)
}
Expand Down

0 comments on commit 25264af

Please sign in to comment.