【发布时间】:2020-07-23 21:12:57
【问题描述】:
我在 Python 进程生成的文件中有一个 protobuf 序列化对象。我现在需要在 Scala 中反序列化它。 我在官方 google protobuf 文档中没有看到 scala 文档。有参考吗?我该怎么办呢。
我开始为此研究 ScalaPB,但遇到了错误。任何建议 -
plugins.sbt 文件:`addSbtPlugin("com.thesamet" % "sbt-protoc" % "0.99.34")
libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.10.7"`
错误 - [error] (update) sbt.librarymanagement.ResolveException: Error downloading com.thesamet:sbt-protoc;sbtVersion=1.0;scalaVersion=2.12:0.99.34 [error] Not found [error] Not found [error] not found: C:\Users\USER\.ivy2\local\com.thesamet\sbt-protoc\scala_2.12\sbt_1.0\0.99.34\ivys\ivy.xml [error] not found: https://repo1.maven.org/maven2/com/thesamet/sbt-protoc_2.12_1.0/0.99.34/sbt-protoc-0.99.34.pom [error] (ssExtractDependencies) sbt.librarymanagement.ResolveException: Error downloading com.thesamet:sbt-protoc;sbtVersion=1.0;scalaVersion=2.12:0.99.34 [error] Not found [error] Not found [error] not found: C:\Users\USER\.ivy2\local\com.thesamet\sbt-protoc\scala_2.12\sbt_1.0\0.99.34\ivys\ivy.xml [error] not found: https://repo1.maven.org/maven2/com/thesamet/sbt-protoc_2.12_1.0/0.99.34/sbt-protoc-0.99.34.pom [error] Total time: 8 s, completed Jul 23, 2020, 6:41:59 PM [info] shutting down sbt server
【问题讨论】: