rallyhealth / weePickle

A fork of uPickle, shaded for backwards and forwards compatibility.
Other
77 stars 42 forks source link

Deprecation warnings for `extract` calls with Scala 3 #119

Closed plokhotnyuk closed 1 year ago

plokhotnyuk commented 1 year ago

I got a lot of deprecation warnings after adding Scala 3 support to jsoniter-scala benchmarks in https://github.com/plokhotnyuk/jsoniter-scala/pull/956

[warn] -- Deprecation Warning: /home/andriy/Projects/com/github/plokhotnyuk/jsoniter-scala/jsoniter-scala-benchmark/shared/src/main/scala-3/com/github/plokhotnyuk/jsoniter_scala/benchmark/ADTReading.scala:27:68 
[warn] 27 |    mapper.readValue[JValue](jsonBytes, jValueType).extract[ADTBase]
[warn]    |                                                                    ^
[warn]    |Compiler synthesis of Manifest and OptManifest is deprecated, instead
[warn]    |replace with the type `scala.reflect.ClassTag[com.github.plokhotnyuk.jsoniter_scala.benchmark.ADTBase]`.
[warn]    |Alternatively, consider using the new metaprogramming features of Scala 3,
[warn]    |see https://docs.scala-lang.org/scala3/reference/metaprogramming.html
[warn] -- Deprecation Warning: /home/andriy/Projects/com/github/plokhotnyuk/jsoniter-scala/jsoniter-scala-benchmark/shared/src/main/scala-3/com/github/plokhotnyuk/jsoniter_scala/benchmark/ADTReading.scala:37:56 
[warn] 37 |    parse(new String(jsonBytes, UTF_8)).extract[ADTBase]
[warn]    |                                                        ^
[warn]    |Compiler synthesis of Manifest and OptManifest is deprecated, instead
[warn]    |replace with the type `scala.reflect.ClassTag[com.github.plokhotnyuk.jsoniter_scala.benchmark.ADTBase]`.
[warn]    |Alternatively, consider using the new metaprogramming features of Scala 3,
[warn]    |see https://docs.scala-lang.org/scala3/reference/metaprogramming.html
[warn] -- Deprecation Warning: /home/andriy/Projects/com/github/plokhotnyuk/jsoniter-scala/jsoniter-scala-benchmark/shared/src/main/scala-3/com/github/plokhotnyuk/jsoniter_scala/benchmark/AnyValsReading.scala:27:68 
[warn] 27 |    mapper.readValue[JValue](jsonBytes, jValueType).extract[AnyVals]
[warn]    |                                                                    ^
[warn]    |Compiler synthesis of Manifest and OptManifest is deprecated, instead
[warn]    |replace with the type `scala.reflect.ClassTag[com.github.plokhotnyuk.jsoniter_scala.benchmark.AnyVals]`.
[warn]    |Alternatively, consider using the new metaprogramming features of Scala 3,
[warn]    |see https://docs.scala-lang.org/scala3/reference/metaprogramming.html
[warn] -- Deprecation Warning: /home/andriy/Projects/com/github/plokhotnyuk/jsoniter-scala/jsoniter-scala-benchmark/shared/src/main/scala-3/com/github/plokhotnyuk/jsoniter_scala/benchmark/AnyValsReading.scala:37:56 
[warn] 37 |    parse(new String(jsonBytes, UTF_8)).extract[AnyVals]
[warn]    |                                                        ^
[warn]    |Compiler synthesis of Manifest and OptManifest is deprecated, instead
[warn]    |replace with the type `scala.reflect.ClassTag[com.github.plokhotnyuk.jsoniter_scala.benchmark.AnyVals]`.
[warn]    |Alternatively, consider using the new metaprogramming features of Scala 3,
[warn]    |see https://docs.scala-lang.org/scala3/reference/metaprogramming.html
[warn] -- Deprecation Warning: /home/andriy/Projects/com/github/plokhotnyuk/jsoniter-scala/jsoniter-scala-benchmark/shared/src/main/scala-3/com/github/plokhotnyuk/jsoniter_scala/benchmark/ArrayBufferOfBooleansReading.scala:27:89 
[warn] 27 |    mapper.readValue[JValue](jsonBytes, jValueType).extract[mutable.ArrayBuffer[Boolean]]
[warn]    |                                                                                         ^
[warn]    |Compiler synthesis of Manifest and OptManifest is deprecated, instead
[warn]    |replace with the type `scala.reflect.ClassTag[collection.mutable.ArrayBuffer[Boolean]]`.
[warn]    |Alternatively, consider using the new metaprogramming features of Scala 3,
[warn]    |see https://docs.scala-lang.org/scala3/reference/metaprogramming.html
[warn] -- Deprecation Warning: /home/andriy/Projects/com/github/plokhotnyuk/jsoniter-scala/jsoniter-scala-benchmark/shared/src/main/scala-3/com/github/plokhotnyuk/jsoniter_scala/benchmark/ArrayBufferOfBooleansReading.scala:37:77 
[warn] 37 |    parse(new String(jsonBytes, UTF_8)).extract[mutable.ArrayBuffer[Boolean]]
[warn]    |                                                                             ^
[warn]    |Compiler synthesis of Manifest and OptManifest is deprecated, instead
[warn]    |replace with the type `scala.reflect.ClassTag[collection.mutable.ArrayBuffer[Boolean]]`.
[warn]    |Alternatively, consider using the new metaprogramming features of Scala 3,
[warn]    |see https://docs.scala-lang.org/scala3/reference/metaprogramming.html
[warn] -- Deprecation Warning: /home/andriy/Projects/com/github/plokhotnyuk/jsoniter-scala/jsoniter-scala-benchmark/shared/src/main/scala-3/com/github/plokhotnyuk/jsoniter_scala/benchmark/ArrayOfBigDecimalsReading.scala:27:87 
[warn] 27 |    bigNumberMapper.readValue[JValue](jsonBytes, jValueType).extract[Array[BigDecimal]]
[warn]    |                                                                                       ^
[warn]    |Compiler synthesis of Manifest and OptManifest is deprecated, instead
[warn]    |replace with the type `scala.reflect.ClassTag[Array[BigDecimal]]`.
[warn]    |Alternatively, consider using the new metaprogramming features of Scala 3,
[warn]    |see https://docs.scala-lang.org/scala3/reference/metaprogramming.html
[warn] -- Deprecation Warning: /home/andriy/Projects/com/github/plokhotnyuk/jsoniter-scala/jsoniter-scala-benchmark/shared/src/main/scala-3/com/github/plokhotnyuk/jsoniter_scala/benchmark/ArrayOfBigDecimalsReading.scala:37:97 
[warn] 37 |    parse(new String(jsonBytes, UTF_8), useBigDecimalForDouble = true).extract[Array[BigDecimal]]
[warn]    |                                                                                                 ^
[warn]    |Compiler synthesis of Manifest and OptManifest is deprecated, instead
[warn]    |replace with the type `scala.reflect.ClassTag[Array[BigDecimal]]`.
[warn]    |Alternatively, consider using the new metaprogramming features of Scala 3,
[warn]    |see https://docs.scala-lang.org/scala3/reference/metaprogramming.html
...
plokhotnyuk commented 1 year ago

Sorry, it should be reported to json4s repo ;)