You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package example
import cats.instances.list._
import pbdirect._
object Hello extends App {
case class MyMessage( id: Option[Int], text: Option[String], numbers: List[Int])
val message = MyMessage( id = Some(123), text = Some("Hello"), numbers = List(1, 2, 3, 4))
println(List(message, message.copy(id = Some(999))).toPB.pbTo[List[MyMessage]]) //List(MyMessage(Some(123),Some(Hello),List(1, 2, 3, 4)))
println(List(1, 2, 3).toPB.pbTo[List[Int]])
/* Exception in thread "main" com.google.protobuf.InvalidProtocolBufferException:
While parsing a protocol message, the input ended unexpectedly in the middle of a field.
This could mean either that the input has been truncated or that an embedded message misreported its own length. */
}
with sbt.version=1.2.6
and
lazy val root = (project in file(".")).
settings(
inThisBuild(List(
organization := "com.example",
scalaVersion := "2.12.7",
version := "0.1.0-SNAPSHOT"
)),
name := "pbdirectTest",
resolvers += Resolver.bintrayRepo("beyondthelines", "maven"),
libraryDependencies += "beyondthelines" %% "pbdirect" % "0.1.0"
)
The text was updated successfully, but these errors were encountered:
with
sbt.version=1.2.6
and
The text was updated successfully, but these errors were encountered: