Closed rabejens closed 1 year ago
I have this:
message Foo { oneof foo { int32 a = 1; int32 b = 2; } }
This is how I configured the generation:
Compile / PB.targets := Seq( PB.gens.java(protobufVersion) -> (Compile / sourceManaged).value, scalapb.gen(javaConversions = true) -> (Compile / sourceManaged).value )
When I do:
val x = Foo(A(42)) toJavaProto(x).getDescriptorForType // < boom!
it says:
Generated message class "foo.Foo$Foo" missing method "hasA".
When I am using an explicit protoc I installed locally, it works.
protoc
How can I instruct the builtin protoc to generate the presence methods?
The answer was: The plugin uses an old protoc.
I added this:
ThisBuild / protocVersion := "3.24.1"
which works.
I have this:
This is how I configured the generation:
When I do:
it says:
When I am using an explicit
protoc
I installed locally, it works.How can I instruct the builtin
protoc
to generate the presence methods?