json4s版本4.0.3
scala版本3.1.0
jdk版本1.8.0_181
其他人都会收到这样的警告吗?有没有办法压制或绕过他们?
[warn] -- Deprecation Warning: ...\serialization\json\JSONSerializer.scala:76:51
[warn] 76 | val graphs = (json \ "graphs").extract[JObject].obj.map { case (key, json) =>
[warn] | ^
[warn] |Compiler synthesis of Manifest and OptManifest is deprecated, instead
[warn] |replace with the type `scala.reflect.ClassTag[org.json4s.JObject]`.
[warn] |Alternatively, consider using the new metaprogramming features of Scala 3,
[warn] |see https://docs.scala-lang.org/scala3/reference/metaprogramming.html发布于 2022-01-15 10:17:49
弃用是库开发的一部分,并且警告感兴趣方使用旧版本或相应地进行调整。
至于Scala,一年前,Scala2.13.2引入了编译器标志-Wconf来配置错误/警告级别以及许多要使用的代码注释。详情请访问配置和抑制-警告。
在您的例子中,您可以简单地使用-Wconf:cat=deprecation:ss (ss for silent-summary),在这个过程结束时,您将只得到反对意见警告的总数。
https://stackoverflow.com/questions/70595819
复制相似问题