ScalaPB v0.10.0 Release Notes
-
For SBT uses, sbt-protoc >= 0.99.28 is required.
๐ฅ BREAKING CHANGE: all messages are now preserving unknown fields by default. This results in an additional parameter to the case class. This may break your code if you are using pattern matching and expecting a specific number of parameters. This feature can be disabled by settings
preserve_unknown_fields
tofalse
at the file or package level.
Why is this feature important? If your service receives messages that were serialized by a future version of the proto, the unknown fields your service does not know about will be deserialized into the unknown fields. Once the message is serialized again, the unknown fields will be serialized too, so this data will not be lost. When this feature is disabled, unknown fields are dropped.
๐ Deprecated
Message[T]
. Up to 0.10.x, generated messages would extendGeneratedMessage with Message[T]
. The additionalwith Message[T]
added noise to the code and did not provide much value. In 0.10.x,Message[T]
is a type-alias toAny
for source compatibility.๐ฅ BREAKING CHANGE: in earlier version, constructor parameters for oneofs were always generated after all the regular fields. From this version of ScalaPB, oneofs are generated in the position that matches their index in the proto file.
๐ฅ BREAKING CHANGE: Enums case objects now extend a sealed abstract base class instead of a sealed trait for improved performance. This breaks binary compatibility for the generated code. Source should remained compatible.
๐ Strings are now parsed using CodedInputStream.readStringRequireUtf8 instead of CodedInputStream.readString (following protobuf-java)
โก๏ธ Update to protobuf 3.11.4
โฌ๏ธ Drop Scala 2.11 and sbt 0.13.x support. Scala 2.11 is EOL and no longer able to compile protocol buffers generated by protoc 3.11.x in mixed Scala mode.
Added
aux_message_options
,aux_field_options
andaux_enum_options
file-level options to enable providing ScalaPB options to protos that can't be edited to include ScalaPB-specific settings (#737).โ Added
bytes_type
file-level options to modify the Scala type generated for protobuf'sbytes
type (#746).โก๏ธ Updated to Scala.js 1.0.0
โ ScalaPB runtime now depends on scala-collection-compat and is warning-free for both 2.12 and 2.13.
๐ SparkSQL-scalapb: removed support for directly reading and writing Parquet file (outside Spark). It is still possible to load and save protobuf to parquet through converting them to dataframes in Spark. Reason of removal is what I perceive as low adoption due to getting no feedback. If you were relying on the ability to directly load and save protobufs to/from parquet, please let us know by filing a ticket.