ScalaPB icon indicating copy to clipboard operation
ScalaPB copied to clipboard

toJavaProto/fromJavaProto is incomplete for FieldOptions on UnknownFieldSet

Open mantasindrasius opened this issue 4 years ago • 3 comments

Conversions from java protobuf library to scala and back are missing the

Misses UnknownFieldSet in one of the fields:

FileDescriptorProto.fromJavaProto(javaFileDescriptorProto)

This works:

FileDescriptorProto.parseFrom(javaFileDescriptorProto.toByteArray)

The methods seems lacking the UnknownFieldSet setters: https://github.com/scalapb/ScalaPB/blob/master/scalapb-runtime/src/main/scalajvm/com/google/protobuf/descriptor/FieldOptions.scala#L211

mantasindrasius avatar Oct 05 '20 19:10 mantasindrasius

@mantasindrasius , thanks for reporting! I confirm that unknown fields are not converted to/from java for any ScalaPB message. Will you be able to work on a PR for this?

thesamet avatar Oct 05 '20 19:10 thesamet

Not sure at the moment, but I'll notify in case I'll be able to.

mantasindrasius avatar Oct 05 '20 20:10 mantasindrasius

@mantasindrasius That's ok. For context, does this issue has practical implications on your project or is it just a gap that you've identified?

thesamet avatar Oct 06 '20 03:10 thesamet