Skip to content

Commit 7cc0382

Browse files
committed
Update versions of dependencies and Scala for jsoniter-scala-benchmark sub-projects
1 parent be83662 commit 7cc0382

File tree

2 files changed

+6
-22
lines changed

2 files changed

+6
-22
lines changed

build.sbt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ lazy val commonSettings = Seq(
2020
url = url("https://twitter.com/aplokhotnyuk")
2121
)
2222
),
23-
scalaVersion := "3.3.3",
23+
scalaVersion := "2.13.14",
2424
scalacOptions ++= Seq(
2525
"-deprecation",
2626
"-encoding", "UTF-8",
@@ -247,7 +247,7 @@ lazy val `jsoniter-scala-benchmark` = crossProject(JVMPlatform, JSPlatform)
247247
.settings(commonSettings)
248248
.settings(noPublishSettings)
249249
.settings(
250-
crossScalaVersions := Seq("3.3.3", "2.13.14"),
250+
crossScalaVersions := Seq("3.4.2", "2.13.14"),
251251
scalacOptions ++= (CrossVersion.partialVersion(scalaVersion.value) match {
252252
case Some((2, _)) => Seq()
253253
case _ => Seq("-Yretain-trees", "-Xmax-inlines:100")
@@ -257,13 +257,13 @@ lazy val `jsoniter-scala-benchmark` = crossProject(JVMPlatform, JSPlatform)
257257
"org.playframework" %%% "play-json" % "3.0.4",
258258
"dev.zio" %%% "zio-json" % "0.7.1",
259259
"com.evolutiongaming" %%% "play-json-jsoniter" % "0.10.3",
260-
"com.lihaoyi" %%% "upickle" % "3.3.1",
260+
"com.lihaoyi" %%% "upickle" % "4.0.0",
261261
"io.circe" %%% "circe-generic" % "0.14.9",
262262
"io.circe" %%% "circe-parser" % "0.14.9",
263263
"io.circe" %%% "circe-jawn" % "0.14.9",
264264
"com.disneystreaming.smithy4s" %%% "smithy4s-json" % "0.18.23",
265-
"org.json4s" %% "json4s-jackson" % "4.1.0-M5",
266-
"org.json4s" %% "json4s-native" % "4.1.0-M5",
265+
"org.json4s" %% "json4s-jackson" % "4.1.0-M6",
266+
"org.json4s" %% "json4s-native" % "4.1.0-M6",
267267
"com.rallyhealth" %% "weepickle-v1" % "1.9.1",
268268
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.17.2",
269269
"com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.17.2",

jsoniter-scala-benchmark/shared/src/main/scala/com/github/plokhotnyuk/jsoniter_scala/benchmark/UPickleReaderWriters.scala

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package com.github.plokhotnyuk.jsoniter_scala.benchmark
22

33
import com.github.plokhotnyuk.jsoniter_scala.benchmark.SuitEnum.SuitEnum
44
import upickle.AttributeTagged
5-
import upickle.core.{Annotator, Visitor}
5+
import upickle.core.Visitor
66
import java.time._
77
import java.util.Base64
88
import java.util.concurrent.ConcurrentHashMap
@@ -148,20 +148,6 @@ object UPickleReaderWriters extends AttributeTagged {
148148
macroRW
149149
}
150150

151-
override def annotate[V](rw: Reader[V], key: String, value: String): TaggedReader.Leaf[V] =
152-
new TaggedReader.Leaf[V](tagName, simpleName(value), rw)
153-
154-
override def annotate[V](rw: ObjectWriter[V], key: String, value: String, checker: Annotator.Checker): TaggedWriter[V] =
155-
new TaggedWriter.Leaf[V](checker, tagName, simpleName(value), rw)
156-
157-
override implicit def OptionWriter[T: Writer]: Writer[Option[T]] =
158-
implicitly[Writer[T]].comap[Option[T]](_.getOrElse(null.asInstanceOf[T]))
159-
160-
override implicit def OptionReader[T: Reader]: Reader[Option[T]] =
161-
new Reader.Delegate[Any, Option[T]](implicitly[Reader[T]].map(x => new Some(x))) {
162-
override def visitNull(index: Int): Option[T] = None
163-
}
164-
165151
private[this] def strReader[T](f: CharSequence => T): SimpleReader[T] = new SimpleReader[T] {
166152
override val expectedMsg = "expected string"
167153

@@ -181,6 +167,4 @@ object UPickleReaderWriters extends AttributeTagged {
181167
private[this] def numWriter[V]: Writer[V] = new Writer[V] {
182168
def write0[R](out: Visitor[_, R], v: V): R = out.visitFloat64String(v.toString, -1)
183169
}
184-
185-
private[this] def simpleName(s: String): String = s.substring(s.lastIndexOf('.') + 1)
186170
}

0 commit comments

Comments
 (0)